CPU scheduling questions and answers pdf

 CPU scheduling questions and answers pdf:

CPU-Scheduling-questions-Answers

What is CPU scheduling?

The method or procedure to schedule the processes to execute on a CPU is known as CPU scheduling or process scheduling.

What is the difference between preemptive and Non-preemptive scheduling in a system?

In non-preemptive scheduling, once the CPU is allocated to a process, the process holds (retains) the CPU until it switches from running state to waiting for the state, or running state to ready state, or waiting for the state to a ready state, or it terminates.
In preemptive scheduling, a process may be released from the CPU by the operating system. The scheduler may suspend the execution of a process before it is blocked or terminated, to allocate the CPU to another process.

What is a dispatcher?

In multiprogramming and multitasking environments, switching of processes occurs so frequently that the operating system needs a special program (or module) to accomplish this task. This program is known as dispatcher. The dispatcher performs its function in CPU scheduling. It gives control of the Central Processing Unit to the process selected by the short-term scheduler.

What is meant by Throughput?

The number of processes executed by a system in a specific period of time is known as throughput.

What is meant by Turnaround Time?

The interval of execution from the time of submission of any process to the time of completion (to complete its execution) is known as the turnaround time in a scheduling system. The turnaround time is computed by subtracting the time; a process is terminated, from the time it was created.

What is the waiting time of a process?

The sum of time periods spent by a process waiting in the ready queue to get a chance for execution is known as waiting time. It does not include the time a process is executing on the Central Processing Unit or performing I/O.

What is the difference between a CPU burst and an I/O burst?

A CPU burst is the time interval, a process uses the CPU, while an I/O burst is a time interval when a process uses an I/O device.

What is the Shortest Job First (SJF) Scheduling?

Shortest Job First is another non-preemptive scheduling algorithm. SJF is also known as Short-Job Next (SJN) algorithm. This algorithm is faster than FCFS. This algorithm associate with each process, the estimated processing time, or burst time. This algorithm selects the process first that has the shortest burst time. The processes whose estimated execution time is less does not have to wait for a long time in the ready queue. This scheduling algorithm reduces the average waiting time for a given set of processes.

What is the Gantt chart?

A Gantt chart is a type of bar chart that shows the graphical representation of the order of execution of the processes. It is a form of a rectangle divided into partitions. Each portion indicates the time units allocated to a process in a system unit. Generally, a Gantt Chart is used to determine the average waiting time and turnaround time for individual processes in a system unit.

What is meant by starvation?

A process that is ready to run but waits too long for the CPU, is considered blocked. This situation is known as starvation.

What is the Shortest Remaining Time schedule?

The shortest Remaining Time (SRT) is a preemptive version of Shortest Job First (SJF). When a new process is added into the ready queue, it may have a shorter burst time than the remaining time of the currently running process. If so, the currently running process is preempted. It means that the CPU suspends the execution of the currently running process and switches the control to the newly arriving process.

On a system using non-preemptive scheduling, processes with expected run times of 2,8,5, and 4 are in the ready queue. In what order should they be run to minimize wait time in a system?

They will run in the following order: 2,4,5, and 8. It means that the SJF scheduling algorithm will be used.

What is meant by the time quantum?

In round-robin scheduling, each process is assigned a small unit of time is known as time quantum or time slice. Generally, the time quantum ranges from 10 to 100 milliseconds. A process is allowed to run within its time quantum. If it does not complete within this time quantum, it is placed back into the ready queue and the next job or process starts execution.

What happens if time quantum is increased in RR scheduling?

The performance of the RR algorithm totally depends on the size of the time quantum. Similarly, the waiting time also depends on the size of the time quantum. If the size of the time quantum is considerably greater than the average CPU burst time, then the Round-robin scheduling behaves like FCFS scheduling.






Comments

Popular posts from this blog

Modern scenario of information technology:

Deadlock Questions and Answers pdf

What is the bus interconnection?