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.
what does wait() do ?
returns status data to the parent from the child.
what does abort() do ?
it is used by parent to terminate the execution of the children.
reasons of aborting the process ?
- child has exceeded allocated resources
- task assigned to child is no longer required.
- the parent exits and OS does not allow a child to continue if its parent terminates.
Google Chrome Browser is multi process, what are they?
- Browser process manages user interface, disk and network I/O.
- Renderer process renders web pages.
- Plug-in process for each type of plug-in.
when medium term scheduler added ?
If degree of multi programming needs to decrease.
what are types of process in the system ?
- independent
- cooperating : which may be affect or being affected by others.
what are reasons of cooperating ?
- information sharing
- convenience
- modularity
- computation speed up
What are models of IPC ?
- shared memory
The control is under the user processes.
issue : providing synchronization mechanism of process actions. - message receiving : processes communicating each other from shared variable.
message size is fixed or variable.
what are message passing implementations ?
- direct or indirect.
- synchronous or asynchronous
- automatic or explicit buffering.
what are Communications in Client-Server Systems ?
- sockets.
- pipes.
- remote procedure call.
- remote method invocation.
what is a socket ?
It is defined as an endpoint for communication.
terminology : A pair of processes communicating over a network employ of a pair of sockets- one for each process