Rss Feed
The Concept of Process


[ ] An operating system executes a variety of programs


* Batch system – jobs
* Time-shared systems – user programs or tasks



[ ] Textbook uses the terms job and process almost interchangeably.

[ ] Process – a program in execution; process execution must progress in sequential fashion.

[ ] A process includes:


* program counter
* stack
* data section




Process State

[ ] As a process executes, it changes state

* new: The process is being created.
* running: Instructions are being executed.
* waiting: The process is waiting for some event to occur.
* ready: The process is waiting to be assigned to a processor

* terminated: The process has finished execution.



Diagram of Process State




Process Control Block (PCB)

Information associated with each process.

[ ] Process ID
[ ] Process state
[ ] Program counter

[ ] CPU registers
[ ] CPU scheduling information
[ ] Memory-management information

[ ] Accounting information
[ ] I/O status information



Process Control Block (PCB) :

Threads

[ ] Results from a fork of a computer program into two or more concurrently running tasks.

[ ] The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process.

[ ] Multiple threads can exist within the same process and share resources such as memory, while different processes do not share these resources.


0 comments: