Operating system Questions(2 questions) Reliable Assignment Help

  

Question Description

See attachment for questions. Incomplete , wrong, low quality answers won’t be accepted

attachment.doc 

Unformatted Attachment Preview

Question 1. Consider the following process arrival list:
Name
A
B
C
D
E
F
G
Arrival Time
0
3
5
7
11
13
21
Service Time
4
9
2
5
3
1
4
Consider the following scheduling methods:
(a) First-come first-served (FCFS)
(d) Round-robin (RR), quantum = 1
(b) Shortest-job first (SJF)
(e) Round-robin (RR), quantum = 5
(c) Shortest remaining time first (SRTF)
Draw a Gantt chart (time line) showing which process is executing over time and
calculate the average waiting time for each process.
Notes : (1) In SRTF, if a job arrives whose service time is equal to the remaining service
time of the job currently being served, the current job is not interrupted. (2) In RR, if a
process arrives at the same time a quantum finishes, the running process is preempted and
the new arrival executes. When a process gets interrupted by a new arrival, it goes to the
end of the ready queue. (3) Waiting time is the sum of the periods spent waiting in the
ready queue.
Question 2. Multilevel queues use multiple queues with different priorities as shown in
the diagram below. The scheduler first executes all processes in Q0. Only when Q0 is
empty will it execute processes in Q1, and only when Q0 and Q1 are empty will it execute
processes in Q2. A process arriving for Q0 will preempt a process in Q1 or Q2, and a
process arriving for Q1 will preempt a process in Q2; a process preempted in this case is
put back to the head of the same queue and next time when the scheduler execute this
process it can still execute for the remaining of its allocated time quantum. A process
entering the ready queue is put in Q0 and is given a time quantum of 8 milliseconds. If it
does not finish within this time, it is preempted and moved to the tail of Q1. If Q0 is
empty, the process at the head of Q1 is given a time quantum of 16 milliseconds. If it does
not finish within this time, it is preempted and moved to the tail of Q2. Processes in Q2
are run on an FCFS basis.
Q0
Q1
Q2
Given the following arrival time and CPU burst of processes A, B, C, D, and E as shown
in table below.
Task
A
B
C
D
E
Arrival Time
0
5
19
25
36
Service Time
25
28
11
19
33
a) Show the status of each queue along the time line during the running of the system.
You only need to show the status of the system when either 1) a new process arrives, or
2) a process is preempted, or 3) a process terminates. The status includes time stamp, the
name of the process and its remaining time in each queue. For example, at time 0, process
A is in Q0 and it has 25 time units toward finishing. Q1 and Q2 are empty. You are asked
to complete the table with time moment and status of each queue. Moreover, B(x) A(y)
shows A is at the head of the queue and B is at the tail of the queue. You can add new
rows to the table if you think the table is not enough to accommodate all the events.
Time
0
Q0
Q1
Q2
A(25)

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.

  

Leave a Comment

Your email address will not be published.