Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

Sub Code:4330703

Operating
System(O.S.)
Created BY:
Patel Krisha J.-216400307135
Darji Tirth K.-216400407146
Hello!
We are Presenting Micro Project In O.S.
About Scheduling Queue &
Page Replacement Algorithms.

2
1.
Scheduling Queue
Let’s start with Scheduling Queue
“The process
manager’s activity is
process scheduling,
which involves
removing the running
process from the CPU
and selecting another
process based on a
specific strategy.”

4
Mainly Process Scheduling Queues
> Job Queue
> Ready Queue
> Device Queue
Each queue can be managed by the OS using
distinct policies (FIFO, Priority, Round Robin,
etc.).

5
6
1. JOB QUEUE:
• It contains all of the system’s processes.
• As processes enter into system, they are put into JOB
QUEUE. It is maintained in the secondary memory.

2. READY QUEUE:
• This queue maintains a list of all processes in the main
memory that are ready to run. This queue is always
filled with new processes.
• It holds processes in ready state.

7
3. DEVICE QUEUE:
• It consists of processes which are waiting for a
particular device or I/O requests.
• Each device has its own device queue.
• Many device drivers have device queues in order to
handle
I/O requests specific to the device.
WORK OF QUEUING DIAGRAM
-The process could send out an I/O request before being placed in the I/O
queue.
-The procedure could start a new one and then wait for it to finish.
-As a result of an interrupt, the process could be forcibly removed from the
CPU and returned to the ready queue.
-The process finally moves from the waiting to ready state in the first two
circumstances and then returns to the ready queue. This cycle is repeated
8
until a process is terminated.
Queueing Diagram:->

9
2.
Page Replacement
Algorithm
Now Let‘s see What is page
replacement & how it works.
“Page Replacement
Algorithm is used
when a page fault
occurs. Page Fault
means the page
referenced by the CPU
is not present in the
main memory.”

11
How‘s Page Replacement Works:->
> When the CPU generates the reference of a page, if there is
any vacant frame available in the main memory then the page
is loaded in that vacant frame. In another case, if there is no
vacant frame available in the main memory, it is required to
replace one of the pages in the main memory with the page
referenced by the CPU.
> Page Replacement Algorithm is used to decide which page
will be replaced to allocate memory to the current referenced
page.
> Different Page Replacement Algorithms suggest different
ways to decide which page is to be replaced.
> The main objective of these algorithms is to reduce the
12
number of page faults.
Different Page Replacement Algorithms:->
1. First In First Out (FIFO)
2. Least Recently Used(LRU)

1. First In First Out(FIFO):


> This algorithm is similar to the operations of the queue. All
the pages are stored in the queue in the order they are
allocated frames in the main memory. The one which is
allocated first stays in the front of the queue. The one which
is allocated the memory first is replaced first. The one
which is at the front of the queue is removed at the time of
replacement.
13
Example: Consider the Pages referenced by the CPU in the order
are 6, 7, 8, 9, 6, 7, 1, 6, 7, 8, 9, 1

• As in the above figure shown, Let there are 3 frames in the memory.
• 6, 7, 8 are allocated to the vacant slots as they are not in memory.
• When 9 comes page fault occurs, it replaces 6 which is the oldest in memory or
front element of the queue.
• Then 6 comes (Page Fault), it replaces 7 which is the oldest page in memory now.
• Similarly, 7 replaces 8, 1 replaces 9.
• Then 6 comes which is already in memory (Page Hit).
• Then 7 comes (Page Hit).

14
• Then 8 replaces 6, 9 replaces 7. Then 1 comes (Page Hit).
Number Of Page Faults = 9

• While using the First In First Out algorithm, the number of page faults increases
by increasing the number of frames. This phenomenon is called Belady's
Anomaly.

• Let's take the same above order of pages with 4 frames.

15
Team Presentation

Imani Jackson Marcos Galán Ixchel Valdía Nils Årud


JOB TITLE JOB TITLE JOB TITLE JOB TITLE
Blue is the colour of the Blue is the colour of the Blue is the colour of the Blue is the colour of the
clear sky and the deep sea clear sky and the deep sea clear sky and the deep sea clear sky and the deep sea

16
Competitor Matrix
HIGH VALUE 2

Competitor
Compet
itor
Our company

Competitor

HIGH VALUE 1
LOW VALUE 1

Competitor

Competitor Competitor

LOW VALUE 2
17
Weekly Planner
SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY

9:00 - 9:45 Task Task Task Task Task Task Task

10:00 -
Task Task Task Task Task Task Task
10:45

11:00 -
Task Task Task Task Task Task Task
11:45

12:00 -
✔ Free time ✔ Free time ✔ Free time ✔ Free time ✔ Free time ✔ Free time ✔ Free time
13:15

13:30 -
Task Task Task Task Task Task Task
14:15

14:30 -
Task Task Task Task Task Task Task
15:15

15:30 -
Task Task Task Task Task Task Task
16:15

18
SlidesCarnival icons are
editable shapes.

This means that you can:


> Resize them without
losing quality.
> Change fill color and
opacity.
> Change line color,
width and style.
Isn’t that nice? :)

Examples:
Diagrams and infographics

20
You can also use any emoji as an icon!
And of course it resizes without losing quality.

How? Follow Google instructions


https://twitter.com/googledocs/status/730087240156643328

✋👆👉👍👤👦👧👨👩👪💃🏃💑❤😂
😉😋😒😭👶😸🐟🍒🍔💣📌📖🔨🎃🎈
🎨🏈🏰🌏🔌🔑 and many more...
21
Free templates for all your presentation needs

For PowerPoint and 100% free for personal or Ready to use, professional Blow your audience away
Google Slides commercial use and customizable with attractive visuals

You might also like