Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider three processes (process id 0, 1, 2 ... Start Learning for Free
Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:
  • a)
    13 units
  • b)
    14 units
  • c)
    15 units
  • d)
    16 units
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
Consider three processes (process id 0, 1, 2 respectively) with comput...
Let the processes be p0, p1 and p2. These processes will be executed in following order.
p2  p1  p2  p1  p2  p0  p1   p2   p0   p1   p2
0   4   5   6   7   8   9   10    11   12   13   14 
Turn around time of a process is total time between submission of the process and its completion.
Turn around time of p0 = 12 (12-0)
Turn around time of p1 = 13 (13-0)
Turn around time of p2 = 14 (14-0)
Average turn around time is (12+13+14)/3 = 13.
View all questions of this test
Most Upvoted Answer
Consider three processes (process id 0, 1, 2 respectively) with comput...
Explanation:

To calculate the average turnaround time, we need to find the completion time for each process and then calculate the average. The completion time is the time at which a process finishes execution.

Process 0:
- Burst time: 2 units
- Arrival time: 0 units

Since process 0 has the shortest burst time and arrives first, it will be assigned the CPU first. The remaining burst time for process 0 is 0 units, so it completes execution at time 2.

Process 1:
- Burst time: 4 units
- Arrival time: 0 units

Process 1 arrives at time 0, but since process 0 is already running, it has to wait. The remaining burst time for process 1 is 2 units (4 - 2). Process 1 will be assigned the CPU after process 0 completes. The remaining burst time for process 1 is 0 units, so it completes execution at time 6.

Process 2:
- Burst time: 8 units
- Arrival time: 0 units

Process 2 arrives at time 0, but both process 0 and process 1 are already running. Process 2 has the longest burst time, so it has to wait. The remaining burst time for process 2 is 2 units (8 - 6). Process 2 will be assigned the CPU after process 1 completes. The remaining burst time for process 2 is 0 units, so it completes execution at time 14.

Calculating Turnaround Time:
Turnaround time for a process is the difference between its completion time and its arrival time.

Process 0:
- Completion time: 2 units
- Arrival time: 0 units
- Turnaround time: 2 - 0 = 2 units

Process 1:
- Completion time: 6 units
- Arrival time: 0 units
- Turnaround time: 6 - 0 = 6 units

Process 2:
- Completion time: 14 units
- Arrival time: 0 units
- Turnaround time: 14 - 0 = 14 units

Average Turnaround Time:
The average turnaround time is the sum of the turnaround times of all processes divided by the total number of processes.

Average Turnaround Time = (2 + 6 + 14) / 3 = 22 / 3 = 7.33 units

Since the given options are integers, we round up the average turnaround time to the nearest integer.

Final Answer:
The average turnaround time is 8 units.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer?
Question Description
Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer?.
Solutions for Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is:a)13 unitsb)14 unitsc)15 unitsd)16 unitsCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev