Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
518 views
in Computer by (96.5k points)
closed by
Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period, and the available tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance of T1, T2 and T3 requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the 1st millisecond and task pre-emption’s are allowed, the first instance of T3 completes its execution at the end of _____________ milliseconds.

1 Answer

0 votes
by (85.8k points)
selected by
 
Best answer

First instance of all three process arrive at t = 0ms

Their arrival times are like:

T1 = 0, 3, 6, 9, 12, ……….

T2 = 0, 7, 14, 21, ………

T3 = 0, 20, 40, 60, …………

Because they arrive periodically at intervals of 3, 7 and 20 milliseconds.

Also, their burst time are given as 1, 2 and 4 ms respectively.

Priorities are in the inverse of period.

Process

Arrival time

Burst time

Priority

T1

0, 3, 6, 9, ….

1

1/3 (Highest)

T2

0, 7, 14, 21, ….

2

1/7

T3

0, 20, 40, 60 ……

4

1/20

 

As, they all first arrive at time 0, so Gantt chart will be like:

T1

T2

T1

T3

T1

T2

T1

T3

……..

0          1          3           4        6          7          9          10       12

So, in this way first instance of T3 completes its execution at the end of 12 ms.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...