Operating Systems hw

User Generated

9527666_

Computer Science

Description

  • Please use Shortest-Job-First (SJF) Scheduling algorithm to schedule the following processes: write the gantt chart of the schedule and calculate waiting time of each process. Assume all the processes come at time 0
  • 1. If processes arrive at the times shown and need the indicated burst times, please use Shortest-remaining-time-first algorithm to schedule these processes and calculate waiting time of each process. The rate-monotonic scheduling algorithm schedules periodic tasks using a static priority policy with preemption. (A priority is assigned based on the inverse of the process’ period: shorter period=higher priority and longer period=lower priority) We have two process P1 and P2. The process P1 has a period of p1=50 and a CPU bust of t1=30; the process P2 has a period of p2=80 and a CPU burst time of t2=40. The deadline for each process requires that it complete its CPU burst by the start of its next period. Now we have 100 time slices, please use the rate-monotonic algorithm to schedule these two process P1 and P2; point out whether these two processes complete their first tasks before their first deadline; finger out the number of context switches.

Unformatted Attachment Preview

Assignment II (due to April 12 Friday 12pm) 1. Please use Shortest-Job-First (SJF) Scheduling algorithm to schedule the following processes: write the gantt chart of the schedule and calculate waiting time of each process. Assume all the processes come at time 0 Process Burst time P1 15 P2 8 P3 10 P4 18 Answer: 2. If processes arrive at the times shown and need the indicated burst times, please use Shortest-remaining-timefirst algorithm to schedule these processes and calculate waiting time of each process. Process Answer: Arrival Time Burst Time 𝑃1 0 10 𝑃2 1 15 𝑃3 2 7 𝑃4 3 5 3. The rate-monotonic scheduling algorithm schedules periodic tasks using a static priority policy with preemption. (A priority is assigned based on the inverse of the process’ period: shorter period=higher priority and longer period=lower priority) We have two process P1 and P2. The process P1 has a period of p1=50 and a CPU bust of t1=30; the process P2 has a period of p2=80 and a CPU burst time of t2=40. The deadline for each process requires that it complete its CPU burst by the start of its next period. Now we have 100 time slices, please use the rate-monotonic algorithm to schedule these two process P1 and P2; point out whether these two processes complete their first tasks before their first deadline; finger out the number of context switches. Answer:
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Attached.

Assignment II (due to April noon Friday)
1.

Please use Shortest-Job-First (SJF) scheduling algorithm to schedule the following processes: write the Gantt
chart of the schedule and calculate the waiting time of each process. Assume all the methods come at time 0
Process

Burst time

P1

15

P2

8

P3

10

P4

18

Answer:

P2
0

P3
8

2.

P1

P4

18

33

51

If processes arrive at the times shown and need the indicated burst times, please use Shortest-remaining-timefirst algorithm to schedule these processes and calculate the waiting time of each method.
Process

Arrival Time

Burst Time

𝑃1

0

10

𝑃2

1

15

𝑃3

2

7

𝑃4

3

5

Answer:

P1
0

P2
1

P4
5

P1
10

P3
17

(10-1) + (1-1) + (...


Anonymous
Really helped me to better understand my coursework. Super recommended.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags