Answer & Explanation:See attachment for questions. Incomplete , wrong, low quality answers won’t be acceptedattachment.doc
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)
—
—
…
Purchase answer to see full
attachment
You will get a plagiarism-free paper and you can get an originality report upon request.
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more