1/21
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Preemptive scheduling policy
interrupts processing of a job and transfers the
CPU to another job.
Process Scheduling Policies
Before operating system can schedule all jobs in a multiprogramming
environment, it must resolve three limitations of system:
- finite number of resources (such as disk drives, printers, and tape
drives)
- some resources can't be shared once they're allocated (such
as printers)
- some resources require operator intervention (such as tape
drives).
Non-preemptive scheduling policy
functions without external interrupts.
Non-preemptive scheduling policy
- Once a job captures processor and begins execution, it remains
in RUNNING state uninterrupted.
- Until it issues an I/O request or until it is finished.
Interrupts
There are instances when a job claims CPU for a very long time before issuing an I/O request.
- Builds up READY queue & empties I/O queues.
- Creates an unacceptable imbalance in the system.
Process Scheduler
________ uses a timing mechanism to periodically interrupts
running processes when a predetermined slice of time has expired.
Interrupts
Process Scheduler uses a timing mechanism to periodically interrupts
running processes when a predetermined slice of time has expired.
- Suspends all activity on the currently running job and reschedules it into the READY queue.
Process Scheduling Algorithms
• This scheduling is done by the Process Scheduler.
• It maximizes CPU utilization by increasing throughput.
1. First-Come, First-Served (FCFS) Scheduling
2. Shortest-Job-Next (SJN) or Shortest-Job-First (SJF) Scheduling
3. Round Robin (RR) Scheduling
3 popular process scheduling algorithms:
✓ Arrival Time (AT)
✓ Completion Time (CT)
✓ Burst Time (BT)
✓ Turn Around Time (TAT)
✓ Waiting Time (WT)
✓ Average Waiting Time (AWT)
Terminologies to take care in Process Scheduling Algorithms.
Arrival Time (AT)
Time at which the process arrives in the ready queue.
Completion Time (CT)
Time at which process completes its execution.
Burst Time (BT)
Time required by a process for CPU execution.
Turn Around Time (TAT)
Time Difference between completion time and arrival
time.
Waiting Time (WT)
- Time Difference between start time and arrival time (Non-Preemptive Scheduling Policy).
- Time Difference between turn around time and burst time (Preemptive Scheduling Policy) .
Average Waiting Time (AWT)
Sum of all waiting time divided by the number of processes.
First-Come, First-Served (FCFS) Scheduling
- considered to be the simplest of all operating system scheduling
algorithms.
- _______________ algorithm states that the
process that requests the CPU first is allocated to the CPU first and is
implemented by using FIFO queue.
First-Come, First-Served (FCFS) Scheduling
✓ _______ supports non-preemptive and preemptive process scheduling algorithms.
✓ Tasks are always executed on a __________ concept.
✓ _________ is easy to implement and use.
✓ This algorithm is not much efficient in performance, and the wait time is quite high.
Shortest Job Next (SJN) Scheduling
- also known as shortest job first (SJF), a scheduling algorithm that selects the waiting process with the smallest burst time to execute next.
- Can be preemptive or non-preemptive.
Shortest Job Next (SJN) Scheduling
has the advantage of having a minimum average waiting time among all operating system scheduling algorithm.
Round Robin (RR) Scheduling
- is the scheduling algorithm where each process is cyclically assigned a fixed time slot.
- It is the preemptive version of FCFS Scheduling Algorithm. It
generally focuses on the Time Sharing technique.
Round Robin (RR) Scheduling
✓ _________ is simple, and starvation-free as all processes get the balanced CPU
allocation.
✓ One of the most widely used methods in Process Scheduling
✓ Considered preemptive as the processes are given to the CPU for a very
limited time.