Operating System (Minor) (Csmi-301) DR B R Ambedkar National Institute of Technology, Jalandhar Solve All The Questions
Operating System (Minor) (Csmi-301) DR B R Ambedkar National Institute of Technology, Jalandhar Solve All The Questions
18. An operating system uses shortest remaining time first scheduling algorithm for pre
emptive scheduling of processes. Consider the following set of processes with their
arrival times and CPU burst times (in milliseconds):
Process Arrival Time Burst Time
P1 0 12
P2 2 4
P3 3 6
P4 8 5
Find the average waiting time (in milliseconds) of the processes is.
19. Consider the following processes, with the arrival time and the length of the CPU
burst given in milliseconds. The scheduling algorithm used is preemptive shortest
remaining time first.
20. Consider the following CPU processes with arrival times (in milliseconds) and length
of CPU bursts (in milliseconds) except for process P4 as given below: Process Arrival
Time Burst Time
P1 0 5
P2 1 1
P3 3 3
P4 4 x
If the average waiting time across all processes is 2 milliseconds and pre-emptive
shortest remaining time first scheduling algorithm is used to schedule the processes,
then find the value of x ?
21. A system has four processes and five allocatable resources. The current allocation and
maximum needs are as follows:
Allocated Maximum Available
Process A 1 0 2 1 1 1 1 2 1 3 0 0 x 1 1
Process B 2 0 1 1 0 2 2 2 1 0
Process C 1 1 0 1 0 2 1 3 1 0
Process D 1 1 1 1 0 1 1 2 2 1
The smallest value of x for which the above system in safe state is __________.
22. Explain Earliest-Deadline-First Scheduling with proper example. 23. Consider the
following table of arrival time and burst time for three processes P0, P1 and P2.
Process Arrival time Burst Time
P0 0 ms 9 ms
P1 1 ms 4 ms
P2 2 ms 9 ms
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried
out only at arrival or completion of processes. What is the average waiting time for the
three processes?
24. Explain Rate-Monotonic Scheduling with proper example.
25. Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125
KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes
of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? Rank the
algorithms in terms of how efficiently they use memory.
26. Compare the memory organization schemes of contiguous memory allocation, pure
segmentation, and pure paging with respect to the following issues:
a. External fragmentation
b. Internal fragmentation
27. Consider a logical address space of 256 pages with a 4-KB page size, mapped onto a
physical memory of 64 frames.
a. How many bits are required in the logical address?
b. How many bits are required in the physical address?
28. Consider the following page reference string: 7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6,
2, 3, 0 , 1 Assuming demand paging with three frames, how many page faults would
occur for the following replacement algorithms?
a. LRU replacement
b. FIFO replacement
c. Optimal replacement
29. What is the purpose of system calls?
30. What is the main advantage of the layered approach to system design? What are the
disadvantages of the layered approach?
Submission Date: 27/11/2020