Group Project Part A

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

CSC520:

Group Project (Part A)


Prepared by: Dr Noor Latiffah Adam
Q1: Deadlock

Consider the following information about resources in a system:


– There are three classes of allocatable resources labeled R1, R2 and R3.
– There are three instances of each resource.
– There are four processes labeled P1 through P4.
– There are some resource instances already allocated to processes as follows:
▪ One instance of R1 held by P2, another held by P3
▪ One instance of R2 held by P1, another held by P4
▪ One instant of R3 held by P3
– Some processes have requested additional resources as follows:
▪ P1 wants one instance of R1 and one instance of R3
▪ P3 wants one instance of R2

a. Draw the resource allocation graph for this system.


b. Are the processes having a deadlock? If no, give the safe sequence.
Q2: Memory Management

Given five memory partitions of 100KB, 500KB, 200KB, 300KB, and


600KB (in order), how would the first-fit, best-fit and worst-fit
algorithms place processes of 212KB, 417KB, 112KB, and 426KB (in
order)?

Which algorithm makes the most efficient use of memory?


Q3: Virtual Memory

a. Under what circumstances does page fault occur? Describe the actions
taken by the operating system when a page fault occurs.
b. Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
How many page faults would occur for the following replacement
algorithms, assuming three and four frames? Remember that all frames are
initially empty, so your first unique pages will cost one page fault each.
o LRU replacement
o FIFO replacement
o Optimal replacement

Compare the number of page faults for each algorithm.


Q4: I/0 System

How can the operating system be designed so that we can attach new
devices to the computer without rewriting the operating system? And
when the devices vary so widely, how can the operating system give a
convenient, uniform I/O interface to applications?
Q5: File System Implementation

▪ Explain the purpose of the open() and close() operations.


▪ What are the characteristics that make disks a convenient medium
for storing multiple files?
Submission

▪ Week 13: July 3rd – 9th, 2023


▪ Hard deadline (July 9th, 11.59
PM)
▪ MsTeams

You might also like