Analysis of an Operating System, Computer Organisation
and Architecture Report
Computer Sciences and Information Technology
Analysis of an Operating System, Computer Organisation
and Architecture Report
#1
The process of designing and implementing a mechanism of allowing operating system to detect the starving processes is done by the use of algorithms. The algorithms are designed for detecting starving jobs by tracking how long each job waits for resources. The operating system stops or blocks new jobs after the starvation process (McHoes & Flynn, (2013). The algorithm should be closely monitored to ensure that it performs effectively. The aging process is an important process in design and implementation. The aging process is employed to ensure the lower-level queues complete their execution. The work of the operating system is to track the waiting time of each job. The common algorithms employed in the process are the safe-state algorithm, resource-allocation graph algorithms and banker algorithm. The implementation process also involves the integration of an aging policy that guards against the indefinite postponement of the jobs.
#2
The system can become a deadlock because it fulfills the necessary conditions of becoming a deadlock. The conditions include mutual exclusion, resource holding and no pre-emption as well as the circuit wait. The mutual exclusion is whereby one person or process has access to a step or dedicated resource (Silberschatz, Galvin & Gagne, 2006). In resource two people meet on the stairs and each party waits for the other for the retreat. There is also a lack of temporary relocation of resources and there is an existence of circular wait whereby it defines the existence of steps. The lock A(i) requests and gets it and then updates, lock A(j) requests and gets then updates. Unlock A(i) requests but does not get it and unlock A (j) requests and does not get it. However, by updating the two accounts, the process of locking, updating and unlocking each of the accounts can be completely avoided especially on the assumption that the system can function during the locking of the two accounts.
The numbering request policy can be used in preventing deadlock in dynamic accounts. The policy defines how to handle several accounts (more than 10) by locking, updating and unlocking to prevent deadlock without considering the order of the accounts being processed.
#3
Waiting time is the amount of time that a selected process spends in waiting for the resources especially in I/O devices and affects both the throughput and utilization (Silberschatz, Galvin, & Gagne, 2018). Turnaround time is the time used for measuring the efficiency that is the intended time necessary for job execution and returns the results to the user.
A B C D E
0 3 8 20 32
Average waiting time = 3+5+12+12/4 =8
Average turnaround time = 3+3+8+12/4= 6.5
#4
i) FCFS
Job A= 0-4
Job B= 4-(4+7) =4-11
Job C= 11-(11+3) = 1-14
Job D= 14-(14+15)= 14-29
Job E= 29-(29+1)= 29-30
ii) Round Robin
Job A 0-5, 9-11, 15-17
Job B 5-7, 12-13
Job C 7-(7+3) = 7-10
Job D 10-12, 14-16
Job E 16-28, 21-22
iii) SRT
Job A 0-3 Until 31
Job B 3-(3+8)= 3-11
Job C 11-(11+3)= 11-13
Job D 13- (13+11)=13-24
Job E= 11-(11+21)= 11-23
iv) HRRN
Job A= 0-4
Job B=4-(4+1) = 4-5
Job C= 5-(5+3) = 5-8
Job D= 8-(8+7) = 8-15
Job E= 15-15(15) = 15-30
#5
a) Yes, the system is deadlocked
b) The processes which are blocked are R2 to P2, R2 to P1, and R3 to P2 processes
c)
References
McHoes, A., & Flynn, I. M. (2013). Understanding operating systems. Cengage Learning.
Silberschatz, A., Galvin, P. B., & Gagne, G. (2018). Operating system concepts. Hoboken, N.J: Wiley.
Silberschatz, A., Galvin, P. B., & Gagne, G. (2006). Operating system principles. Hoboken, NJ: J. Wiley & Sons.