Processes
Those systems which allow more than one process execution at a time, are called multiprocessing systems. Uniprocessing means only one processor.
In Operating Systems, each process has its own address space which contains code, data, stack and heap segments or sections. Each process also has a list of files which is opened by the process as well as all pending alarms, signals and various signal handlers.
In UNIX, a new process is created by fork() system call. fork() system call returns a process ID which is generally the process id of the child process created.
A process can be terminated normally by completing its task or because of fatal error or killed by another process or forcefully killed by a user. When the process completes its task without any error then it exits normally. The process may exit abnormally because of the occurrence of fatal error while it is running. The process can be killed or terminated forcefully by another process.
Interprocess Communication (IPC) is a communication mechanism that allows processes to communicate with each other and synchronise their actions without using the same address space. IPC can be achieved using shared memory and message passing.
Deadlock is a situation which occurs because process A is waiting for one resource and holds another resource (blocking resource). At the same time another process B demands blocking a resource as it is already held by a process A, process B is waiting state unless and until process A releases occupied resource. (each process is blocked and will remain so forever)
Process stack contains Function parameters, Local variables and Return address. It does not contain the PID of child process.
wait system call can be used by a parent process to determine the termination of child process.
The address of the next instruction to be executed by the current process is provided by the Program Counter. After every instruction is executed, the Program Counter is incremented by 1
Comments
Post a Comment