0% found this document useful (0 votes)
38 views2 pages

Osy t2

1. The process state diagram scheduler shows the different states a process can be in: ready, running, wait, and terminated. 2. A process is an executing program, and one or more threads run within the context of the process. A thread is a single sequential stream of execution within a process, also called a lightweight process. 3. The diagram shows different thread models with user-level threads managed by a user-level thread library, and kernel-level threads managed by the operating system kernel.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views2 pages

Osy t2

1. The process state diagram scheduler shows the different states a process can be in: ready, running, wait, and terminated. 2. A process is an executing program, and one or more threads run within the context of the process. A thread is a single sequential stream of execution within a process, also called a lightweight process. 3. The diagram shows different thread models with user-level threads managed by a user-level thread library, and kernel-level threads managed by the operating system kernel.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Summarize Process state diagram scheduler

start Ready Running Termint

Wait

2. Define process and thread


A process, in the simplest terms, is an executing program. One or more threads run in the
context of the process.
A thread is a single sequence stream within a process thread are also called as light weight
process
3. Draw diagram of different thread models

User lavel thread

User ara
Thread Library

Kernal level thraed


process

4. Why page replacement is needed


Page replacement algorithms are an important part of virtual memory management and it helps
the OS to decide which memory page can be moved out, making space for the currently needed
page. The ultimate objective of all page replacement algorithms is to reduce the number of the
page faults.
5. Summarize necessary four condition for deadlock
1. Mutual Exclusion : two or more resources are non shareable only one process can be
used at a time
2. Hold and wait : a process is holdind atleast once resources and waiting for another
process
3. No preemption : a resources cannot be taken from a process unless the process release
the resources
4. Circuler wait : a set of process are waiting for each other to circuler form

6. Comparison among scheduler


A Long-Term Scheduler helps in controlling the overall degree of multiprogramming.
-It is almost absent or minimal in time sharing sysytem
The Short-Term Scheduler provides much less control over the degree of
multiprogramming.
- it also minimal in time sharing system
Medium-Term reduces the overall degree of multiprogramming. Selects processes from the
pool and then loads them into the memory for execution.
- It’s a part of time sharing system
7. A
8. Process AT BT CT TT WT
P1 0 6 19 19 12
P2 1 4 13 12 7
P3 2 2 6 4 1
P4 3 1 4 1 0
P5 4 2 9 5 3
P6 5 1 7 2 1

P1 P2 P3 P4 P5 P6 P5 P2 P1
0 1 2 3 4 6 7 9 13 19

Turn around avg = total /no. of process


= 19 + 12 + 4 + 1 + 5 + 2 / 6
= 43/6 = 7.166

Waiting avg = total/ no.of process


= 12 + 7 + 1 + 0 + 3 + 1 / 6
= 24/6 =4

You might also like