Consider the following snapshot of a system:
Allocation | Max | Available | |
---|---|---|---|
A B C D | A B C D | A B C D | |
P0 | 2001 | 4212 | 3321 |
P1 | 3121 | 5252 | |
P2 | 2103 | 2316 | |
P3 | 1312 | 1424 | |
P4 | 1432 | 3665 |
Answer the following questions using the banker’s algorithm:
a. Illustrate that the system is in a safe state by demonstrating an order in which the processes may complete.
b. If a request from process P1 arrives for (1, 1, 0, 0), can the request be granted immediately?
c. If a request from process P4 arrives for (0, 0, 2, 0), can the request be granted immediately?
Assume your computer clock runs at the speed of 2.5 GHz (G=10^9).
a. what is the clock cycle time of your computer? Reduce your answer to the final value in microseconds.
b. what is the number of clock cycles in one milisecond?
c. if the the execution time of a program on average is 100 X 10^-3 millisceonds, how many programs can the computer execute in one second?