250+ TOP MCQs on Process Synchronization and Answers

Operating System Multiple Choice Questions on “Process Synchronization”.

1. Which process can be affected by other processes executing in the system?
a) cooperating process
b) child process
c) parent process
d) init process

Answer: a
Clarification: A cooperating process can be affected by other processes executing in the system. Also it can affect other processes executing in the system. A process shares data with other processes, such a process is known as a cooperating process.

2. When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place is called ________
a) dynamic condition
b) race condition
c) essential condition
d) critical condition

Answer: b
Clarification: When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called race condition.

3. If a process is executing in its critical section, then no other processes can be executing in their critical section. What is this condition called?
a) mutual exclusion
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion

Answer: a
Clarification: If a process is executing in its critical section, then no other processes can be executed in their critical section. This condition is called Mutual Exclusion. Critical section of the process is shared between multiple processes. If this section is executed by more than one or all of them concurrently then the outcome of this is not as per desired outcome. For this reason the critical section of the process should not be executed concurrently.

4. Which one of the following is a synchronization tool?
a) thread
b) pipe
c) semaphore
d) socket

Answer: c
Clarification: Semaphore is a synchronization tool. Semaphore is a mechanism which synchronizes or controls access of threads on critical resources. There are two types of semaphores i) Binary Semaphore ii) Counting Semaphore.

5. A semaphore is a shared integer variable __________
a) that can not drop below zero
b) that can not be more than zero
c) that can not drop below one
d) that can not be more than one

Answer: a
Clarification: A semaphore is a shared integer variable that can not drop below zero. In binary semaphore, if the value of the semaphore variable is zero that means there is a process that uses a critical resource and no other process can access the same critical resource until it is released. In Counting semaphore, if the value of the semaphore variable is zero that means there is no resource available.

6. Mutual exclusion can be provided by the __________
a) mutex locks
b) binary semaphores
c) both mutex locks and binary semaphores
d) none of the mentioned

Answer: c
Clarification: Mutual exclusion can be provided by both mutex locks and binary semaphore. Mutex is a short form of Mutual Exclusion. Binary semaphore also provides a mechanism for mutual exclusion. Binary semaphore behaves similar to mutex locks.

7. When high priority task is indirectly preempted by medium priority task effectively inverting the relative priority of the two tasks, the scenario is called __________
a) priority inversion
b) priority removal
c) priority exchange
d) priority modification

Answer: a
Clarification: When a high priority task is indirectly preempted by a medium priority task effectively inverting the relative priority of the two tasks, the scenario is called priority inversion.

8. Process synchronization can be done on __________
a) hardware level
b) software level
c) both hardware and software level
d) none of the mentioned

Answer: c
Clarification: Process synchronization can be done on both hardware and software level. Critical section problems can be resolved using hardware synchronisation. But this method is not simple for implementation so software synchronization is mostly used.

9. A monitor is a module that encapsulates __________
a) shared data structures
b) procedures that operate on shared data structure
c) synchronization between concurrent procedure invocation
d) all of the mentioned

Answer: d
Clarification: A monitor is a module that encapsulates shared data structures, procedures that operate on shared data structure, synchronization between concurrent procedure invocation.

10. To enable a process to wait within the monitor __________
a) a condition variable must be declared as condition
b) condition variables must be used as boolean objects
c) semaphore must be used
d) all of the mentioned

Answer: a
Clarification: To enable a process to wait within the monitor a condition variable must be declared as condition.

250+ TOP MCQs on Deadlock Prevention and Answers

Operating System Multiple Choice Questions on “Deadlock Prevention”.

1. The number of resources requested by a process ____________
a) must always be less than the total number of resources available in the system
b) must always be equal to the total number of resources available in the system
c) must not exceed the total number of resources available in the system
d) must exceed the total number of resources available in the system

Answer: c

2. The request and release of resources are ___________
a) command line statements
b) interrupts
c) system calls
d) special programs

Answer: c

3. What are Multithreaded programs?
a) lesser prone to deadlocks
b) more prone to deadlocks
c) not at all prone to deadlocks
d) none of the mentioned

Answer: b
Clarification: Multiple threads can compete for shared resources.

4. For a deadlock to arise, which of the following conditions must hold simultaneously?
a) Mutual exclusion
b) No preemption
c) Hold and wait
d) All of the mentioned

Answer: d
Clarification: None.

5. For Mutual exclusion to prevail in the system ____________
a) at least one resource must be held in a non sharable mode
b) the processor must be a uniprocessor rather than a multiprocessor
c) there must be at least one resource in a sharable mode
d) all of the mentioned

Answer: a
Clarification: If another process requests that resource (non – shareable resource), the requesting process must be delayed until the resource has been released.

6. For a Hold and wait condition to prevail ____________
a) A process must be not be holding a resource, but waiting for one to be freed, and then request to acquire it
b) A process must be holding at least one resource and waiting to acquire additional resources that are being held by other processes
c) A process must hold at least one resource and not be waiting to acquire additional resources
d) None of the mentioned

Answer: b
Clarification: None.

7. Deadlock prevention is a set of methods ____________
a) to ensure that at least one of the necessary conditions cannot hold
b) to ensure that all of the necessary conditions do not hold
c) to decide if the requested resources for a process have to be given or not
d) to recover from a deadlock

Answer: a
Clarification: None.

8. For non sharable resources like a printer, mutual exclusion ____________
a) must exist
b) must not exist
c) may exist
d) none of the mentioned

Answer: a
Clarification: A printer cannot be simultaneously shared by several processes.

9. For sharable resources, mutual exclusion ____________
a) is required
b) is not required
c) may be or may not be required
d) none of the mentioned

Answer: b
Clarification: They do not require mutually exclusive access, and hence cannot be involved in a deadlock.

10. To ensure that the hold and wait condition never occurs in the system, it must be ensured that ____________
a) whenever a resource is requested by a process, it is not holding any other resources
b) each process must request and be allocated all its resources before it begins its execution
c) a process can request resources only when it has none
d) all of the mentioned

Answer: d
Clarification: c – A process may request some resources and use them. Before it can can request any additional resources, however it must release all the resources that it is currently allocated.

11. The disadvantage of a process being allocated all its resources before beginning its execution is ____________
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of the mentioned

Answer: b
Clarification: None.

12. To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it ____________
a) then the process waits for the resources be allocated to it
b) the process keeps sending requests until the resource is allocated to it
c) the process resumes execution without the resource being allocated to it
d) then all resources currently being held are preempted

Answer: d
Clarification: None.

13. One way to ensure that the circular wait condition never holds is to ____________
a) impose a total ordering of all resource types and to determine whether one precedes another in the ordering
b) to never let a process acquire resources that are held by other processes
c) to let a process wait for only one resource at a time
d) all of the mentioned

Answer: a

250+ TOP MCQs on Real Time System – Implementing RT Operating Systems

Operating System Multiple Choice Questions on “Real Time System – Implementing RT Operating Systems”.

1. What is the disadvantage of real addressing mode?
a) there is a lot of cost involved
b) time consumption overhead
c) absence of memory protection between processes
d) restricted access to memory locations by processes

Answer: c
Clarification: None.

2. Preemptive, priority based scheduling guarantees ____________
a) hard real time functionality
b) soft real time functionality
c) protection of memory
d) none of the mentioned

Answer: b
Clarification: None.

3. Real time systems must have ____________
a) preemptive kernels
b) non preemptive kernels
c) preemptive kernels or non preemptive kernels
d) neither preemptive nor non preemptive kernels

Answer: a
Clarification: None.

4. What is Event latency?
a) the amount of time an event takes to occur from when the system started
b) the amount of time from the event occurrence till the system stops
c) the amount of time from event occurrence till the event crashes
d) the amount of time that elapses from when an event occurs to when it is serviced.

Answer: d
Clarification: None.

5. Interrupt latency refers to the period of time ____________
a) from the occurrence of an event to the arrival of an interrupt
b) from the occurrence of an event to the servicing of an interrupt
c) from arrival of an interrupt to the start of the interrupt service routine
d) none of the mentioned

Answer: c
Clarification: None.

6. Real time systems need to __________ the interrupt latency.
a) minimize
b) maximize
c) not bother about
d) none of the mentioned

Answer: a
Clarification: None.

7. The amount of time required for the scheduling dispatcher to stop one process and start another is known as ______________
a) event latency
b) interrupt latency
c) dispatch latency
d) context switch

Answer: c
Clarification: None.

8. The most effective technique to keep dispatch latency low is to ____________
a) provide non preemptive kernels
b) provide preemptive kernels
c) make it user programmed
d) run less number of processes at a time

Answer: b
Clarification: None.

9. Priority inversion is solved by use of _____________
a) priority inheritance protocol
b) two phase lock protocol
c) time protocol
d) all of the mentioned

Answer: a

250+ TOP MCQs on Linux and Answers

Operating System Multiple Choice Questions on “Linux”.

1. Linux uses a time-sharing algorithm ___________
a) to pair preemptive scheduling between multiple processes
b) for tasks where absolute priorities are more important than fairness
c) all of the mentioned
d) none of the mentioned

Answer: a
Clarification: None.

2. The first linux kernel which supports the SMP hardware?
a) linux 0.1
b) linux 1.0
c) linux 1.2
d) linux 2.0

Answer: d
Clarification: None.

3. Which one of the following linux file system does not support journaling feature?
a) ext2
b) ext3
c) ext4
d) none of the mentioned

Answer: a
Clarification: None.

4. Which binary format is supported by linux?
a) a.out
b) elf
c) both a.out and ELF
d) none of the mentioned

Answer: c
Clarification: None.

5. Which one of the following bootloader is not used by linux?
a) GRUB
b) LILO
c) NTLDR
d) None of the mentioned

Answer: c
Clarification: None.

6. The first process launched by the linux kernel is ___________
a) init process
b) zombie process
c) batch process
d) boot process

Answer: a
Clarification: None.

7. Which desktop environment is not used in any linux distribution?
a) gnome
b) kde
c) unity
d) none of the mentioned

Answer: d
Clarification: None.

8. Standard set of functions through which interacts with kernel is defined by ___________
a) system libraries
b) kernel code
c) compilers
d) utility programs

Answer: a
Clarification: None.

9. What is Linux?
a) single user, single tasking
b) single user, multitasking
c) multi user, single tasking
d) multi user, multitasking

Answer: d
Clarification: None.

10. Which one of the following is not a linux distribution?
a) debian
b) gentoo
c) open SUSE
d) multics

Answer: d

250+ TOP MCQs on File System Interface Access Methods and Answers

Operating System Multiple Choice Questions on “File System Interface Access Methods”.

1. Data cannot be written to secondary storage unless written within a ______
a) file
b) swap space
c) directory
d) text format

Answer: a

2. File attributes consist of ____________
a) name
b) type
c) identifier
d) all of the mentioned

Answer: d

3. The information about all files is kept in ____________
a) swap space
b) operating system
c) seperate directory structure
d) none of the mentioned

Answer: c

4. A file is a/an _______ data type.
a) abstract
b) primitive
c) public
d) private

Answer: a

5. The operating system keeps a small table containing information about all open files called ____________
a) system table
b) open-file table
c) file table
d) directory table

Answer: b
Clarification: None.

6. In UNIX, what will the open system call return?
a) pointer to the entry in the open file table
b) pointer to the entry in the system wide table
c) a file to the process calling it
d) none of the mentioned

Answer: a
Clarification: None.

7. System wide table in UNIX contains process independent information such as ____________
a) location of file on disk
b) access dates
c) file size
d) all of the mentioned

Answer: d
Clarification: None.

8. The open file table has a/an _______ associated with each file.
a) file content
b) file permission
c) open count
d) close count

Answer: c
Clarification: open count indicates the number of processes that have the file open.

9. Which of the following are the two parts of the file name?
a) name & identifier
b) identifier & type
c) extension & name
d) type & extension

Answer: c

250+ TOP MCQs on Disk Management and Answers

Operating System Multiple Choice Questions on “Disk Management”.

1. The process of dividing a disk into sectors that the disk controller can read and write, before a disk can store data is known as ____________
a) partitioning
b) swap space creation
c) low-level formatting
d) none of the mentioned

Answer: c
Clarification: None.

2. The data structure for a sector typically contains ____________
a) header
b) data area
c) trailer
d) all of the mentioned

Answer: d
Clarification: None.

3. The header and trailer of a sector contain information used by the disk controller such as _________ and _________
a) main section & disk identifier
b) error correcting codes (ECC) & sector number
c) sector number & main section
d) disk identifier & sector number

Answer: b
Clarification: None.

4. The two steps the operating system takes to use a disk to hold its files are _______ and ________
a) partitioning & logical formatting
b) swap space creation & caching
c) caching & logical formatting
d) logical formatting & swap space creation

Answer: a
Clarification: None.

5. The _______ program initializes all aspects of the system, from CPU registers to device controllers and the contents of main memory, and then starts the operating system.
a) main
b) bootloader
c) bootstrap
d) rom

Answer: c
Clarification: None.

6. For most computers, the bootstrap is stored in ________
a) RAM
b) ROM
c) Cache
d) Tertiary storage

Answer: b
Clarification: None.

7. A disk that has a boot partition is called a _________
a) start disk
b) end disk
c) boot disk
d) all of the mentioned

Answer: c
Clarification: None.

8. Defective sectors on disks are often known as __________
a) good blocks
b) destroyed blocks
c) bad blocks
d) none of the mentioned

Answer: c
Clarification: None.

9. In SCSI disks used in high end PCs, the controller maintains a list of _________ on the disk. The disk is initialized during ________ formatting which sets aside spare sectors not visible to the operating system.
a) destroyed blocks, high level formatting
b) bad blocks, partitioning
c) bad blocks, low level formatting
d) destroyed blocks, partitioning

Answer: c
Clarification: None.

10. The scheme used in the above question is known as _______ or ________
a) sector sparing & forwarding
b) forwarding & sector utilization
c) backwarding & forwarding
d) sector utilization & backwarding

Answer: a
Clarification: None.

11. An unrecoverable error is known as _________
a) hard error
b) tough error
c) soft error
d) none of the mentioned

Answer: a