Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

FIT2100 OS Practice MCQs

Note: This file contains MCQs from different topics. The solution to all the MCQs are provided in a separate document. Please attempt these MCQs as a practice test and then check the answers.

1. Which of the following statements are true of the central processing unit (CPU)?

a.   The CPU is a program interpreter for Python and other programming languages.

b.   The CPU can only directly load and execute C code.

c.   The CPU cannot execute C code directly.

d.    C code is the native machine language of the CPU.

e.   The CPU has its own machine language which is different from C code.

2. Which of the following are true about direct memory access (DMA) in computer systems?

a.   DMA requires special purpose hardware

b.   The CPU continually regulates the DMA data transfer rate as data is transferred

c.   DMA is only used for transfer to and from I/O devices

d.   Implementation of DMA requires the use of interrupts

e.   DMA implements programmed I/O

3.  Which of the following statements are true of DMA?

a.   DMA can be used to allow the CPU to fetch program instructions directly from an I/O device, without requiring the program to be loaded into main memory.

b.   DMA is a buffer which improves efficiency by storing a whole block of data at a time.

c.    Without DMA, any data transferred to or from main memory must pass through the CPU.

d.    DMA is a common software feature of Linux and various other operating systems.

e.    DMA is hardware rather than software.

4. Which of the following are true about file systems:

a.   Disk defragmentation is a technique used by the hard drive head to reduce the access time for a file

b.   If the size of each individual file is divisible by the size of the disk block, no internal fragmentation could occur in the filesystem

c.   Multiple inodes for a single file prevents accidental file deletion.

d.   The init process looks into an EEPROM to fetch the first instruction for the CPU.

e.   For an inode-based file system, if a file requires less than the number of direct pointers in the inode structure, indirect pointers should not be used to store the addresses of different blocks of this file.

5. Which of the following are true for a typical operating system kernel, on a computer that boots the operating system from a hard drive via a master boot record?

a.   The kernel is located in main memory after the machine has booted, and normally remains in main memory until the computer is shut down.

b.   After the machine is booted, the kernel is located in main memory whenever    another process is not being executed; the rest of the time it exists on the hard drive only.

c.   The kernel is loaded in and out of main memory according to medium-term scheduling actions.

d.   Before the computer boots, the kernel is stored entirely within the master boot record.

e.   Before the computer boots, instructions for loading the kernel are stored within the master boot record.

6. Which of the following are true:

a.    User processes generally have a negative PRI to indicate low priority.

b.    System processes generally have a negative PRI to indicate high priority.

c.    The PRI value of a running process can not be altered.

d.    The init/systemd process is the ancestor of all the user processes.

e.    A low priority process's PRI value will be increased automatically by the scheduler to prevent starvation.

7.Which of the following are true:

a.   The creation of zombie processes should be avoided as they behave abnormally to cause a system crash.

b.   An orphan process can turn into a zombie.

c.   To free up entries in the process table, the init process will call wait() for an adopted zombie process.

d.   When a child process becomes an orphan, its PRI value decreases automatically.

e.   The inetd daemon is used exclusively by the scheduler to possess zombie processes.

8. The process control block:

a.   is stored in the code segment of the process

b.   is created by the short-term scheduler

c.   stores more information about a process than that required to perform a context switch

d.   contains a copy of the most recent contents of the accumulator register in the CPU, regardless of whether the process              represented by the process control block is that currently          executing on the CPU

e.   records the address of the next instruction in the process to be executed.

9. Regarding the concept of preemption in process scheduling, which of the following are true?

a.    Preemption allows a completed process, which has terminated, to be moved back to the ready queue and run multiple times.

b.    Preemption is invoked when the number of required processes is higher than the degree of multiprogramming.

c.    Preemption is the removal of a process from the running state by the scheduler.

d.    A preemptive scheduler requires a process to block itself or terminate in order to be removed from the running state.

e.    A non-preemptive scheduler requires a process to block itself or terminate in order to be removed from the running state.

10. Which of the following are true with respect to uniprocessor scheduling?

a.   Feedback scheduling requires the service time of a process to be estimated in advance.

b.   Medium-term scheduling is invoked more often than long-term scheduling.

c.   Round-robin scheduling means that each process is paired with another process at least once.

d.   Non-preemptive scheduling means processes co-operate to allow the OS to initiate task switching.

e.   With feedback scheduling, Processes in the first ready queue are never at risk of starvation.

1 1. Which TWO of the following are true about semaphores and mutexes?

a.   A mutex can only be unlocked by the same thread or process that locked it.

b.   A binary semaphore can count multiple available instances of a resource.

c.   The current value of a semaphore is -3, it means 3 processes are concurrently accessing their critical section.

d.   The current value of a semaphore is -3, it means 3 processes are blocked on this semaphore.

e.   A general semaphore cannot count multiple available instances of a resource.

12. Which TWO of the following are true about Page Replacement algorithms:

a.   Although the Optimal algorithm is impossible to implement for real systems as we cannot look into the future, it can serve as a baseline to compare against other algorithms.

b.   FIFO uses the principle of locality.

c.   LRU is harder to implement than FIFO.

d.   The FIFO algorithm is not computationally efficient.

e.   Optimal policy is not needed as it is impossible to implement.

13. Which TWO of the following are true about named pipes (FIFO)?

a.   A named pipe requires both processes to have the same name.

b.   A named pipe can be used between two processes that do not have a parent-child relationship.

c.   FIFO provides concurrency protection by ensuring that only one process can write to the pipe at a time.

d.   FIFO provides concurrency protection by imposing synchronisation between reader and writer.

e.   FIFO provides concurrency protection by ensuring that only one process can write to the pipe at a time.