Process is a program in execution. While programs are written in text file and executed to become a process
When the program is loaded into the main memory, it becomes a process
Two-statemodel - the simplest model is based on the fact that process is either being executed by the processor or is not. PROCESS STATES: Running, notrunning
Three-statemodel:model which reposes on the idea that aside from the state whereby the process is running or processing inside the CPU, the process is either waiting to get into the processor or busy doing I/O activities. STATES: Running, Ready, Blocked/Waiting
Running - process is currently being executed by a processor
Ready - process is ready to execute when a processor becomesavailable.
Blocked or Waiting - process is waiting for a specific event tooccur before it can proceed.
Normal completion - the process executes an OS servicecall to indicate that it has completed running
Time limit exceeded - the process is terminated themoment it exceed the maximum time for a user to performprocess.
Memory unavailable - the process requires more memorythan the system can provide.
Bounds violation - the process tries to access a memorylocation that it is not allowed to access
Protection Error - the process attempts to use a resourcesuch as a file that it is not allowed to use, or it tries to useit in an improper fashion, such as writing to a read-onlyfile.
Arithmetic Error - This type of process terminating erroroccurs whenever an illegal computation is made in thecomputer system, such as undefined computation or anextremely large numerical input to a limited capacity
Invalid Instruction - the process attempts to execute anonexistent instruction
Privileged Instruction - the process attempts to use aninstruction reserved for the operating system.
Data Misuse - a piece of data is of the wrong type or is notinitialized.
OS Intervention - for some reason, the operating systemhas terminated the process.
Parent Termination - when a parent terminates, theoperating system may automatically terminate all of theoffspring of that parent
types of process schedulers: long term scheduler, short term scheduler, medium term scheduler
Long-termScheduler - controls the number of jobs that goes inside the memory from the secondary storage. new state to ready state
Short-termScheduler - selects jobs from the main memory to beallocated to the CPU. ready state to running state
Medium-term Scheduler - removes a job from the main memory in orderto create space/vacant in the memory where the needed process can beloaded. the removed process goes into virtualmemory in secondary storage. still in ready state
long term scheduler aka admissionscheduler
short term scheduler aka cpuscheduler
medium term scheduler aka swapper
system boot up - when the computer is turned on it creates process. ex BIOS is a process
Human user creation - most common process creation
batch system initialization - preset programs after booting. loading of services and startup programs
process spawning - not created by user but rather the process itself creates or call another process
Preemptive process can be interrupt while in execution
preemption is the actual suspension of the process because of an interruption
non-preemptive process- once the process occupied the cpu, it cant be interrupted
CPU scheduling algorithm is the technique used by the short term scheduler to handle task
cpu scheduling algorithm is divided into non-preemptive algorithm and preemptive algorithm