In: Computer Science
Question 1:
On a disk with 1000 cylinders, number 0 to 999, compute the number of tracks the disk arm must move to satisfy all the requests in the disk queue. Assume the last request serviced was at track 345 and the head is moving toward track 0. The queue in FIFO order contains requests for the following tracks: 123, 847, 692, 475, 105, 376.
Perform the computations for the following disk scheduling algorithms:
a) FCFS
b) SSTF
c) SCAN - Increasing Track
d) C-SCAN - increasing Track
e) LOOK - increasing Track
Question 2:
Considering a system with five processes P0 through P4 and three resources of type A, B, C. Resource type A has 10 instances, B has 5 instances and type C has 7 instances. Suppose at time t0 following snapshot of the system has been taken:
a) What will be the content of the Need matrix?
b) Is the system in a safe state? If Yes, then what is the safe sequence?
Q1
Please verify that the request order is valid or not. Since the question is a well known one, it must be 123, 874, 692, 475, 105, 376. The track number which might be different is underlined. Moreover, please let me know that the meaning of "increasing track" is same as I have given in the solution. If it is something else then please let me know in the comments, I will change the solution. Also, if there is any part for which the answer does not match please let me know in the comments, I will try to provide you a new solution for that part.
Q2
Your question was incomplete but since you have given the total number of resources I got hint what the question might be since the question is well known. If the question is something else please let me know.