Q1) (4 marks) In a simple priority-driven pre-emptive scheduler, three periodic tasks T1, T2, and T3 and two background (BG) tasks T4 and T5 are scheduled. The periodic task T1 has the highest priority, executes once every 20 ms, and requires 5 ms of execution time. The periodic task T2 requires 5 ms of execution time every 50 ms. The periodic task T3 requires 5 ms of execution time every 100 ms. The BG T4, and T5 each requires 100 ms of execution time. Assume all tasks start at time 0 ms. (1) Determine the time T4 and T5 will complete. (2) Draw the chart. 05 Q2) (3.5 marks) Table below shows the mapping between process requests (PO → P3) and resource allocation (A, B, and C resources). A has 5 instances, B has 1, and C has 5 instances. Allocation Request Available A B C A B C A B C PO 0 1 0 0 0 0 0 0 0 P1 2 0 0 2 0 2 P2 3 0 3 0 1 0 P3 0 0 2 0 0 2 (1) Is there a sequence for processes that will allow deadlock to be avoided? If yes, what is it? (2) If P2 increases its request for C resources by 2 more, what will the sequence be, if any?

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter11: Operating Systems
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question
Please do fast and solve both parts
Q1) (4 marks)
In a simple priority-driven pre-emptive scheduler, three periodic tasks T1, T2, and T3 and two background
(BG) tasks T4 and T5 are scheduled. The periodic task T1 has the highest priority, executes once every 20
ms, and requires 5 ms of execution time. The periodic task T2 requires 5 ms of execution time every 50 ms.
The periodic task T3 requires 5 ms of execution time every 100 ms. The BG T4, and T5 each requires 100 ms
of execution time. Assume all tasks start at time 0 ms.
(1) Determine the time T4 and T5 will complete.
(2) Draw the chart.
05
Q2) (3.5 marks)
Table below shows the mapping between process requests (PO → P3) and resource allocation (A, B, and C
resources). A has 5 instances, B has 1, and C has 5 instances.
Allocation
Request
Available
A
B
C
A
B
C
A
B
C
PO
0
1
0
0
0
0
0
0
0
P1
2
0
0
2
0
2
P2
3
0
3
0
1
0
P3
0
0
2
0
0
2
(1) Is there a sequence for processes that will allow deadlock to be avoided? If yes, what is it?
(2) If P2 increases its request for C resources by 2 more, what will the sequence be, if any?
Transcribed Image Text:Q1) (4 marks) In a simple priority-driven pre-emptive scheduler, three periodic tasks T1, T2, and T3 and two background (BG) tasks T4 and T5 are scheduled. The periodic task T1 has the highest priority, executes once every 20 ms, and requires 5 ms of execution time. The periodic task T2 requires 5 ms of execution time every 50 ms. The periodic task T3 requires 5 ms of execution time every 100 ms. The BG T4, and T5 each requires 100 ms of execution time. Assume all tasks start at time 0 ms. (1) Determine the time T4 and T5 will complete. (2) Draw the chart. 05 Q2) (3.5 marks) Table below shows the mapping between process requests (PO → P3) and resource allocation (A, B, and C resources). A has 5 instances, B has 1, and C has 5 instances. Allocation Request Available A B C A B C A B C PO 0 1 0 0 0 0 0 0 0 P1 2 0 0 2 0 2 P2 3 0 3 0 1 0 P3 0 0 2 0 0 2 (1) Is there a sequence for processes that will allow deadlock to be avoided? If yes, what is it? (2) If P2 increases its request for C resources by 2 more, what will the sequence be, if any?
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning