You are on page 1of 1

new - ready long term scheduling

redy - running short term scheduling

a process has atleast 7 kinds of data


data of the process is written in the process control block when time slice expires

the system does no useful work while switching

four process states: new, running, waiting, terminated


scheduler: short, long, and medium term
algorithm scheduling: first come first served, shortest job next, priority
scheduling, shortest remaining time, round robing scheduling, and multiple level
queues

process scheduling queues


job queue - set of all processes in the system
ready queue - set of all processes residing in main memory, ready, and waiting to
execute
device queues- set of processes waiting for an I/O device

long term scheduler (job scheduler)


selects which processes should be brought into ready queue
short-term scheduler (cpu scheduler)
selects which process should be allocated next to the CPU

I/O-CPU bound processes


I/o-bound - spends more time doing I/O than computations; many short CPU bursts
CPU-bound - spends more time doing computations; few very long CPU bursts

medium term scheduler - an intermediate level queue used in systems with cirtual
memory or timesharing
- removes processes from the memory and reintroduced later (swapping)
swapping - introducing a process
context switch - switching the CPU from one process to another
dispatcher - a modulet that gives control of the CPU to the process selected by the
short term scheduler

process executes last statement and asks the operating system to decide it (EXIT)
output data from child to parent (via WAIT)
parent may terminate execution of children processes (ABORT)

address space -
system call - fork a child, exec
interrupt -

turnaround time = finish time - arrival time


waiting time = turnaround time - burst time

nonpreemptive - it will finish execution of process regardless of the other tasks


preemptive - if process is executed and a task has shorter burst time, it will
switch to that process

shortest job first is for benchmarking and cannot happen irl

You might also like