chapter 3 processes Flashcards
what is the process and its parts ?
a process is a program in execution.
its part : - text section which also called a program code.
- data section which have global variables
- stack: which containing a temporary data.
- current activity : which contains processor registers and counters
- heap : containing memory dynamically allocated during run time.
how a program becomes a process ?
when executable file loaded into memory.
it started when clicking a command line entry of its name.
what are the states of the process ?
- new : being created
- running : instructions are being executed
- waiting : the process waiting for event to occur.
- ready : the process is assigned to a processor .
- terminated : the process has finished the execution.
what information associated with the process ?
- process state
- program counter
- CPU registers
- CPU scheduling
- memory management information
- I/O status information
- accounting information
What is the process scheduler job?
It selects process among available processes for next execution.
what are scheduling queues ?
- job queues : 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 all processes waiting for an I/o device.
what are scheduler types?
- short term scheduler : selects which processes should be executed next.
- long term scheduler : selects which processes should be brought into ready queue.
what types of processes?
- I/O bound process : spends more time doing I/O than computations, many short CPU bursts.
- CPU bound process : spends more time doing computations, few very long CPU bursts.
what is swapping ?
Remove process from memory, store on disk, bring back in from disk to continue execution
what does context switch do ?
When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via a context switch.
what does context time dependent on ?
context switch time are highly dependent on hardware.
what is identifying and managing the process ?
process identifier ( PID)
what are process resources sharing options ?
Parent and children share all resources .
Children share subset of parent’s resources.
Parent and child share no resources.
what are the process execution options ?
Parent and children execute at the same time.
Parent waits until children terminate.
what does exit() do ?
asks the OS to delete it.