Exam OS 2 - Ready!
Exam OS 2 - Ready!
Exam OS 2 - Ready!
a. Mutual exclusion
b. Hold and wait
c. No preemption
d. Circular wait
e. None of above
a. Deadlock Prevention
b. Deadlock Avoidance
c. Deadlock Detection and Recovery
d. Deadlock Ignorance
e. None of above
(b) 6. A computer provides the user with virtual address space of 2^32
(2 to the power 32) bytes. Pages of size 4096 (4K or 2^12) bytes
are used for implementing virtual memory where the total physical
memory is equal to 2^18 bytes. If the hexadecimal virtual
address is 23456111, the page number in hexadecimal would be:
a. 3456
b. 23456
c. 56111
d. 4096
(c) 7. In paging system where page size is 2048 words, and the available
physical memory is equal to 2 ^ 17 = 128 K words, the length of the
physical address is equal to:
(c) 11. If there are 64 segments, and the maximum segment size is 1024
words, the length of logical address is:
Ans:
Ans:
Ans:
+---+-----+------+--------+--------+-----+--+
|xxx| P3 | xxxx | P5 | xxxxxx | P7 |xx|
+---+-----+------+--------+--------+-----+--+
0 50 160 240 320 420 480 500
Note that P3, P5, and P7 are processes in memory. Assume that process
P3 was just swapped into memory. Consider each of the four swapping
algorithms discussed in class: first fit, best fit and worst fit,
Complete the table showing where each of the processes will be
loaded.
Assume that new processes arrive in the order P8, P9, P10, and are of
size 50K, 70K, and 45K, respectively.
Ans:
First fit:
+---+-----+----+-+--------+---+----+-----+--+
|P8 | P3 | P9 |x| P5 |P10| xx | P7 |xx|
+---+-----+----+-+--------+---+----+-----+--+
0 50 160 230 240 320 365 420 480 500
Best fit:
+---+-----+----+-+--------+---+----+-----+--+
|P8 | P3 | P9 |x| P5 |P10| xx | P7 |xx|
+---+-----+----+-+--------+---+----+-----+--+
0 50 160 230 240 320 365 420 480 500
Worst fit:
+---+-+-----+----+-+--------+---+----+-----+--+
|P10|x| P3 | P9 |x| P5 |P8 | xx | P7 |xx|
+---+-+-----+----+-+--------+---+----+-----+--+
0 45 50 160 230 240 320 370 420 480 500
Ans:
Ans:
Ans:
b) 110 - 50 * p < 70
50 * p > 40
p > 80%