Difference Between Paging and Swapping
来源:互联网 发布:java replace 替换? 编辑:程序博客网 时间:2024/05/16 11:56
Paging vs Swapping
Paging is a memory management method used by operating systems. Paging allows the main memory to use data that is residing on a secondary storage device. These data are stored in the secondary storage device as blocks of equal size called pages. Paging allows the operating system to use data that will not fit in to the main memory. Swapping is a term that is used to describe the act of moving all the segments belonging to a process between the main memory and a secondary storage device.
What is Paging?
Paging is a memory management method used by operating systems. Paging allows the main memory to use data that is residing on a secondary storage device. These data are stored in the secondary storage device as blocks of same size called pages. Paging allows the operating system to use data that will not fit in to the main memory. When a program tries to access a page, first the page table is checked to see whether that page is on the main memory. Page table holds details about where the pages are stored. If it is not in the main memory, it is called a page fault. Operating system is responsible for handling page faults without showing it to the program. The operating system first finds where that particular page is stored in the secondary storage and then brings it in to an empty page frame in the main memory. Then it updates the page table to indicate that the new data is in the main memory and returns the control back to the program that initially requested the page.
What is Swapping?
Swapping is the process of moving all the segments belonging to a process between the main memory and a secondary storage device. Swapping occurs under heavier work loads. Operating system kernel would move all the memory segments belonging to a process in to an area called swap area. When selecting a process for swapping, the operating system will select a process that will not become active for a while. When the main memory has enough space to hold the process, it will be transferred back in to the main memory from the swap space so that its execution could be continued.
What is the difference between Paging and Swapping?
In paging, blocks of equal size (called pages) are transferred between the main memory and a secondary storage device, while in swapping, all the segments belonging to a process will be moved back and forth between the main memory and a secondary storage device. Since paging allows moving pages (it could be a part of the address space of a process), it is more flexible than swapping. Since, paging only moves pages (unlike swapping, which move a whole process), paging would allow more processes to reside on the main memory at the same time, when compared with a swapping system. Swapping is more suitable when running heavier workloads.
- Difference Between Paging and Swapping
- The difference between (()) and ().
- difference between "<" and "<<"
- Difference Between typedef and #define
- Difference between PCDATA and CDATA
- Difference between CComPtr and CComQIPtr
- Difference between RVCT and GCCE
- Difference between RVCT and GCCE
- difference between slist and list.
- difference between stack and heap
- Difference between replace and translate
- Difference between PrintWriter and PrintStream
- difference between Cookie and Session
- Difference Between Buffer and Cache
- Difference between Statement and preparedStatement
- Difference between .DLL And .LIB
- difference between VirtualBox and vmware
- Difference between Property and Indexer
- 日经社説 20150304 献金疑惑を招いた制度の不備
- html+js 左移右移
- 信息提醒:AlertView和UIAlertController
- hdu2444 二分图的匹配,先判断是否为二分图
- 日经社説 20150304 多様なサービスを競い合える銀行法制に
- Difference Between Paging and Swapping
- ubuntu下如何用命令行运行deb安装包
- git: command not found
- android错误之android.content.res.Resources$NotFoundException:
- C++学习:string用法
- bootstrap 栅格系统
- 社説 20150304 発送電分離案 安定供給体制の確保が前提だ
- [易飞]部件委外的一点看法
- 怎么把PDF格式资料转成PPT