You are on page 1of 5

DEPARTMENT OF ACCOUNTING AND INFORMATION SYSTEMS

MASTER OF COMMERCE DEGREE PART 1 SEMESTER 1

MICROPROCESSORS AND OPERATING SYSTEMS


ASSIGNMENT 1: DUE DATE 27 September 2023

QUESTION 1

a. Describe the following allocation algorithms in memory management;

i) First Fit
ii) Best Fit
iii) Worst Fit
iv) Next Fit [10 marks]

b) Suppose a disk queue with requests for I/O to blocks on cylinders:-


10, 100, 175, 50, 120, 120, 20, 150, 75, 200.
If the disk head is currently at 60, find out the total disk head movement for
The following algorithm:-
i) FCFS
ii) SSTP
iii) SCAN
iv) LOOK
v) C-SCAN [15 marks]
[TOTAL MARKS: 25]

Question 2

a) What is deadlock? What is starvation? How do they differ from each other?
[5 marks]

a) What are the four conditions necessary for a deadlock? [2 marks]

b) Describe four general strategies for dealing with deadlocks. [4 marks]


d) Consider five processes P0 through P4; and three resources A (10 instances), B (5 instances),
and C (7 instances). Consider the following snapshot of a system:
Allocation Need Available
ABC ABC ABC
P0 010 743 230
P1 302 020
P2 302 600
P3 211 011
P4 002 431

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

DUE DATE: 15 OCTOBER 2023

Question 1

a) Explain the function of the following pins of 8085 microprocessor


i) ALE
ii) IO/_
iii) READY
iv) HOLD [10 marks]

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]

b) Consider the following set of jobs to be scheduled for execution on a single


CPU system.
Job Arrival Time Size (msec) Priority
J1 0 10 2 (Silver)
J2 2 8 1 (Gold)
J3 3 3 3 (Bronze)
J4 10 4 2 (Silver)
J5 12 1 3 (Bronze)
J6 15 4 1 (Gold)

i) Draw a Gantt chart showing FCFS scheduling for these jobs. [4 marks]

ii) Draw a Gantt chart showing (non-preemptive) SJF scheduling. [5 marks]

iii) Draw a Gantt chart showing non-preemptive PRIORITY scheduling. [5 marks]

iv) Draw a Gantt chart showing preemptive PRIORITY scheduling. [5 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]

You might also like