SlideShare a Scribd company logo
2
Most read
5
Most read
7
Most read
Swap-space
Management
Swap-Space Management
• Swap-space — virtual memory uses disk
space as an extension of main memory.
• Main goal for the design and
implementation of swap space is to
provide the best throughput for VM system
• Swap-space use –Swapping –use swap
space to hold entire process image –
Paging –store pages that have been
pushed out of memory
Swap-Space
Management(con..)
• Some OS may support multiple swap-
space
–Put on separate disks to balance the
load
• Better to overestimate than underestimate
–If out of swap-space, some
processes must be aborted or system
crashed
Swap-Space Location
• Swap-space can be carved out of the
normal file system, or in a separate disk
partition.
• A large file within the file system: simple
but inefficient
–Navigating the directory structure and
the disk-allocation data structure takes
time and potentially extra disk accesses
Swap-Space Location (con..)
–External fragmentation can greatly increase
swapping times by forcing multiple seeks during
reading or writing of a process image
–Improvement
• Caching block location information in main
memory
• Contiguous allocation for the swap file
–But, the cost of traversing FS data structure
still remains
Swap-Space Location (con..)
• In a separate partition: raw partition
–Create a swap space during disk partitioning
–A separate swap-space storage manager is
used to allocate and de-allocate blocks
–Use algorithms optimized for speed, rather
than storage efficiency –Internal fragment may
increase
•Linux supports both approaches
Swap-space Management:
Example
• Solaris 1
–Text-segment pages are brought in
from the file system and are thrown away
if selected for paged out
• More efficient to re-read from FS than
write it to the swap space
–Swap space: only used as a backing
store for pages of anonymous memory
Example
• Stack, heap, and uninitialized data
• Solaris 2
–Allocates swap space only when a
page is forced out of physical memory
• Not when the virtual memory page is first
created.
Data Structures for Swapping on
Linux Systems
Data Structures for Swapping on
Linux Systems

More Related Content

What's hot (20)

PPT
Memory Management in OS
vampugani
 
PPTX
Cache memory
Shailesh Tanwar
 
PPTX
Deadlock in database
Tayyab Hussain
 
PPTX
Demand paging
Trinity Dwarka
 
PPT
Chapter 12 - Mass Storage Systems
Wayne Jones Jnr
 
PPTX
Memory Organization
Kamal Acharya
 
PPTX
Presentation on Segmentation
Priyanka bisht
 
PDF
Memory management
Rajni Sirohi
 
PPTX
Operating Systems: Device Management
Damian T. Gordon
 
PPTX
Operating system memory management
rprajat007
 
PPT
File system
Harleen Johal
 
PPTX
Memory Management in OS
Kumar Pritam
 
PPTX
Process synchronization
Syed Hassan Ali
 
PPTX
Segmentation in operating systems
Dr. Jasmine Beulah Gnanadurai
 
PPTX
Memory management ppt
ManishaJha43
 
PPTX
Computer architecture virtual memory
Mazin Alwaaly
 
PPTX
Shadow paging
GowriLatha1
 
PDF
Cs8493 unit 4
Kathirvel Ayyaswamy
 
PPTX
File system structure
sangrampatil81
 
Memory Management in OS
vampugani
 
Cache memory
Shailesh Tanwar
 
Deadlock in database
Tayyab Hussain
 
Demand paging
Trinity Dwarka
 
Chapter 12 - Mass Storage Systems
Wayne Jones Jnr
 
Memory Organization
Kamal Acharya
 
Presentation on Segmentation
Priyanka bisht
 
Memory management
Rajni Sirohi
 
Operating Systems: Device Management
Damian T. Gordon
 
Operating system memory management
rprajat007
 
File system
Harleen Johal
 
Memory Management in OS
Kumar Pritam
 
Process synchronization
Syed Hassan Ali
 
Segmentation in operating systems
Dr. Jasmine Beulah Gnanadurai
 
Memory management ppt
ManishaJha43
 
Computer architecture virtual memory
Mazin Alwaaly
 
Shadow paging
GowriLatha1
 
Cs8493 unit 4
Kathirvel Ayyaswamy
 
File system structure
sangrampatil81
 

Similar to Swap-space Management (20)

PPT
Class notesfeb27
Indian Oil Corporation
 
PPT
Linux Memory Management
Rajan Kandel
 
PPTX
OS UNIT4.pptx
DHANABALSUBRAMANIAN
 
PPTX
UNIT IV.pptx
YogapriyaJ1
 
PPTX
Module5 secondary storage
ChethanaThammaiah
 
PPTX
Mass storage systemsos
Gokila Manickam
 
PPTX
Os unit 3
SandhyaTatekalva
 
PPT
Driver development – memory management
Vandana Salve
 
PPTX
Swapping | Computer Science
Transweb Global Inc
 
PPT
Thiru
Thiru Selvi
 
PPT
kerch04.ppt
KalimuthuVelappan
 
PPT
Mass storage systems presentation operating systems
night1ng4ale
 
PPT
Unit 4 DBMS.ppt
HARRSHITHAASCSE
 
PPTX
18CSC205J Operating Systemkooks-Unit-5.pptx
abcdefgh690537
 
PPT
08 operating system support
Sher Shah Merkhel
 
PPTX
Massstorage
mari sami
 
PPTX
unit 2 - book ppt.pptxtyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
0710harish
 
PPTX
File system and Deadlocks
Rohit Jain
 
PPTX
dbms presentation:- buffer managenment presentation.pptx
sakshikanthale2023
 
Class notesfeb27
Indian Oil Corporation
 
Linux Memory Management
Rajan Kandel
 
OS UNIT4.pptx
DHANABALSUBRAMANIAN
 
UNIT IV.pptx
YogapriyaJ1
 
Module5 secondary storage
ChethanaThammaiah
 
Mass storage systemsos
Gokila Manickam
 
Os unit 3
SandhyaTatekalva
 
Driver development – memory management
Vandana Salve
 
Swapping | Computer Science
Transweb Global Inc
 
kerch04.ppt
KalimuthuVelappan
 
Mass storage systems presentation operating systems
night1ng4ale
 
Unit 4 DBMS.ppt
HARRSHITHAASCSE
 
18CSC205J Operating Systemkooks-Unit-5.pptx
abcdefgh690537
 
08 operating system support
Sher Shah Merkhel
 
Massstorage
mari sami
 
unit 2 - book ppt.pptxtyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
0710harish
 
File system and Deadlocks
Rohit Jain
 
dbms presentation:- buffer managenment presentation.pptx
sakshikanthale2023
 
Ad

More from Agnas Jasmine (8)

PPT
Kavi
Agnas Jasmine
 
PPT
Windows 2000
Agnas Jasmine
 
PPT
Disk structure
Agnas Jasmine
 
PPT
Disk scheduling
Agnas Jasmine
 
PPT
Disk management
Agnas Jasmine
 
PPT
In out system
Agnas Jasmine
 
Windows 2000
Agnas Jasmine
 
Disk structure
Agnas Jasmine
 
Disk scheduling
Agnas Jasmine
 
Disk management
Agnas Jasmine
 
In out system
Agnas Jasmine
 
Ad

Recently uploaded (16)

PPTX
MSadfadsfafdadfccadradfT_Presentation.pptx
pahalaedward2
 
PDF
AiDAC – Custody Platform Overview for Institutional Use.pdf
BobPesakovic
 
PPTX
Birth-after-Previous-Caesarean-Birth (1).pptx
fermann1
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
How Much GB RAM Do You Need for Coding? 5 Powerful Reasons 8GB Is More Than E...
freeshopbudget
 
PPTX
InOffensive Security_cybersecurity2.pptx
wihib17507
 
DOCX
An_Operating_System by chidi kingsley wo
kingsleywokocha4
 
PDF
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
GEO Strategy 2025: Complete Presentation Deck for AI-Powered Customer Acquisi...
Zam Man
 
PPTX
Finally, My Best IPTV Provider That Understands Movie Lovers Experience IPTVG...
Rafael IPTV
 
PPTX
AI at Your Side: Boost Impact Without Losing the Human Touch (SXSW 2026 Meet ...
maytaldahan
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPTX
Internet Basics for class ix. Unit I. Describe
ASHUTOSHKUMAR1131
 
PDF
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
PDF
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
MSadfadsfafdadfccadradfT_Presentation.pptx
pahalaedward2
 
AiDAC – Custody Platform Overview for Institutional Use.pdf
BobPesakovic
 
Birth-after-Previous-Caesarean-Birth (1).pptx
fermann1
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
How Much GB RAM Do You Need for Coding? 5 Powerful Reasons 8GB Is More Than E...
freeshopbudget
 
InOffensive Security_cybersecurity2.pptx
wihib17507
 
An_Operating_System by chidi kingsley wo
kingsleywokocha4
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
GEO Strategy 2025: Complete Presentation Deck for AI-Powered Customer Acquisi...
Zam Man
 
Finally, My Best IPTV Provider That Understands Movie Lovers Experience IPTVG...
Rafael IPTV
 
AI at Your Side: Boost Impact Without Losing the Human Touch (SXSW 2026 Meet ...
maytaldahan
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
Internet Basics for class ix. Unit I. Describe
ASHUTOSHKUMAR1131
 
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 

Swap-space Management

  • 2. Swap-Space Management • Swap-space — virtual memory uses disk space as an extension of main memory. • Main goal for the design and implementation of swap space is to provide the best throughput for VM system • Swap-space use –Swapping –use swap space to hold entire process image – Paging –store pages that have been pushed out of memory
  • 3. Swap-Space Management(con..) • Some OS may support multiple swap- space –Put on separate disks to balance the load • Better to overestimate than underestimate –If out of swap-space, some processes must be aborted or system crashed
  • 4. Swap-Space Location • Swap-space can be carved out of the normal file system, or in a separate disk partition. • A large file within the file system: simple but inefficient –Navigating the directory structure and the disk-allocation data structure takes time and potentially extra disk accesses
  • 5. Swap-Space Location (con..) –External fragmentation can greatly increase swapping times by forcing multiple seeks during reading or writing of a process image –Improvement • Caching block location information in main memory • Contiguous allocation for the swap file –But, the cost of traversing FS data structure still remains
  • 6. Swap-Space Location (con..) • In a separate partition: raw partition –Create a swap space during disk partitioning –A separate swap-space storage manager is used to allocate and de-allocate blocks –Use algorithms optimized for speed, rather than storage efficiency –Internal fragment may increase •Linux supports both approaches
  • 7. Swap-space Management: Example • Solaris 1 –Text-segment pages are brought in from the file system and are thrown away if selected for paged out • More efficient to re-read from FS than write it to the swap space –Swap space: only used as a backing store for pages of anonymous memory
  • 8. Example • Stack, heap, and uninitialized data • Solaris 2 –Allocates swap space only when a page is forced out of physical memory • Not when the virtual memory page is first created.
  • 9. Data Structures for Swapping on Linux Systems
  • 10. Data Structures for Swapping on Linux Systems