A process is a program in execution. Process is not as same as program code but a lot more than it. A process is an 'active' entity as opposed to program which is considered to be a 'passive' entity. Attributes held by process include hardware state, memory, CPU etc.

Process memory is divided into four sections for efficient working :

  • The text section is made up of the compiled program code, read in from non-volatile storage when the program is launched.
  • The data section is made up the global and static variables, allocated and initialized prior to executing the main.
  • The heap is used for the dynamic memory allocation, and is managed via calls to new, delete, malloc, free, etc.
  • The stack is used for local variables. Space on the stack is reserved for local variables when they are declared.
Cooperative & Concurrent Processes

Concurrent processes (or threads) are independent because there is no dependency on each other. Independent process that does not share data with other; otherwise processes are cooperative. Advantages of cooperative process are speedup, modularity, computational speedup and information sharing. Processes or threads can be synchronous if they are synchronize frequently so that their relative order of execution is guaranteed.

Types of Processes

A program under execution is called process. There is two types of processes: independent and cooperating process. Independent process can not affected by any other process and cooperating process can be affected by other processes. Cooperating process use and update shared data such as shared variables, memory files, and databases. There are some advantages of cooperating process, e.g., information sharing, computation speed up, modularity and convenience.




      31 (1).jpg

System Call

A system call or kernel call is program requests a service from the kernel of the operating system. That means system call provides the services of the operating system to the user program using API(application program interface). System calls are the only entry points to the kernel system.

The services provided by the system calls are main memory management, process creation, file access, protection, device handling, networking etc.
System calls can be roughly grouped into five major categories:

(i) Process control: load execute, process create, end/abort, allocate/deallocate memory etc.

(ii) File management: create, delete, open file, read file, etc.

(iii) Device management: request device, release device, read, write, get/set device attribute etc.

(iv) Information maintenance: get/set time or date, get/set system data etc.

(v) Communication: create/delete communication, send/receive message etc.