operating system
I want this to be solved today please
Pg. 04 |
Question Four |
Assignment 2
Deadline: Day 04/03/2018 @ 23:59
[Total Mark for this Assignment is 4]
OPERATING SYSTEMS
IT241
College of Computing and Informatics
Question One
5 Marks
Learning Outcome(s):
Describe the OS mechanism for process management, timing, memory, I/O, file and concurrency management.
1. Given the following set of processes and the length of the CPU burst given in milliseconds, show how these processes are scheduled according to Round Robin scheduling. Use a time quantum of 2 milliseconds.
Process
Burst Time (ms)
P1
5
P2
4
P3
2
P4
3
a) Draw the Gantt-chart for the scheduling algorithm. Inside each box, write the name of the process and specify the start and end of each scheduled time below.
[2 Marks]
b) Calculate the average waiting time? [2 Marks]
c) Which process has the longest waiting time? [1 Marks]
Question Two
5 Marks
Learning Outcome(s):
Describe the OS mechanism for process management, timing, memory, I/O, file and concurrency management.
Given the following set of processes and the length of the CPU burst given in milliseconds:
Process
Burst Time (ms)
P1
5
P2
4
P3
2
P4
3
P5
7
a. Draw the Gantt-chart for the above processes using Shortest Job First Scheduling algorithm. [2 Marks]
b. Calculate the average waiting time? [2 Marks]
c. Which process has the longest waiting time? [1 Marks]
Question Three
5 Marks
Learning Outcome(s):
Describe the OS mechanism for process management, timing, memory, I/O, file and concurrency management.
a. What is a race condition? Explain with example. [3 Marks]
b. What do you mean by counting semaphore? [2 Marks]
Question Four
5 Marks
Learning Outcome(s):
Describe the OS mechanism for process management, timing, memory, I/O, file and concurrency management.
What are the disadvantages of Peterson’s solution for critical-section problem? Code below shows the solution to two process mutual exclusion problem.
Process Pi
do {
flag[i] = true;
turn = j;
while (flag[j] && turn == j);
critical section
flag[i] = false;
remainder section
} while (true);
Process Pj
do {
flag[j] = true;
turn = i;
while (flag[i] && turn == i);
critical section
flag[j] = false;
remainder section
} while (true);
Answer True or False to the following questions:
(i) This algorithm satisfies the “mutual exclusion”, “progress” and “bounded waiting” condition.
ii) This algorithm has a flaw as the variable “turn” can be modified by both processes at the same time.
iii) This algorithm may cause “deadlock” if both processes set their flags to True at the same time.
iv) This algorithm satisfies only the “mutual exclusion” and “progress” condition.
College of Computing and Informatics
Assignment
2
[Total Mark for this Assignment is
4
]
Student Details:
Name:
###
CRN
:
###
ID:
###
College of Computing and Informatics
Assignment 2
[Total Mark for this Assignment is 4]
Student Details:
Name: ###
CRN: ###
ID: ###
Top-quality papers guaranteed
100% original papers
We sell only unique pieces of writing completed according to your demands.
Confidential service
We use security encryption to keep your personal data protected.
Money-back guarantee
We can give your money back if something goes wrong with your order.
Enjoy the free features we offer to everyone
-
Title page
Get a free title page formatted according to the specifics of your particular style.
-
Custom formatting
Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.
-
Bibliography page
Don’t pay extra for a list of references that perfectly fits your academic needs.
-
24/7 support assistance
Ask us a question anytime you need to—we don’t charge extra for supporting you!
Calculate how much your essay costs
What we are popular for
- English 101
- History
- Business Studies
- Management
- Literature
- Composition
- Psychology
- Philosophy
- Marketing
- Economics