a.)process state- the stage of execution that a process is in. It is these states which determine which processes are eligible to receive CPU time.
- since there is a single processor,at ant time,there will be at most one process running. We will call this the current proccess.
- There may be several processess that are waiting to use the processor. These processess are sais to be ready.
- There may be some that are waiting, not for the processor, dut for a different resource or event. These process said to be block.
b.)process control- The collection of attributes is refereed to as process control block.
A Process Control Block (PCB, also called Task Control Block or Task Struct) is a data structure in the operating system kernel containing the information needed to manage a particular process. The PCB is "the manifestation of a process in an operating system".
Included information
Implementations differ, but in general a PCB will include, directly or indirectly:
- The identifier of the process (a process identifier, or PID)
- Register values for the process including, notably, the Program Counter value for the process
- The address space for the process
- Priority (in which higher priority process gets first preference. eg., nice value on Unix operating systems)
- Process accounting information, such as when the process was last run, how much CPU time it has accumulated, etc.
- Pointer to the next PCB i.e. pointer to the PCB of the next process to run
- I/O Information (i.e. I/O devices allocated to this process, list of opened files, etc)
During a context switch, the running process is stopped and another process is given a chance to run. The kernel must stop the execution of the running process, copy out the values in hardware registers to its PCB, and update the hardware registers with the values from the PCB of the new process.
c.)threads-A thread (or lightweight process) is a basic unit of CPU utilization; it consists of:) program counter) register set ) stack spaceA thread shares with its peer threads its:) code section) data section) operating-system resourcescollectively know as a task.A traditional or heavyweight process is equal to a task with one thread
No comments:
Post a Comment