ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU-(2020-2021)-1 > student homework > 2018529627015_SIRLEAF_SIAKA_Joe >
Homework-2 Version 0
👤 Author: by shatino94163com 2020-09-29 06:15:58


Program vs Process:

Program in term of function/usefulness :



In layman terms , a program can be considered as a system activity. In batch processing system these are called executing jobs while in a real-time operating system it is called tasks or programs. A user can run multiple programs where the operating system facilitates its own internal programmed activities such as memory management using some techniques.


Process in terms of functionalities



On the other hand, a Process is an execution of a program. It is considered as an active entity and realizes the actions specified in a program. Multiple processes can be related to the same program. It handles the operating system activities through PCB (Process control Block) which includes program counter, stack, state etc. Program counter stores the next sequence of instruction that is to be executed later.



How Program differs from Process


A program is a definite group of ordered operations that are to be performed. On the other hand, an instance of a program being executed is a process.

The nature of the program is passive as it does nothing until it gets executed whereas a process is dynamic or active in nature as it is an instance of executing program and perform the specific action.

A program has a longer lifespan because it is stored in the memory until it is not manually deleted while a process has a shorter and limited lifespan because it gets terminated after the completion of the task.

The resource requirement is much higher in case of a process; it could need processing, memory, I/O resources for the successful execution. In contrast, a program just requires memory for storage.

The process status are divided into five states instead of numbers because In a multitasking computer system, processes may occupy a variety of states. These distinct states may not be recognized as such by the operating system kernel.

To incorporate the ideas of tracking the reason for not-running and to represent the creation and termination of processes, we now consider a 5-state model.



 

Please login to reply. Login

Reversion History

Loading...
No reversions found.