Skip to content
GK24
Computer AwarenessMedium

The situation in which two processes each hold a resource the other needs and neither can proceed is called

  1. A.Thrashing
  2. B.Deadlock
  3. C.Spooling
  4. D.Fragmentation

Correct answer

B. Deadlock

Explanation

The correct answer is B, deadlock. Deadlock is the state in which every process in a set is waiting for a resource that another process in the same set is holding, so none of them can ever move forward without the operating system stepping in. It needs mutual exclusion, hold and wait, no pre-emption and circular wait to occur together.

Option A, thrashing, is a different problem: it happens when the system spends nearly all its time swapping pages between disk and memory and almost none doing useful work. Option C, spooling, is a useful technique, not a fault; output meant for a slow device such as a printer is queued on disk so the processor is not held up. Option D, fragmentation, is the scattering of free memory or disk space into small unusable pieces, which wastes space but does not stop processes from running.

Read the full article: Software and Operating Systems: Types, Functions and MCQs

View all
Q3.Computer AwarenessMedium

Which scheduling algorithm allots a fixed time slice to every process in rotation and is therefore used in time sharing systems?

  1. A.First Come First Served
  2. B.Shortest Job First
  3. C.Round Robin
  4. D.Priority scheduling
Show answer
Correct answer: C. Round Robin

In Round Robin scheduling every ready process is given the processor for a fixed period called the time quantum, and when that period expires the process is moved to the back of the queue and the next one is served.