Professional Documents
Culture Documents
i) READY
ii) ALE
iii) IO/M
iv) HOLD
v) SID and SOD
b. Write the Assembly language program to sort a set of numbers in Ascending order?
a) With suitable examples explain how I/O devices are connected using memory mapped
I/O and peripheral I/O.
a) Draw a clearly and neatly labeled diagram of the von Neumann architecture of
computer systems. [10 marks]
Page 1 of 6
assuming one, two, three, four, six, or seven frames?
(a) LRU Replacement
(b) FIFO Replacement
(c) Optimal Replacement
a) Compare and contrast deadlock and starvation. Show how they differ from each other.
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).
e) Assuming the operating system detects the system is deadlocked, what can the operating
system do to recover from deadlock?
a) What must the banker’s algorithm know a priori in order to prevent deadlocks?
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)
LDA 4100H
MOV A, B
MOV A, M
CMP
RAL
RAR
c) Give 2 examples of each of the following different categories of instructions for the
Intel 8085
Page 3 of 6
c) i) ADO-AD7
d) ii) S0, S1
e) iii) RD
f) iv) INTR
g) v) INTA
a) What are the two types of memory fragmentation and why should fragmentation be
avoided?
b) One of the key design decisions in OS memory management is the choice between paging
and segmentation. Compare and contrast these two approaches to memory management,
making sure to identify the strengths and weaknesses of each. Define each of these terms, and
clarify their respective roles in OS memory management.
c) In pure on-demand paginga page replacement policy is used to manage system resources.
Suppose that a newly-created process has 3 page frames allocated to it, and then generates the
page references indicated below:
ABCBADABCDABACBD
i) How many page faults would occur with FIFO page replacement?
ii) How many page faults would occur with LRU page replacement?
iii) How many page faults would occur with OPT page replacement?
a) Describe a real-life operating system scenario in which the use of Peterson’s two
process mutual exclusion is of importance
b) From the above, in a language of your choice, solve the problem noted above using
semaphores
c) Assume you are operating a distributed system environment, illustrate how you would
use the Lamport’s algorithm for synchronization as a way of achieving mutual
exclusion.
Page 4 of 6
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)
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)
a) Explain the interrupt structure of 8085?
i) TRAP
ii) RST 7.5
iii) RST 6.5
iv) RST 5.5
v) INTR
b) An operating system contains three resource classes, namely R1, R2 and R3. The number
of resource units in these classes is 7, 7 and 10 respectively. The current resource allocation
state is as shown below:
a) List all the different categories of instructions for the Intel 8085 Microprocessor
giving an example for each category.
c) Using the Intel 8085 instruction set, write an assembly program to find greatest between
two numbers.
Page 6 of 6