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: ###

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 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

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order