An active entity that requires a set of resources to perform its function
Process
Has a CPU state (register values)
Has an address space (memory contents)
Has an environment (connections with other entities)
Process
Requires space in main memory where it resides during its execution
Passes through several states from its initial arrival into the computer system to its completion
Thread
A lightweight process, a unit smaller than a process, a portion of a process that can run independently
Processor
The part of the machine that performs the calculations and executes the programs
Job scheduling
The process of allocating system resources to many different tasks by an operating system
Process scheduling
The activity of the process manager that handles the removal of the running process from the CPU and the selection of another process on the basis of a particular strategy
Process Scheduling Queues
Job queue
Ready queue
Device queues
ProcessControlBlock (PCB)
A data structure used by computer operating systems to store all the information about a process
Process States
READY, RUNNING and BLOCKED
I/O-boundprocess
Spends more time doing I/O than computations
CPU-bound process
Spends more time doing computations
Multitasking
Having multiple processes time slice on the same processor
Multiprogramming
Having multiple jobs in the system
Multiprocessing
Using multiple processors for the same job or system
Multiprogramming
Requires that the processor be allocated to each process for a period of time and de-allocated at an appropriate moment
Context switch
The stopping of one process and starting (or restarting) of another process
Scheduling Algorithms
The method by which processes are given access to system resources, usually processor time
Types of Schedulers
Long-Term Scheduler
Short-Term Scheduler
Medium-Term Scheduler
PreemptiveScheduling
A process scheduling strategy in which the processing of a job is interrupted and the CPU is transferred to another job
Non-PreemptiveScheduling
A job scheduling strategy in which the job captures the processor and begins execution and runs uninterrupted until it issues an IO request or it is finished
CPU Efficiency
The average percentage of the hardware (or the CPU) that is actually used
CPUUtilization
The main task in which the operating system needs to make sure that the CPU remains as busy as possible
Throughput
The number of jobs completed in a unit of time
Turnaround Time
The average time from submitting a job until it terminates
WaitingTime
The time a job waits (in the ready state) until it runs
CPU Efficiency
The main task in which the operating system needs to make sure that the CPU remains as busy as possible
CPUEfficiency
Can range from 0 to 100 percent
For the RTOS, it can range from 40 percent for low-level and 90 percent for the high-level system
CPUUtilization
The number of jobs completed in a unit of time
Throughput
The average time from submitting a job until it terminates
TurnaroundTime
The time a job waits (in the ready state) until it runs
Response Time
Minimize response time by quickly dealing with interactive requests, and letting batch requests wait
First-ComeFirst-Served (FCFS)
A non-preemptive scheduling algorithm that handles jobs according to their arrival time
Uses FIFO queue
ShortestJobNext (SJN)
The job which has the shortest burst time gets the CPU
Non-preemptive, pre-emptive scheduling algorithm
ShortestRemainingTimeFirst (SRTF)
Preemptive version of a shortest job next scheduling
Preemptive in nature (only at arrival time)
The processor is allocated to the job closest to completion
Can't be implemented on interactive system because it requires advance knowledge of required CPU time
PriorityScheduling
Most common method in batch systems, but may give slow turnaround to some users
Gives preferential treatment to important jobs
Jobs with the same priority are treated FCFS
Priority could be based on: Least amount of memory required, Least number of peripheral devices needed, Shorted estimated CPU time, Time already spent waiting
RoundRobin (RR)
Preemptive in nature
Preemption based on time slices or time quanta; Time quantum between 10 and 100 milliseconds
All user processes are treated to be at the same priority
No process is allocated CPU for more than 1 quantum in a row
Timer interrupt results in context switch and the process is put at the rear of the ready queue
Multi-level Feedback Scheduling
n priority levels — priority scheduling between levels, round-robin within a level
Quantum size decreases with priority level
Jobs are demoted to lower priority levels if they don't complete within the current quantum