Professional Documents
Culture Documents
applications (multiple processors at the same to speed up their computation). Recall that the
default Linux scheduler uses one ready queue per processor, with each processor making
independent scheduling decisions by picking processes to execute from its own ready queue.
How do you change this default design to improve the performance of the system?
2) Look at the set of instructions given below. Which of the following instructions should be
privileged and only allowed to execute in kernel mode? Briefly justify your answer.
a) Load a value from a memory address to a general-purpose register.
b) Halt the CPU.
3)
Consider the following set of jobs. What would be the average waiting time and turnaround
time if the following scheduling policies are used: (i) Shortest- Remaining- Time- First (ii)
Round Robin Scheduling? Show the Gantt chart and all calculations. Assume Time
quantum is 3 units. Ignore the context switch time.
P1 9 1
P2 12 0
P3 3 3
P4 8 4
4) Consider there are four students staying in a drawing room. As a part of an assignment,
they need to draw a diagram. For this, they have four resources namely: A pencil, A Pen, A
sharpener and an eraser.
All the students are trying to complete the homework by drawing the diagram. The students
are named as S1, S2, S3 and S4.
5) Consider a scenario in which a set of philosophers are waiting for the operations. For
successful completion of operation, every philosopher requires two resources. Develop
pseudocode / algorithm for the following operations.
(II) Consider a swapping system in which memory consists of the following block sizes in
memory order: 10 KB, 4 KB, 20 KB, 18 KB, 7 KB, 9 KB, 12 KB, and 15 KB.
For first fit, identify the hole that is taken for successive segment requests of
(a) 8 KB
(b) 12 KB
(c) 7 KB
7) Suppose there are, files named pgm1, stack, count, home, trsh, host, web. Suppose the file
named ‘stack’ is starting from the 12th block and the length of the file is 8. Illustrate it is
with contiguous and indexed allocation scheme.