0% found this document useful (0 votes)
28 views2 pages

A3 Statement

The document provides instructions for an assignment on operating systems principles. It includes 4 questions related to readers/writers problem, priority-based scheduling, discrimination of short processes by scheduling algorithms, and atomicity of semaphore operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views2 pages

A3 Statement

The document provides instructions for an assignment on operating systems principles. It includes 4 questions related to readers/writers problem, priority-based scheduling, discrimination of short processes by scheduling algorithms, and atomicity of semaphore operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

COMSATS University Islamabad (Lahore Campus)

Assignment <3>– Spring 2024


Course Title: Principles of Operating Systems Course Code: CSC323 Credit Hours: 4(3,1)
Course Instructor: Nadeem Ghafoor Chaudhry Programme Name: BCS
Due Date: Monday, April 15th 2024 Maximum Marks: 45
Important Instructions / Guidelines:

Answer all questions in your own handwriting. Submit both softcopy and hardcopy.

Question No 1. Marks: 10
CLO: <2>; Bloom Taxonomy Level: < Analyzing >
We studied Readers/Writers problem in chapter 7. One basic problem with the
solution provided was that it was biased in favour of readers, i.e once a reader
enters the system it allows other readers to join regardless of if a writer has been
waiting indefinitely. In other words, it is violating the Bounded Waiting
condition. Modify the algorithm such that this bias is removed.

Question No 2. Marks: 15
CLO: <2>; Bloom Taxonomy Level: < Analyzing >
The following processes are being scheduled using a preemptive, priority-based,
round-robin scheduling algorithm.

Process Priority Burst Arrival


P1 8 15 0
P2 3 20 0
P3 4 20 20
P4 4 20 25
P5 5 5 45
P6 5 15 55

Each process is assigned a numerical priority,with a higher number


indicating a higher relative priority. The scheduler will execute the
highest priority process. For processes with the same priority, a round-
robin scheduler will be used with a time quantum of 10 units. If a process
is preempted by a higher-priority process, the preempted process is
placed at the end of the queue.
a. Show the scheduling order of the processes using a Gantt chart.
b. What is the turnaround time for each process?
c. What is the waiting time for each process?

Question No 3. Marks: 15
CLO: <2>; Bloom Taxonomy Level: < Analyzing >
Explain the how the following scheduling algorithms discriminate either in
favor of or against short processes:
a. FCFS
b. RR
c. Multilevel feedback queues

Question No 4. Marks: 5
CLO: <2>; Bloom Taxonomy Level: < Analyzing >
Show that, if the wait() and signal() semaphore operations are not executed
atomically, then mutual exclusion may be violated.

You might also like