CS FundamentalsVery hardGATE CS (PYQ pattern)
A disk head is at cylinder 50 at t = 0, moving towards higher cylinders, and needs 1 time unit per cylinder (service itself is instantaneous). The LOOK policy keeps going in the current direction while there is a pending request ahead, reverses only when nothing is ahead, and serves requests the moment the head is on their cylinder. Requests (arrival time, cylinder): (0,60), (0,30), (5,70), (8,40), (15,20), (20,90). What is the sum of the waiting times (service time minus arrival time) of all six requests?
- A. 342
- B. 307
- C. 322
- D. 367
Correct answer: C. 322
Simulating the head movement step by step gives service times that sum to a total wait of 322 (the run ends at t = 110).
More Operating Systems questions
- Round Robin with quantum 3 ms, three processes arriving at t = 0 with bursts (CPU, I/O, CPU) in ms: P0 (5, 4, 4), P1 (3, 6, 3), P2 (6, 2…
- Process P0 has 4 pages, each in its own frame. Copy-on-write fork is used (a frame is copied only when written while shared; a written…
- Shared x = y = 0. Thread 1: x = 1; y = 1. Thread 2: r1 = y; r2 = x. Thread 3: x = 2; r3 = x. Under sequential consistency, how many…
- A Unix file system contains only these names: directories /, /a, /a/b and /c, a regular file /a/f, and /c/g, which is a hard link to /a/f…
- A user-mode process accesses virtual pages with page-table entries (present, writable, user-accessible): page 0 (1,1,1), page 1 (1,0,1)…
- Locks are ordered L1 < L2 < L3 < L4 and every thread must acquire locks in increasing order. A thread acquires locks in the following…