PAGING
A PRESENTATION BY ARIJIT ROY
COMPUTER SCIENCE & ENGG. DEPT., 2ND YEAR
HOOGHLY ENGINEERING & TECHNOLOGY COLLEGE
PROCESSOR AND MEMORY
INTERCONNECTION
PROCESSOR & MEMORY
INTERACTION
Processor executes different processes
within it.
To execute a particular process, processor
will call that process.
But there is a fact. Within the memory a
process cannot store itself as a whole. Here
the concept of paging comes.
PAGING
 A process is divided into some smaller parts , known as page. In another way
we can say that a page is the smallest length of contiguous block of physical
memory.
 We take an example, that will make easier to understand the concept of page.
Suppose a process has a size of 4 Bytes. This process is divided into 2 pages.
Each page consists of 2 Bytes. So, every page size is 2 Bytes. Here, Bytes are also
called as word.
INSIDE THE SECONDARY MEMORY
 There are several processes that are kept inside the
secondary memory storage. A bunch of processes are
kept as a unit inside the secondary storage device.
Suppose, we consider HDD (Hard Disk Drive) as a
secondary storage device. There are several tracks in
HDD. Each track consists of many sectors.
Every Sector stores different processes and data as a
bunch in a sequential order.
SECONDARY STORAGE DEVICE
HOW A PROCESS COMES INSIDE RAM
THROUGH PAGING
 When processor needs a word then it generates an address and
according to the address processor will search the word in Cache
and RAM.
 If it is not found in main memory then Operating system takes the
control in its hand. It searches in secondary memory. OS trace that
inside which process that required word is present.
 When that process is found then according to paging, process is
divided into several pages of equal size.
 Then that pages are transferred into RAM.
DIAGRAMMATIC EXPLANATION OF PAGING
DIAGRAMMATIC EXPLANATION OF PAGING
DIAGRAMMATIC EXPLANATION OF PAGING
DIAGRAMMATIC EXPLANATION OF PAGING
W1
DIAGRAMMATIC EXPLANATION OF PAGING
W1
DIAGRAMMATIC EXPLANATION OF PAGING
DIAGRAMMATIC EXPLANATION OF PAGING
W0 W1
W2 W3
DIAGRAMMATIC EXPLANATION OF PAGING
W0 W1
W2 W3
DIAGRAMMATIC EXPLANATION OF PAGING
W0 W1
W2 W3
DIAGRAMMATIC EXPLANATION OF PAGING
W0 W1
W2 W3
DIAGRAMMATIC EXPLANATION OF PAGING
DIAGRAMMATIC EXPLANATION OF PAGING
SUPPOSE, ALL THE
FRAMES ARE FULL
WITH DIFFERENT
PAGES. THAT MEANS,
IN THIS SITUATION
RAM IS FULL. NOW IF I
NEED TO PLACE SOME
ANOTHER NEW PAGE
INTO RAM, THEN
WHAT HAPPENS? HOW
IT CAN BE POSSIBLE?
SOLUTION IS PAGE REPLACEMENT
 So we have to place some pages into secondary
storage and the required process will divide into
pages and that pages will take place inside that
empty frames. This is known as Page Replacement.
This paging and page replacement is controlled by
Operating System (OS).
 Placing of a page from the secondary storage to
an empty frame is known as Roll In / Swap In.
 Placing of a page from a frame to the secondary
memory is known as Roll Out / Swap Out.
DIFFERENT PAGE REPLACEMENT
ALGORITHMS
So, which page OS have to roll out from the RAM, that depends on
different types of page replacement algorithms. Some important page
replacement algorithms are –
1. FIFO / FCFS Page Replacement Algorithm
2. LRU Page Replacement Algorithm.
3. LFU Page Replacement Algorithm.
4. Optimal Page Replacement Algorithm.
5. MFU Page Replacement Algorithm.
6. Clock Page Replacement Algorithm, etc.
So, In the next classes we
will discuss different types
of page replacement
algorithms.
I think you guys understand it and
enjoy this slide.
See you in the next class.
STAY HOME, STAY SAFE……

Paging in Computer Architecture and Operating System

  • 1.
    PAGING A PRESENTATION BYARIJIT ROY COMPUTER SCIENCE & ENGG. DEPT., 2ND YEAR HOOGHLY ENGINEERING & TECHNOLOGY COLLEGE
  • 2.
  • 3.
    PROCESSOR & MEMORY INTERACTION Processorexecutes different processes within it. To execute a particular process, processor will call that process. But there is a fact. Within the memory a process cannot store itself as a whole. Here the concept of paging comes.
  • 4.
    PAGING  A processis divided into some smaller parts , known as page. In another way we can say that a page is the smallest length of contiguous block of physical memory.  We take an example, that will make easier to understand the concept of page. Suppose a process has a size of 4 Bytes. This process is divided into 2 pages. Each page consists of 2 Bytes. So, every page size is 2 Bytes. Here, Bytes are also called as word.
  • 5.
    INSIDE THE SECONDARYMEMORY  There are several processes that are kept inside the secondary memory storage. A bunch of processes are kept as a unit inside the secondary storage device. Suppose, we consider HDD (Hard Disk Drive) as a secondary storage device. There are several tracks in HDD. Each track consists of many sectors. Every Sector stores different processes and data as a bunch in a sequential order.
  • 6.
  • 7.
    HOW A PROCESSCOMES INSIDE RAM THROUGH PAGING  When processor needs a word then it generates an address and according to the address processor will search the word in Cache and RAM.  If it is not found in main memory then Operating system takes the control in its hand. It searches in secondary memory. OS trace that inside which process that required word is present.  When that process is found then according to paging, process is divided into several pages of equal size.  Then that pages are transferred into RAM.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
    DIAGRAMMATIC EXPLANATION OFPAGING W0 W1 W2 W3
  • 15.
    DIAGRAMMATIC EXPLANATION OFPAGING W0 W1 W2 W3
  • 16.
    DIAGRAMMATIC EXPLANATION OFPAGING W0 W1 W2 W3
  • 17.
    DIAGRAMMATIC EXPLANATION OFPAGING W0 W1 W2 W3
  • 18.
  • 19.
    DIAGRAMMATIC EXPLANATION OFPAGING SUPPOSE, ALL THE FRAMES ARE FULL WITH DIFFERENT PAGES. THAT MEANS, IN THIS SITUATION RAM IS FULL. NOW IF I NEED TO PLACE SOME ANOTHER NEW PAGE INTO RAM, THEN WHAT HAPPENS? HOW IT CAN BE POSSIBLE?
  • 20.
    SOLUTION IS PAGEREPLACEMENT  So we have to place some pages into secondary storage and the required process will divide into pages and that pages will take place inside that empty frames. This is known as Page Replacement. This paging and page replacement is controlled by Operating System (OS).  Placing of a page from the secondary storage to an empty frame is known as Roll In / Swap In.  Placing of a page from a frame to the secondary memory is known as Roll Out / Swap Out.
  • 21.
    DIFFERENT PAGE REPLACEMENT ALGORITHMS So,which page OS have to roll out from the RAM, that depends on different types of page replacement algorithms. Some important page replacement algorithms are – 1. FIFO / FCFS Page Replacement Algorithm 2. LRU Page Replacement Algorithm. 3. LFU Page Replacement Algorithm. 4. Optimal Page Replacement Algorithm. 5. MFU Page Replacement Algorithm. 6. Clock Page Replacement Algorithm, etc.
  • 22.
    So, In thenext classes we will discuss different types of page replacement algorithms.
  • 23.
    I think youguys understand it and enjoy this slide. See you in the next class. STAY HOME, STAY SAFE……