250+ TOP MCQs on Deadlock Recovery and Answers

Operating System Questions and Answers for Experienced people on “Deadlock Recovery” and will also be useful for interview preparations for experienced people.

1. A deadlock can be broken by ____________
a) abort one or more processes to break the circular wait
b) abort all the process in the system
c) preempt all resources from all processes
d) none of the mentioned

Answer: a
Clarification: None.

2. The two ways of aborting processes and eliminating deadlocks are ____________
a) Abort all deadlocked processes
b) Abort all processes
c) Abort one process at a time until the deadlock cycle is eliminated
d) All of the mentioned

Answer: c
Clarification: None.

3. Those processes should be aborted on occurrence of a deadlock, the termination of which?
a) is more time consuming
b) incurs minimum cost
c) safety is not hampered
d) all of the mentioned

Answer: b
Clarification: None.

4. The process to be aborted is chosen on the basis of the following factors?
a) priority of the process
b) process is interactive or batch
c) how long the process has computed
d) all of the mentioned

Answer: d
Clarification: None.

5. Cost factors for process termination include ____________
a) Number of resources the deadlock process is not holding
b) CPU utilization at the time of deadlock
c) Amount of time a deadlocked process has thus far consumed during its execution
d) All of the mentioned

Answer: c
Clarification: None.

6. If we preempt a resource from a process, the process cannot continue with its normal execution and it must be ____________
a) aborted
b) rolled back
c) terminated
d) queued

Answer: b
Clarification: None.

7. To _______ to a safe state, the system needs to keep more information about the states of processes.
a) abort the process
b) roll back the process
c) queue the process
d) none of the mentioned

Answer: b
Clarification: None.

8. If the resources are always preempted from the same process __________ can occur.
a) deadlock
b) system crash
c) aging
d) starvation

Answer: d
Clarification: None.

9. What is the solution to starvation?
a) the number of rollbacks must be included in the cost factor
b) the number of resources must be included in resource preemption
c) resource preemption be done instead
d) all of the mentioned

Answer: a

250+ TOP MCQs on Real Time System – Real Time CPU Scheduling

Operating System Questions and Answers on “Real Time CPU Scheduling” and will also be useful for GATE examinations.

1. To schedule the processes, they are considered _________
a) infinitely long
b) periodic
c) heavy weight
d) light weight

Answer: b
Clarification: None.

2. If the period of a process is ‘p’, then what is the rate of the task?
a) p2
b) 2*p
c) 1/p
d) p

Answer: c
Clarification: None.

3. The scheduler admits a process using __________
a) two phase locking protocol
b) admission control algorithm
c) busy wait polling
d) none of the mentioned

Answer: c
Clarification: None.

4. The ____________ scheduling algorithm schedules periodic tasks using a static priority policy with preemption.
a) earliest deadline first
b) rate monotonic
c) first cum first served
d) priority

Answer: b
Clarification: None.

5. Rate monotonic scheduling assumes that the __________
a) processing time of a periodic process is same for each CPU burst
b) processing time of a periodic process is different for each CPU burst
c) periods of all processes is the same
d) none of the mentioned

Answer: a
Clarification: None.

6. In rate monotonic scheduling, a process with a shorter period is assigned __________
a) a higher priority
b) a lower priority
c) higher & lower priority
d) none of the mentioned

Answer: a
Clarification: None.

7. There are two processes P1 and P2, whose periods are 50 and 100 respectively. P1 is assigned higher priority than P2. The processing times are t1 = 20 for P1 and t2 = 35 for P2. Is it possible to schedule these tasks so that each meets its deadline using Rate monotonic scheduling?
a) yes
b) no
c) maybe
d) none of the mentioned

Answer: a
Clarification: None.

8. If a set of processes cannot be scheduled by rate monotonic scheduling algorithm, then __________
a) they can be scheduled by EDF algorithm
b) they cannot be scheduled by EDF algorithm
c) they cannot be scheduled by any other algorithm
d) none of the mentioned

Answer: c
Clarification: None.

9. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35. The total CPU utilization is?
a) 0.90
b) 0.74
c) 0.94
d) 0.80

Answer: c
Clarification: None.

10. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35. Can the processes be scheduled without missing the deadlines?
a) Yes
b) No
c) Maybe
d) None of the mentioned

Answer: b

250+ TOP MCQs on Multi Threading Models and Answers

Operating System Multiple Choice Questions on “Multi Threading Models”.

1. The model in which one kernel thread is mapped to many user-level threads is called ___________
a) Many to One model
b) One to Many model
c) Many to Many model
d) One to One model

Answer: a
Clarification: None.

2. The model in which one user-level thread is mapped to many kernel level threads is called ___________
a) Many to One model
b) One to Many model
c) Many to Many model
d) One to One model

Answer: b
Clarification: None.

3. In the Many to One model, if a thread makes a blocking system call ___________
a) the entire process will be blocked
b) a part of the process will stay blocked, with the rest running
c) the entire process will run
d) none of the mentioned

Answer: a
Clarification: None.

4. In the Many to One model, multiple threads are unable to run in parallel on multiprocessors because of ___________
a) only one thread can access the kernel at a time
b) many user threads have access to just one kernel thread
c) there is only one kernel thread
d) none of the mentioned

Answer: a
Clarification: None.

5. The One to One model allows ___________
a) increased concurrency
b) decreased concurrency
c) increased or decreased concurrency
d) concurrency equivalent to other models

Answer: a
Clarification: None.

6. In the One to One model when a thread makes a blocking system call ___________
a) other threads are strictly prohibited from running
b) other threads are allowed to run
c) other threads only from other processes are allowed to run
d) none of the mentioned

Answer: b
Clarification: None.

7. Which of the following is the drawback of the One to One Model?
a) increased concurrency provided by this model
b) decreased concurrency provided by this model
c) creating so many threads at once can crash the system
d) creating a user thread requires creating the corresponding kernel thread

Answer: d
Clarification: None.

8. When is the Many to One model at an advantage?
a) When the program does not need multithreading
b) When the program has to be multi-threaded
c) When there is a single processor
d) None of the mentioned

Answer: a
Clarification: None.

9. In the Many to Many model true concurrency cannot be gained because ___________
a) the kernel can schedule only one thread at a time
b) there are too many threads to handle
c) it is hard to map threads with each other
d) none of the mentioned

Answer: a
Clarification: None.

10. In the Many to Many models when a thread performs a blocking system call ___________
a) other threads are strictly prohibited from running
b) other threads are allowed to run
c) other threads only from other processes are allowed to run
d) none of the mentioned

Answer: b

250+ TOP MCQs on File System Interface Directory Structure and Answers

JUnit Problems on “File System Interface Directory Structure”.

1. An absolute path name begins at the _____________
a) leaf
b) stem
c) current directory
d) root

Answer: d

2. A relative path name begins at the _____________
a) leaf
b) stem
c) current directory
d) root

Answer: c

3. In a tree structure, when deleting a directory that is not empty?
a) The contents of the directory are safe
b) The contents of the directory are also deleted
c) contents of the directory are not deleted
d) none of the mentioned

Answer: b

4. When two users keep a subdirectory in their own directories, the structure being referred to is _____________
a) tree structure
b) cyclic graph directory structure
c) two level directory structure
d) acyclic graph directory

Answer: d

5. A tree structure ______ the sharing of files and directories.
a) allows
b) may restrict
c) restricts
d) none of the mentioned

Answer: c
Clarification: None.

6. With a shared file _____________
a) actual file exists
b) there are two copies of the file
c) the changes made by one person are not reflected to the other
d) the changes made by one person are reflected to the other

Answer: d
Clarification: None.

7. In UNIX, what is a link?
a) a directory entry
b) a pointer to another file or subdirectory
c) implemented as an absolute or relative path name
d) all of the mentioned

Answer: d
Clarification: None.

8. The operating system _______ the links when traversing directory trees, to preserve the acyclic structure of the system.
a) considers
b) ignores
c) deletes
d) none of the mentioned

Answer: b
Clarification: None.

9. The deletion of a link ________ the original file.
a) deletes
b) affects
c) does not affect
d) none of the mentioned

Answer: c
Clarification: None.

10. When keeping a list of all the links/references to a file, and the list is empty, implies that _____________
a) the file has no copies
b) the file is deleted
c) the file is hidden
d) none of the mentioned

Answer: b
Clarification: None.

11. When a cycle exists, the reference count maybe non zero, even when it is no longer possible to refer to a directory or file, due to _______
a) the possibility of one hidden reference
b) the possibility of two hidden references
c) the possibility of self referencing
d) none of the mentioned

Answer: c

250+ TOP MCQs on RAID Structure and Answers

Advanced Operating System Questions and Answers on “RAID Structure”.

1. A large number of disks in a system improves the rate at which data can be read or written if ____________
a) the disks are operated on sequentially
b) the disks are operated on selectively
c) the disks are operated in parallel
d) all of the mentioned

Answer: c
Clarification: None.

2. RAID stands for ____________
a) Redundant Allocation of Inexpensive Disks
b) Redundant Array of Important Disks
c) Redundant Allocation of Independent Disks
d) Redundant Array of Independent Disks

Answer: d
Clarification: None.

3. If the mean time to failure of a single disk is 100,000 hours, then the mean time to failure of some disk in an array of 100 disks will be ____________
a) 100 hours
b) 10 days
c) 10 hours
d) 1000 hours

Answer: d
Clarification: None.

4. The solution to the problem of reliability is the introduction of __________
a) aging
b) scheduling
c) redundancy
d) disks

Answer: c
Clarification: None.

5. The technique of duplicating every disk is known as ____________
a) mirroring
b) shadowing
c) redundancy
d) all of the mentioned

Answer: a
Clarification: None.

6. The mean time to failure of a mirrored disk depends on ____________
I) the mean time to failure of individual disks
II) the mean time to repair
a) Only I
b) Only II
c) Both I and II
d) Neither I nor II

Answer: c
Clarification: None.

7. RAID level ________ refers to disk arrays with striping at the level of blocks, but without any redundancy.
a) 0
b) 1
c) 2
d) 3

Answer: a
Clarification: None.

8. RAID level _______ refers to disk mirroring.
a) 0
b) 1
c) 2
d) 3

Answer: b
Clarification: None.

9. RAID level ______ is also known as bit interleaved parity organisation.
a) 0
b) 1
c) 2
d) 3

Answer: d
Clarification: None.

10. A single parity bit can be used for ____________
a) detection
b) multiple error corrections
c) few error corrections
d) all of the mentioned

Answer: a
Clarification: None.

11. RAID level ______ is also known as memory style error correcting code(ECC) organization.
a) 1
b) 2
c) 3
d) 4

Answer: b
Clarification: None.

12. RAID level 3 does not have _________ as in RAID level 1.
a) efficiency
b) enough storage space for data
c) storage overhead
d) time consumption overhead

Answer: c
Clarification: There is one mirror disk for every disk in level 1.

250+ TOP MCQs on Process Structures and Answers

Operating System Multiple Choice Questions on “Process Structures”.

1. The initial program that is run when the computer is powered up is called __________
a) boot program
b) bootloader
c) initializer
d) bootstrap program

Answer: d
Clarification: None.

2. How does the software trigger an interrupt?
a) Sending signals to CPU through bus
b) Executing a special operation called system call
c) Executing a special program called system program
d) Executing a special program called interrupt trigger program

Answer: b
Clarification: None.

3. What is a trap/exception?
a) hardware generated interrupt caused by an error
b) software generated interrupt caused by an error
c) user generated interrupt caused by an error
d) none of the mentioned

Answer: b
Clarification: None.

4. What is an ISR?
a) Information Service Request
b) Interrupt Service Request
c) Interrupt Service Routine
d) Information Service Routine

Answer: c
Clarification: None.

5. What is an interrupt vector?
a) It is an address that is indexed to an interrupt handler
b) It is a unique device number that is indexed by an address
c) It is a unique identity given to an interrupt
d) None of the mentioned

Answer: a
Clarification: None.

6. DMA is used for __________
a) High speed devices(disks and communications network)
b) Low speed devices
c) Utilizing CPU cycles
d) All of the mentioned

Answer: a
Clarification: None.

7. In a memory mapped input/output __________
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready
b) the CPU writes one data byte to the data register and sets a bit in control register to show that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly

Answer: b
Clarification: None.

8. In a programmed input/output(PIO) __________
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready
b) the CPU writes one data byte to the data register and sets a bit in control register to show that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly

Answer: a
Clarification: None.

9. In an interrupt driven input/output __________
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready
b) the CPU writes one data byte to the data register and sets a bit in control register to show that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly

Answer: c
Clarification: None.

10. In the layered approach of Operating Systems __________
a) Bottom Layer(0) is the User interface
b) Highest Layer(N) is the User interface
c) Bottom Layer(N) is the hardware
d) Highest Layer(N) is the hardware

Answer: b
Clarification: None.

11. How does the Hardware trigger an interrupt?
a) Sending signals to CPU through a system bus
b) Executing a special program called interrupt program
c) Executing a special program called system program
d) Executing a special operation called system call

Answer: a
Clarification: None.

12. Which operation is performed by an interrupt handler?
a) Saving the current state of the system
b) Loading the interrupt handling code and executing it
c) Once done handling, bringing back the system to the original state it was before the interrupt occurred
d) All of the mentioned

Answer: d