Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

PLATFORM TECHNOLOGIES – LONG QUIZ

CPU SCHEDULING ALGORITHMS ** 1 and 4 – Non-preemptive

1. First Come First Serve (FCFS) ** 1, 2, 3, 4 – preemptive

2. Shortest Job First (SJF)

3. Shortest Remaining Time First (SRTF) Burst Time / Execution Time – time required by the
process to complete execution (also called : running
4. Round Robin Scheduling (RR)
time)
5. Priority Scheduling (Prio)
Arrival Time – when a process enters in a ready state
6. Preemptive Priority Scheduling (P-Prio)
Finish Time – when process complete and exit from a
7. Multi-level Queue Scheduling (MLQ) system.

Multiprogramming – programs which can be present in


the memory at the same time
CPU Scheduling – determining which process will own
CPU for execution while another is on hold Jobs – type of program WITHOUT user interaction

Preemptive Scheduling – Tasks are assigned with User –kind of program HAVING user interaction
priorities
Process – reference used for BOTH job and user
Non-Preemptive Scheduling – CPU is allocated to a
CPU/IO burst cycle – characterizes process execution;
specific process which will release the CPU either by
alternates between CPU and I/O activity.
switching context or terminating.
CPU Utilization – the main task in which the OS makes
sure the CPU remains busy as possible. It can range
6 TYPES OF PROCESS SCHEDULING ALGORITHMS from 0 to 100 percent. For RTOS: range 40 percent for
low-level and 90 to high-level system.
1. First Come First Serve (FCFS)
Throughput – the number of processes that finish their
2. Shortest Job First (SJF) execution per unit of time
3. Shortest Remaining Time Waiting time – the amount of time a specific process
4. Priority Scheduling (Prio) needs to wait in the ready queue.

5. Round Robin Scheduling (RR) - Total time the process has to wait before its
execution begins.difference between turnaround time
7. Multi-level Queue Scheduling (MLQ) and burst time of the process.

Response time – amount of time the request was


PREEMPTIVE vs NON-PREEMPTIVE submitted until the first response is produced

1. A process switches from the running to the waiting Turnaround time – Time taken to complete after
state arrival.; amount of time to execute a specific process;

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


FIRST COME FIRST SERVE (FCFS) What to compute in SJF

First Come First Serve – easiest and most simple CPU 1. Completion Time: Time at which process completes
scheduling algorithm its execution.

Convoy effect – situation when short jobs have to wait 2. Turn Around Time: Time Difference between
for long jobs to finish. completion time and arrival time.

Average Waiting Time – crucial parameter to judge Turn Around Time = Completion Time – Arrival Time
scheduling algorithm’s performance
3. Waiting Time(W.T): Time Difference between turn
Completion time – time taken for execution to around time and burst time.
complete starting from arrival time
Waiting Time = Turn Around Time – Burst Time

CALCULATION:

Turnaround time = completion – arrival

Waiting time = turnaround – burst

FCFS

Advantages:

- Very Simple

- Fair for process that arrives first

Disadvantages:

- Waiting time depends on arrival order

-Potentially long wait for jobs that arrives later

- Convoy effect a situation when jobs with smaller


burst have to wait for a long job to finish its long burst.

SHORTEST JOB FIRST (SJF)

Shortest Job First – the process having the smallest


time is chosen for the next execution

Types:

1. Non-Preemptive SJF - In non-preemptive scheduling,


once the CPU cycle is allocated to process, the process
holds it till it reaches a waiting state or terminated.

2. Preemptive SJF

You might also like