• No results found

Chapter 10: Virtual Memory. Lesson 08: Demand Paging and Page Swapping

N/A
N/A
Protected

Academic year: 2021

Share "Chapter 10: Virtual Memory. Lesson 08: Demand Paging and Page Swapping"

Copied!
20
0
0

Loading.... (view fulltext now)

Full text

(1)

Chapter 10: Virtual Memory

Lesson 08:

(2)

Objective

• Learn demand paging, pages of data are only brought into the main memory when a program accesses them

• Learn swapping technique that uses magnetic or other media to store the state of programs

(3)

Objective

• Understand the use of swapping by the

operating system to treat all of a program’s data as an atomic unit and moves all of the data into or out of the main memory at one time

(4)
(5)

Demand paging

• Pages of data are only brought into the main memory when a program accesses them

• When a context switch occurs, the operating system does not copy any of the old program’s pages out to the disk or any of the new

program’s pages into the main memory

• Instead, it just begins executing the new program and fetches that program’s pages as they are

(6)

Demand paging

• When a context switch occurs, the operating system does not copy any of the old program’s pages out to the disk or any of the new

program’s pages into the main memory

• Instead, it just begins executing the new program and fetches that program’s pages as they are

(7)
(8)

Demand-paging systems advantage

• Only fetch the pages of data that a program actually uses from the disk

• If a program only needs to reference a fraction of its data during each timeslice of execution, this can significantly reduce the amount of time

(9)

Demand-paging systems advantage

• Individual pages of a program’s data can be

brought into the memory as needed, making the limit on the maximum amount of data a program can reference the amount of space available on the disk, not the amount of main memory

(10)

Advantages of demand paging

• Outweigh the disadvantages for most applications

• Demand paging─ the choice for most current

(11)
(12)

Swapping

• A related technique that uses magnetic or other media to store the state of programs that are not currently running on the processor

• In a system that uses swapping, the operating system treats all of a program’s data as an

atomic unit and moves all of the data into or out of the main memory at one time

(13)

Swapping

• When the operating system on a computer that uses swapping selects a program to run on the processor, it loads all of the program’s data into the main memory, evicting other programs from the main memory if necessary

(14)

Programs being executed on a computer

fitting into the main memory

• If all of the (counting both their instructions and data) fit into the main, both demand paging and swapping allow the computer to operate in a

multiprogrammed mode without having to fetch data from disk

(15)

Swapping systems advantage

• Once a program has been fetched from disk, all of the program’s data is mapped in the main

memory

• This makes the execution time of the program more predictable, since page faults never occur during a program’s use of the CPU

(16)

Swapping disadvantage over demand paging

• Systems that use swapping typically cannot use their magnetic storage to allow a single program to reference more data than fits in the main

memory

• All of a program’s data must be swapped into or out of the main memory as a unit

(17)
(18)

We learnt

• Demand paging requires only the fetch of pages of data that a program actually uses from the

magnetic disk or other media

• Swapping system requires that the operating system treats all of a program’s data as an

atomic unit and moves all of the data into or out of the main memory at one time

(19)

We learnt

• Swapping makes the execution time of the program more predictable, since page faults

never occur during a program’s use of the CPU • Demand paging advantages outweigh the

(20)

End of Lesson 08 on

References

Related documents

Applications of Fourier transform ion cyclotron resonance (FT-ICR) and orbitrap based high resolution mass spectrometry in metabolomics and lipidomics. LC–MS-based holistic metabolic

Las características particulares de los eventos secos y húmedos ocurridos en la región de la cuenca hidrográfica de la laguna Sauce Grande, durante el período 1971- 2010, se

Sú č as ť ou názvu uzavretého podielového fondu musí by ť aj obchodné meno správcovskej spolo č nosti spravujúcej tento fond a názov fondu s uvedením slov

A recent analysis conducted by University of Redlands School of Business Professor Mak Kaboudan confirms that for teachers who earn a master’s degree from the University of

The activation of the intangible cultural heritage of Cante Alentejano, is part of a Regional Entity’s Strategy of Tourism of Alentejo and Ribatejo (ERTAR)) and

MOTION: Chair Bettelli moved to recommend to Ways and Means that, due to the accelerated schedule of the Charleston County Consolidated Dispatch system, the City proceed with

Introducing Torin1 (an inhibitor of mTORC1/mTORC2) did not affect IGF-11 expression; whereas, using rapamycin abrogated IGF-11 expression, suggesting that a rapamycin-sensitive

Specifically, the most effective intervention (free cessation aids plus $600 in redeemable funds) helped 2.9% of participants stop smoking through six months after their target