Process Flashcards
what is a Process
A program under execution is known as process. program in main memory is called process.
suspended ready and suspended wait.
these are put in the secondary memory when a higher priority task comes in.
what are different types of queues
- job queue: present in secondary memory when the scheduler picks a process from the process pool.
- ready queue: when the job queue is brought into the main memory.
-wait queue: process in wait state.
what are short term scheduler and long term scheduler and medium term schedulers
short term scheduler : picks up the process from the ready queue and dispatch into cpu
long term scheduler : picks process from process pool in secondary memory and puts them in main memory.
medium term schedulers: they remove the process from the main memory and store their state and later they can be resumed from the state they left.
degree of multi-programming and dispatcher.
degree of multiprogramming is the the number of process in the main memory LTS helps define this.
Dispatcher is the module of OS which gives control of CPU to a process.
context switching.
switching the CPU to another process by saving it’s current state and restoring and running the other process.
it causes overhead as OS does no other work while context switching.
which is the 1st process.
init is the first process and it’s PID is 1.
all other processes are it’s child processes.
fork() is used to call a child process.
Orphan process
a process is called a orphan process when it’s parent exist’s before the child process.
And later it’s parent cannot be traced and init becomes it’s parent.
example of orphan process.
when the parent is in sleep for 20 seconds and the child is in sleep for 30 seconds then the parent wakes up first and completes it’s task and exists but child is still there leads to orphan process.
Defunct Process
also known as Zombie process.
When the child process executes early and exits but it’s entry in the process table still exists because parent needs to read it.
Process scheduling
allocating CPU to the processes one after then other is known so.
types of scheduling.
preemptive scheduling is the one where each process executes for a given time quantum.
Non-preemptive is the one where one process releases the CPU only after completing it’s entire process.