PLATFORM TECHNOLOGIES – LONG QUIZ
CPU SCHEDULING ALGORITHMS
1. First Come First Serve (FCFS)
2. Shortest Job First (SJF)
3. Shortest Remaining Time First (SRTF)
4. Round Robin Scheduling (RR)
5. Priority Scheduling (Prio)
6. Preemptive Priority Scheduling (P-Prio)
7. Multi-level Queue Scheduling (MLQ)
CPU Scheduling – determining which process will own CPU for execution while another is
on hold
Preemptive Scheduling – Tasks are assigned with priorities
Non-Preemptive Scheduling – CPU is allocated to a specific process which will release
the CPU either by switching context or terminating.
PREEMPTIVE vs NON-PREEMPTIVE
1. A process switches from the running to the waiting state
2. Specific process switches from the running state to the ready state
3. Specific process switches from the waiting state to the ready state
4. Process finished its execution and terminated
** 1 and 4 – Non-preemptive
** 1, 2, 3, 4 – preemptive
Burst Time / Execution Time – time required to complete execution (running time)
Arrival Time – when a process enters ready state
Finish Time – when process complete and exit from a system
Multiprogramming – programs which can be present in the memory at the same time
Jobs – program WITHOUT user interaction
User – program HAVING user interaction
Process – reference used for BOTH job and user
CPU/IO burst cycle – characterizes process execution; alternates between CPU and I/O
activity
CPU Utilization – the main task in which the OS makes sure the CPU remains busy as
possible
Throughput – the number of processes that finish their execution per unit of time
Waiting time – the amount of time a process needs to wait in the ready queue
Response time – amount of time the request was submitted until the first response
Turnaround time – amount of time to execute a specific process; Time taken to complete
after arrival
FIRST COME FIRST SERVE (FCFS)
First Come First Serve – easiest and most simple CPU scheduling algorithm
Convoy effect – situation when short jobs have to wait for long jobs to finish
Average Waiting Time – crucial parameter to judge scheduling algorithm’s performance
Completion time – time taken for execution to complete starting from arrival time
CALCULATION:
Turnaround time = completion – arrival
Waiting time = turnaround - burst
SHORTEST JOB FIRST (SJF)
Shortest Job First – the process having the smallest time is chose for execution
Types:
1. Non-Preemptive SJF
2. Preemptive SJF