Operating - System - KCS 401 - Assignment - 2
Operating - System - KCS 401 - Assignment - 2
Unit-1
1. If a cache can be made as large as the device for which it is caching (for
instance, a cache as large as a disk), why not make it that large and
eliminate the device?
Unit-2
1. How does the signal () operation associated with monitors differ from the
corresponding operation defined for semaphore?
2. Consider the dining-philosopher problem where the chopsticks are placed
at the center of the table and any two of them could be used by a
philosopher. Assumes that request for chopsticks are made one at a time.
Describe a simple rule determining whether a particular request could be
satisfied without causing deadlock given the current allocation of
chopsticks to philosophers.
Unit-3
1. Consider a system consisting of m resources of the same type being
shared by n processes. Resources can be requested and released by
processes only one at a time. Show that the system is deadlock free if the
following two conditions hold:
a. The maximum need of each process is between 1 and m resources.
b. The sum of all maximum needs is less than m+n.
2. Consider the following snapshot of the system:
3. What scheduling policy will you use for each of the following case?
Explain your reason for choosing them.
a. Suppose a system uses FCFS scheduling. Create a Gantt chart illustrating the
execution of these processes?
b. What is the turnaround time for process P3?
c. What is average wait time for the processes?
8. Using the problem load in the previous problem suppose a system uses SJN
scheduling.
a. Create a Gantt chart illustrating the execution of these processes?
b. What is the turnaround time for process P4?
c. What is the average wait time for the processes?
9. Assume you have the following jobs to execute with one processor, with the
jobs arriving in the order listed here:
Unit-4
Time of 0 3 7 12 18 25 29
arrival(units)
Processing 5 3 9 10 16 2 8
time(units)
Memory 3 5 8 12 2 6 9
required(units)
2. Consider a system with 80% hit ratio, 50 nanoseconds time to search the
associative register, 750 nanoseconds time to access memory. Find the time to
access a page:
a. When the page number is in associative memory.
b. When the time to access a page when not in associative memory.
c. Find the effective access memory time.
3. Consider the Segment table:
What is the physical address for the following logical address?
a. 0,430 b. 1, 10 c. 1, 11 d. 2,500
342147253613
Starting from the current head position, what is the total distance (in cylinders)
that the disk arm moves to satisfy all the pending requests for each of the
following disk-scheduling algorithm?
a. FCFS
b. SSTF
c. SCAN
d. LOOK
e. C-SCAN
f. C-LOOK
2. Work Queue: 23, 89, 132, 42,187. There are 200 cylinders numbered from 0-
199. The disk starts at number 100.
What is the total distance (in cylinders) that the disk arm moves to satisfy all
the pending requests for each of the following disk-scheduling algorithm?
a. FCFS
b. SSTF
c. SCAN
d. LOOK
e. C-SCAN
f. C-LOOK