OS Shortnotes Module1
OS Shortnotes Module1
Process:
A process is a program in execution. A process needs
certain resources- such as CPU time, memory, files and
I/O devices – to accomplish its task. These resources are
allocated to the process either when it is created or while
it is running.
Process states
As process executes, it changes state. The state of a
process is defined by current activity of that process.
Each process may in one of the following states.
1. New- The process is being created.
2. Running- Instructions are being executed.
3. Waiting- The process is waiting for some event to
occur(such as an I/O completion etc.)
4. Ready- The process is waiting to be assigned to the
processor
5. Terminated- The process has finished its execution.
Trap or exception
A trap or exception is software-generated interrupt
caused either by error(for ex: division by zero or
invalid memory access) or by specific request from a
user program that an OS to be performed.