Question 56
A counting semaphore S is initialized to 5. If 8 wait operations and 6 signal operations are performed on S, what is the value of S?
$Initial S = 5. Net change = -8 + 6 = -2. Final S = 5 - 2 = 3.$
A counting semaphore S is initialized to 5. If 8 wait operations and 6 signal operations are performed on S, what is the value of S?
$Initial S = 5. Net change = -8 + 6 = -2. Final S = 5 - 2 = 3.$
A disk pack has 16 recording surfaces. Each surface has 512 tracks, and each track has 256 sectors. Each sector stores 512 bytes of data. What is the TOTAL storage capacity of the disk pack in Megabytes (MB)? (Set 4)
Total capacity = 16 * 512 * 256 * 512 = 1,073,741,824 bytes = 1024 MB.
Which of the following statements about Semaphores are CORRECT?
Counting semaphores range over non-negative integers; binary semaphores are 0/1; wait() decrements S; signal() increments S.
In operating system storage architecture, what is defined as 'Bad Block'? (Set 28)
Definition of Bad Block: A defective sector on disk managed by sector sparing or sector slipping.
Consider 2 processes arriving at t=0: P1 (burst 8) and P2 (burst 4). Using Preemptive SRTF scheduling, P2 arrives at $t=0$ and P1 at $t=0$. What is the waiting time (in ms) of P1?
P2 has shorter burst (4) than P1 (8). P2 executes from 0 to 4 and finishes. Then P1 executes from 4 to 12.
Waiting time of P1 = 4 - 0 = 4 ms.