Process
A process can be defined as an instance of a program in execution. It is a fundamental concept in operating systems and represents the basic unit of work that can be scheduled by the operating system. Every process has its own memory space, program code, and data, which allows multiple processes to run simultaneously without interfering with each other.
Process State
In order to understand how a process changes state in an operating system, it is important to first understand the different states that a process can exist in. The three primary states of a process are:
- Running: The process is currently being executed by the CPU.
- Waiting: The process is waiting for a particular event to occur, such as input/output operation.
- Ready: The process is waiting to be assigned to a CPU for execution.
Transition of a Process State
There are several steps involved in the transition of a process state, and these steps can be visualized using a process state transition diagram. The following is a brief overview of the steps involved:
- New: This is the initial state of a process when it is first created. At this stage, the process is waiting to be admitted into the system.
- Ready: Once the process is admitted into the system, it enters the ready state. At this stage, the process is waiting to be assigned to a CPU for execution.
- Running: When a CPU is available, the process is assigned to the CPU for execution, and it enters the running state.
- Blocked: While a process is executing, it may require input/output operations or other events that may cause it to be blocked. When this happens, the process enters the blocked state and waits for the event to occur.
- Terminated: When a process has completed its execution, it enters the terminated state, and its resources are released by the operating system.
It is important to note that a process can transition between these states multiple times during its execution, depending on its requirements and the availability of system resources. Effective process management is critical for ensuring that processes are executed efficiently and that system resources are utilized optimally.
OS-2022
Q-1.
(a) Write are the functions of operating systems? write a note on multi programmed operating systems ?
(b) Distinguish between client server and peer to peer model of distributed systems .
Q-2.
(b) What is meant by Storage Structure? Discuss Storage Hierarchy.
Q-3.
(a) What are the criteria for evaluating the CPU scheduling algorithms? Why do we need it?
Q-4.
(a) What is synchronization? Explain how semaphores can be used to deal with n-process critical problem.
Q-5.
Q-6.
(b) What are the disadvantages of single contiguous memory allocation? Explain.
Q-7.
(a) Briefly explain about single-level, two-level and three Structured directories.
(b) What is disk scheduling? Explain the C-SCAN scheduling by giving an example.
Q-8.
(b) UNIX file system.
(c) Program and system threats.