Professional Documents
Culture Documents
ENROLLMENT: 02-131222-107
In this assignment your task is to describe, in detail, the process management of:
1. Windows Operating Systems (e.g., various process states, schedulers,
algorithms, etc.)
2. UNIX Operating Systems (e.g., various process states, schedulers, algorithms,
etc.)
Use diagrams, pseudocodes, etc. to support your work.
ANSWER # 01
Windows Operating System Process Management
Controls and coordinates the execution of processes (running programs).Allocates resources,
schedules tasks, and facilitates communication between processes. Examples: Process scheduler,
task manager. Process management in windows refers to the techniques and strategies used by
organizations to design, monitor, and control their processes to achieve their goals efficiently
and effectively. It involves identifying the steps involved in completing a task, assessing the
resources required for each step, and determining the best way to execute the task.
The Windows operating system is responsible for the following activities in connection with
process management:
2. Ready State:
A process moves to the Ready state when it has been created and is awaiting CPU time
for execution. While in the Ready state, the process is waiting for the CPU scheduler to
allocate CPU time. It is prepared for execution, and its context is stored, allowing for a
quick transition to the Running state.
3. Running State:
In the Running state, the process is actively executing instructions on the CPU. It
continues its computations until it voluntarily releases the CPU or gets preempted by the
scheduler.
4. Blocked State:
A process transitions to the Blocked state when it is waiting for an event (e.g., I/O
operation completion, resource availability) that will allow it to proceed.
While in the Blocked state, the process cannot make progress until the specified event
occurs.
6. Suspend Ready:
The process is temporarily removed from the ready queue.
This state occurs when the operating system decides to suspend the execution of a
process that is in the ready state.
Common reasons for suspension include priority changes, resource constraints, or policy
decisions.
7. Suspend Wait:
The process is temporarily removed from the execution queue while waiting for an event.
This state occurs when a process moves to the blocked state but is further suspended to
free up resources for other processes.
Processes in the suspend state can be resumed when the conditions that led to their
suspension are resolved. Once resumed, they typically move back to their original state
(ready or blocked) in the process lifecycle.
Schedulers
There are 3 Types of shedulers described below:
1. Long-term: Decides how many processes should be made to stay in the ready state. This
decides the degree of multiprogramming. Once a decision is taken it lasts for a long time
which also indicates that it runs infrequently. Hence it is called a long-term scheduler.
2. Short term: Short-term scheduler will decide which process is to be executed next and
then it will call the dispatcher. A dispatcher is a software that moves the process from
ready to run and vice versa. In other words, it is context switching. It runs frequently.
Short-term scheduler is also called CPU scheduler.
2. Round Robin:
In the Round Robin scheduling algorithm, the OS defines a time quantum (slice). All the
processes will get executed in the cyclic way. Each of the process will get the CPU for a
small amount of time (called time quantum) and then get back to the ready queue to wait
for its next turn. It is a preemptive type of scheduling.
8. Preemptive Scheduling:
Windows supports preemptive scheduling, where a running process can be interrupted
and moved out of the CPU to give way to a higher-priority process. This ensures that
critical tasks are not delayed due to lower-priority activities.
ANSWER # 02
UNIX Operating System Process Management
When you execute a program on your Unix system, the system creates a special environment for
that program. This environment contains everything needed for the system to run the program as
if no other program were running on the system.
2. Short-term scheduler (CPU scheduler): Selects which process to execute next from the
pool of ready processes. Its goal is to maximize CPU utilization, minimize response time,
and ensure fairness among processes. UNIX typically uses preemptive scheduling.
2. Shortest Job Next (SJN) or Shortest Job First (SJF): The process with the shortest
expected processing time is selected next for execution. This algorithm minimizes
average waiting time but may suffer from starvation for longer processes.
3. Priority Scheduling: Each process is assigned a priority. The process with the highest
priority is selected for execution. UNIX systems typically use dynamic priority
adjustments based on factors such as CPU usage, I/O operations, and memory
requirements.
4. Multilevel Feedback Queue (MLFQ): Processes are placed into multiple queues with
different priorities. The scheduler selects processes from the highest priority queue first.
If a process does not finish within its time quantum, it is moved to a lower priority queue,
ensuring that CPU-bound and I/O-bound processes are treated appropriately.
Process Control Block (PCB)
fork(): Creates a new process (child) as a copy of the current process (parent).
exec(): Replaces the current process with a new program.
exit(): Terminates the process and releases resources.
Real-World Example
https://www.bing.com/ck/a?!
&&p=69f79746176661ffJmltdHM9MTcxMDQ2MDgwMCZpZ3VpZD0wNzQ1YmI0Yi04ZWZjLTY
5MDAtMjM2Zi1hODg1OGYyNzY4NTEmaW5zaWQ9NTIwNw&ptn=3&ver=2&hsh=3&fclid=0745
bb4b-8efc-6900-236f-
a8858f276851&psq=process+management+in+windows+operating+system&u=a1aHR0cHM6Ly93d3
cuZ2Vla3Nmb3JnZWVrcy5vcmcvaW50cm9kdWN0aW9uLW9mLXByb2Nlc3MtbWFuYWdlbWVu
dC8&ntb=1
https://www.bing.com/ck/a?!
&&p=f0d43b5d13fe5258JmltdHM9MTcxMDQ2MDgwMCZpZ3VpZD0wNzQ1YmI0Yi04ZWZjLTY
5MDAtMjM2Zi1hODg1OGYyNzY4NTEmaW5zaWQ9NTQ3Mg&ptn=3&ver=2&hsh=3&fclid=0745
bb4b-8efc-6900-236f-
a8858f276851&psq=process+states+in+windows+operatomg+system&u=a1aHR0cHM6Ly93d3cuZ2
Vla3Nmb3JnZWVrcy5vcmcvc3RhdGVzLW9mLWEtcHJvY2Vzcy1pbi1vcGVyYXRpbmctc3lzdGVtc
y8&ntb=1
https://www.bing.com/ck/a?!
&&p=da1f4f60cb6bdd12JmltdHM9MTcxMDQ2MDgwMCZpZ3VpZD0wNzQ1YmI0Yi04ZWZjLTY
5MDAtMjM2Zi1hODg1OGYyNzY4NTEmaW5zaWQ9NTIwNA&ptn=3&ver=2&hsh=3&fclid=0745
bb4b-8efc-6900-236f-
a8858f276851&psq=algorithms+in+windows+operating+system&u=a1aHR0cHM6Ly93d3cuZ2Vla3
Nmb3JnZWVrcy5vcmcvY3B1LXNjaGVkdWxpbmctaW4tb3BlcmF0aW5nLXN5c3RlbXMv&ntb=1
https://www.bing.com/ck/a?!
&&p=ba9c2ff49d6a4dc6JmltdHM9MTcxMDQ2MDgwMCZpZ3VpZD0wNzQ1YmI0Yi04ZWZjLTY
5MDAtMjM2Zi1hODg1OGYyNzY4NTEmaW5zaWQ9NTU0Mg&ptn=3&ver=2&hsh=3&fclid=0745
bb4b-8efc-6900-236f-
a8858f276851&psq=UNIX+Operating+System+Process+Management&u=a1aHR0cHM6Ly93ZWJlZ
HVjbGljay5jb20vcHJvY2Vzcy1tYW5hZ2VtZW50LWluLXVuaXgv&ntb=1