Microprocessors and OS Assignment 1 and 2
Microprocessors and OS Assignment 1 and 2
QUESTION 1
i) First Fit
ii) Best Fit
iii) Worst Fit
iv) Next Fit [10 marks]
Question 2
a) What is deadlock? What is starvation? How do they differ from each other?
[5 marks]
Use the Bankers algorithm to check if the system is in a safe state and specify the safe execution
sequence that you discovered (if any). [11 marks]
e) Assuming the operating system detects the system is deadlocked, what can the operating
system do to recover from deadlock? [3 marks]
[TOTAL MARKS: 25]
ASSIGNMENT 2
Question 1
b) Draw and label the Register Architecture diagram of the Intel 8085Microprocessor.
[9 marks]
c) Explain the uses of all the registers of the Intel 8085 [6 marks]
[TOTAL MARKS: 25]
Question 2
a) What must the banker’s algorithm know a priori in order to prevent deadlocks? [3 marks]
i) Draw a Gantt chart showing FCFS scheduling for these jobs. [4 marks]
v) Which of the foregoing scheduling policies provides the lowest waiting time for this set of
jobs? What is the waiting time with this policy? (Show your working) [3 marks]
[TOTAL MARKS: 25]