All Exams Test series for 1 year @ ₹349 only
Question

A scheduling Algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (lowest priority). The scheduler reevaluates the process priority for every ‘T’ time units and decides next process to be scheduled. If the process have no I/O operations and all arrive at time zero, then the scheduler implements _________ criteria.

The correct answer is
Round Robin Scheduling

Algorithm Scenario Analysis

The scheduling algorithm assigns priority based on waiting time, with processes starting at priority zero. Priorities are reassessed every T time units.

Key Conditions Analysis

  • All processes arrive simultaneously at time 0.
  • There are no Input/Output (I/O) operations.
  • Priority increases proportionally with the time a process waits.
  • Priority is re-evaluated at fixed intervals of T time units.

Reasoning for Round Robin Scheduling

Under these specific conditions, the algorithm effectively implements Round Robin scheduling:

  • The fixed interval T acts as a time quantum, limiting the execution time for any process in one go.
  • While a process executes, its waiting time does not increase.
  • Processes that are ready but not currently running accumulate waiting time.
  • Upon re-evaluation every T units, processes that have waited longer will naturally have accumulated more waiting time, thus gaining higher priority.
  • This periodic reassessment and selection based on accumulated waiting time ensures a fair distribution of CPU time. Processes that wait longer get prioritized in subsequent scheduling turns.
  • This cyclical process, constrained by the time quantum T, is the hallmark of Round Robin scheduling, ensuring that no single process monopolizes the CPU and all processes eventually get a chance to run.

Conclusion

The described scheduling mechanism, under the constraints of simultaneous arrival and no I/O, results in the implementation of Round Robin Scheduling criteria.

Was this answer helpful?

Important Questions from CPU Scheduling

  1. Assume that the following tasks are to be executed on a single processor system. All tasks have arrived at 0 msec.

    Job IDCPU
    a4
    b1
    c7
    d2

    How long does it take for task "a" to complete if the scheduling time slice is a round-robin with 1 ms?

  2. Consider the following processes with CPU Burst time P1, P2, P3 arrived at time 0.
    ProcessCPU Burst Time (MS)
    P124
    P23
    P33

    What is the average waiting time of these processes executed using FCFS algorithm.
  3. Consider the following table about processes, their burst time and arrival time
     

    ProcessBurst TimeArrival Time
    P1090
    P2300
    P3040
    P4082
    P5116


    Now which of the process shall finish second last as per the respective GANTT charts for the non- preemptive SJF and Round Robin (time quantum = 10) scheduling methods.

  4. A computer has two processors, $M_1$ and $M_2$. Four processes $P_1, P_2, P_3, P_4$ with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these are the only processes in the system. The scheduler uses non-preemptive priority scheduling, with priorities decided as follows:
    • $M_1$ uses priority of execution for the processes as, $P_1 > P_3 > P_2 > P_4$, i.e., $P_1$ and $P_4$ have highest and lowest priorities, respectively.
    • $M_2$ uses priority of execution for the processes as, $P_2 > P_3 > P_4 > P_1$, i.e., $P_2$ and $P_1$ have highest and lowest priorities, respectively.
    A process $P_i$ is scheduled to a processor $M_k$, if the processor is free and no other process $P_j$ is waiting with higher priority. At any given point of time, a process can be allocated to any one of the free processors without violating the execution priority rules. Ignore the context switch time. What will be the average waiting time of the processes in milliseconds?
  5. Processes $P_1, P_2, P_3, P_4$ arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively.
    Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times.
    Which ONE of the following correctly gives the average turnaround time of the four processes in milliseconds?
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App