SlideShare une entreprise Scribd logo
1  sur  10
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

Contenu connexe

Tendances

distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
Ashish Kumar
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
Nitish Gulati
 

Tendances (20)

Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
 
Distributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query ProcessingDistributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query Processing
 
Memory management
Memory managementMemory management
Memory management
 
Locks In Disributed Systems
Locks In Disributed SystemsLocks In Disributed Systems
Locks In Disributed Systems
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
 
VIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docxVIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docx
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docx
 
Distributed Operating Systems
Distributed Operating SystemsDistributed Operating Systems
Distributed Operating Systems
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Disk structure
Disk structureDisk structure
Disk structure
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
 

Similaire à Swap-space Management

Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
Rajan Kandel
 

Similaire à Swap-space Management (20)

Class notesfeb27
Class notesfeb27Class notesfeb27
Class notesfeb27
 
Os7
Os7Os7
Os7
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
OS UNIT4.pptx
OS UNIT4.pptxOS UNIT4.pptx
OS UNIT4.pptx
 
UNIT IV.pptx
UNIT IV.pptxUNIT IV.pptx
UNIT IV.pptx
 
Module5 secondary storage
Module5 secondary storageModule5 secondary storage
Module5 secondary storage
 
Mass storage systemsos
Mass storage systemsosMass storage systemsos
Mass storage systemsos
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
 
Driver development – memory management
Driver development – memory managementDriver development – memory management
Driver development – memory management
 
Swapping | Computer Science
Swapping | Computer ScienceSwapping | Computer Science
Swapping | Computer Science
 
Thiru
ThiruThiru
Thiru
 
kerch04.ppt
kerch04.pptkerch04.ppt
kerch04.ppt
 
Mass storage systems presentation operating systems
Mass storage systems presentation operating systemsMass storage systems presentation operating systems
Mass storage systems presentation operating systems
 
Unit 4 DBMS.ppt
Unit 4 DBMS.pptUnit 4 DBMS.ppt
Unit 4 DBMS.ppt
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
Massstorage
MassstorageMassstorage
Massstorage
 
File system and Deadlocks
File system and DeadlocksFile system and Deadlocks
File system and Deadlocks
 
UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptx
 
Os
OsOs
Os
 
Practical ,Transparent Operating System Support For Superpages
Practical ,Transparent Operating System Support For SuperpagesPractical ,Transparent Operating System Support For Superpages
Practical ,Transparent Operating System Support For Superpages
 

Plus de Agnas Jasmine (8)

Kavi
KaviKavi
Kavi
 
Os
OsOs
Os
 
Os
OsOs
Os
 
Windows 2000
Windows 2000Windows 2000
Windows 2000
 
Disk structure
Disk structureDisk structure
Disk structure
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Disk management
Disk managementDisk management
Disk management
 
In out system
In out systemIn out system
In out system
 

Dernier

Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Dernier (20)

Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 

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