Reasons for Processes Termination
A process in an operating system can be terminated when certain errors or default conditions occur. Following are some of the reasons that lead to process termination,
Reasons for Process Termination:
- Normal Completion:
A process can complete its execution in a normal manner by executing an operating system service call.
- Unavailability of the Required Memory:
A process is terminated when the system is unable to provide the memory required, as it is more than the memory that it is actually contained in the system
- Exceed in the Execution Time Limit:
Process termination also occurs when its execution time is very much longer than the specific time limit i.e., it takes longer time to execute. This is because of the following possibilities,
(i) Total elapsed time
(ii) Time to execute
(iii) The time interval since the last input is provided by Total elapsed time Time to execute the user. This usually occurs in case of interactive processes.
- Violating Memory Access Limits:
A process can even be terminated, when it is attempting to access a memory location to which access is not permitted
- Protection Error:
A protection error occurs when a process is trying to use a resource (e.g. file) to which access is not granted or using it in an inappropriate manner such as writing to a read-only file.
- Arithmetic Error:
Some arithmetic errors such as, division-by-zero or storing a number greater than the hardware capacity also leads to process termination.
- Input/Output Failure:
It refers to an error that results from some input/output operation, such as inability to find a file, failure of a read or write operation even after trying a certain number of times.
- Misuse of Data:
Misuse of data i.e., using wrong type or un-initialized data also terminates the process.
- Exceeding the Waiting Time Limit:
Exceeding the waiting time for occurrence of an event also terminates the process.
- Invalid Instruction Execution:
When a process is trying to execute an instruction that actually does not exist, the process gets terminated.
- Using a Privileged Instruction:
An attempt to use an operating system instruction by a process stops its execution.
- Interference by an Operating System or an Operator:
An operator or an operating system sometimes interferes with process execution and leads to its termination. One such example is the occurrence of deadlocks.
- Parent Process Termination:
When a parent process terminates, it causes all its child processes to stop their execution.
- Request from a Parent Process:
A parent process has a right to terminate any of its child processes, at any time during their execution.
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.