Movatterモバイル変換


[0]ホーム

URL:


MG
Uploaded byMadhur Gupta
PPTX, PDF2,656 views

Paging and Segmentation

The document discusses memory segmentation and paging techniques used in operating systems. Segmentation divides memory into variable-length segments, while paging divides memory into fixed-size pages. Paging maps logical pages to physical frame addresses using a page table for efficient memory access. It allows programs to access more memory than is physically available by swapping pages between memory and disk. The combination of segmentation and paging provides memory protection and reduces internal and external fragmentation.

Embed presentation

Downloaded 47 times
Segmentation And PagingFor HCTM Kaithal Presented By :Madhur Gupta1712159CSE A 5th Sem ( 2012-2016)
Contents InThe Presentation• Memory Segmentation• Segmentation Hardware• Advantages• Disadvantages• Paging• Frames• Mapping• Combining Segmentation with Paging
1. Physical Memory-Total memory of the computer. EX: RAM2. Logical Memory- CPU memory3. Virtual memory- An imaginary memory area supported by someoperating systems (for example, Windows). It is an extension of logicalmemory
 If the size of the program isgreater than the availablememory size, then the conceptof virtual memory is used Ever wondered how a 10GBGame like God OfWar fits intoyour 2GB RAM computer?
 Paging is a memory management technique in which the memoryis divided into fixed size pages. Paging is used for faster access to data. It is a logical concept
STATEMENT 1STATEMENT 2STATEMENT 3STATEMENT 4STATEMENT 5STATEMENT 6STATEMENT 7Suppose a program X consists of 7statements. But the memory can hold only4 statements, then Paging concept is used.PROGRAM XSTATEMENT 1STATEMENT 2STATEMENT 3STATEMENT 4STATEMENT 5STATEMENT 6STATEMENT 7
 Frames are physical concept It is present in the RAM We cannot see Pages, but we can see Frames
 Converting pages(virtual address) into frames (physical address) Enables program to be executed It is performed by the Memory Management Unit (M.M.U.)CPU(WHEREPAGESAREDIVIDED)MMUMemory 1 Memory 2Virtual address ofeach pageConverts virtualaddress tophysical address If any error error occurs at anyphysical address, it is quicklyretrieved from memory andsent to the CPU
0 0 0 0 0 1 0 1 1 1 0 1 1 1 06-bit page # 10-bit offset #16-bit logical address0 0 0 0 1 0 11 0 0 0 1 1 00 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0PageTable16-bit Physical address
 LOGICAL ADDRESSPAGE NUMBER(WHICH PAGE ISTO BESEARCHED INTHEMEMORY)PAGE OFFSET(WHICH BYTE OF DATA ISTOBE READ FROMTHAT PAGE)MAXIMUM OF 6 BYTES MAXIMUM OF 10 BYTES PHYSICAL ADDRESSFRAME NUMBER FRAME OFFSETMAXIMUM OF 6 BYTES MAXIMUM OF 10 BYTES
LOGICAL ADDRESSPAGE P0P1P2P3P4P5P6P7MAPPINGPHYSICALADDRESSP7P2P1P5FOF1F2F3
pageframe 0pageframe 1pageframe 2pageframe 3physical memoryoffsetphysical addressF3’s ValueF3F2F0page table(MMU)offsetlogical addressP=3CPUP0P1P2P3P4P5P6P7F1
The paging process is protected by the concept ofinsertion of an additional bit calledVALID/INVALID BITConsider a 14 bit address space= 2^14=16383 bytesLet us set an address limit of 10468If five process are defined within this address space(P0-P4), it is considered as aValid bitProcess P5 has started before 10468, so that alone isconsideredThe remaining processes are considered as InvalidIn this way the pages are internally fragmentedThis is how Paging is protected
• No externalFragmentation• Simple memorymanagementalgorithm• Swapping is easy(Equal sized Pagesand Page Frames)• Internalfragmentation• Page tables mayconsume morememory.
 Segmentation is one of the most common ways to achieve memory protection. Because internal fragmentation of pages takes place, the user’s view ofmemory is lost The user will view the memory as a combination of segments In this type, memory addresses used are not contiguous Each memory segment is associated with a specific length and a set ofpermissions. When a process tries to access the memory it is first checked to see whether ithas the required permission to access the particular memory segment andwhether it is within the length specified by that particular memory segment.
13241423user space physical memory spaceFreeFree
 Segment table - maps two-dimensional user defined address into one-dimensional physical address base - starting physical address of the segment limit - length of segmentLogical Address spaceSegment numberOffsetThe maximum length of the offset value is 12 bits
LogicalAddress0<d<limit
 No internal fragmentation Segment tables consume lessmemory than page Lends itself to sharing dataamong processes. Lends itself to protection.Costly memory managementalgorithmAs processes are loaded andremoved from memory , thefree memory space is brokeninto little pieces ,causingexternal fragmentation
In a combinedpaging/segmentationsystem a user’s addressspace is broken up into anumber of segments.Each segment is brokenup into a number of fixed-sized pages which areequal in length to a mainmemory frameSegmentation is visible tothe programmerPaging is transparent tothe programmer
• www.cs.mun.ca/~paul/cs3725/material/web/notes/node12.html• http://en.wikipedia.org/wiki/Memory_segmentation• http://www.gitam.edu/eresource/comp/gvr(os)/8.5.htm• http://www.cs.columbia.edu/~junfeng/13fa-w4118/lectures/l05-mem.pdf• http://www.openclarity.com/node/22• http://www.cs.columbia.edu/~junfeng/12sp-w4118/lectures/l05-mem.pdf
Paging and Segmentation

Recommended

PPTX
Memory Management in OS
PPTX
Paging and Segmentation in Operating System
PPTX
Virtual memory management in Operating System
PPT
41 page replacement fifo
PPTX
Operating system paging and segmentation
PPT
Disk scheduling
PPTX
Segmentation in Operating Systems.
PPT
Os Swapping, Paging, Segmentation and Virtual Memory
PPTX
Page replacement algorithms
PPT
Contiguous Memory Allocation.ppt
PPT
Virtual memory
PPTX
Directory structure
PPTX
Demand paging
PPT
Paging.ppt
PPTX
Segmentation in operating systems
PPT
Chapter 11 - File System Implementation
PPTX
Semophores and it's types
PDF
Memory management
PPTX
Paging and segmentation
PDF
Address Binding Scheme
PPT
Chapter 12 - Mass Storage Systems
PPTX
Memory management ppt
PPTX
Chapter 9 Operating Systems silberschatz
PPT
Chapter 10 - File System Interface
PPTX
Disk Scheduling Algorithm in Operating System
PDF
Process Scheduling in OS
PPTX
Page Replacement Algorithms.pptx
PPTX
Paging & segmentation; advantages and disadvantage
PPTX
Fragmentation_Paging_Segmentation_Class.pptx

More Related Content

PPTX
Memory Management in OS
PPTX
Paging and Segmentation in Operating System
PPTX
Virtual memory management in Operating System
PPT
41 page replacement fifo
PPTX
Operating system paging and segmentation
PPT
Disk scheduling
PPTX
Segmentation in Operating Systems.
Memory Management in OS
Paging and Segmentation in Operating System
Virtual memory management in Operating System
41 page replacement fifo
Operating system paging and segmentation
Disk scheduling
Segmentation in Operating Systems.

What's hot

PPT
Os Swapping, Paging, Segmentation and Virtual Memory
PPTX
Page replacement algorithms
PPT
Contiguous Memory Allocation.ppt
PPT
Virtual memory
PPTX
Directory structure
PPTX
Demand paging
PPT
Paging.ppt
PPTX
Segmentation in operating systems
PPT
Chapter 11 - File System Implementation
PPTX
Semophores and it's types
PDF
Memory management
PPTX
Paging and segmentation
PDF
Address Binding Scheme
PPT
Chapter 12 - Mass Storage Systems
PPTX
Memory management ppt
PPTX
Chapter 9 Operating Systems silberschatz
PPT
Chapter 10 - File System Interface
PPTX
Disk Scheduling Algorithm in Operating System
PDF
Process Scheduling in OS
PPTX
Page Replacement Algorithms.pptx
Os Swapping, Paging, Segmentation and Virtual Memory
Page replacement algorithms
Contiguous Memory Allocation.ppt
Virtual memory
Directory structure
Demand paging
Paging.ppt
Segmentation in operating systems
Chapter 11 - File System Implementation
Semophores and it's types
Memory management
Paging and segmentation
Address Binding Scheme
Chapter 12 - Mass Storage Systems
Memory management ppt
Chapter 9 Operating Systems silberschatz
Chapter 10 - File System Interface
Disk Scheduling Algorithm in Operating System
Process Scheduling in OS
Page Replacement Algorithms.pptx

Similar to Paging and Segmentation

PPTX
Paging & segmentation; advantages and disadvantage
PPTX
Fragmentation_Paging_Segmentation_Class.pptx
PPTX
Os unit 2
PPT
os presentation.ppt
PPTX
PPTX
Paging +Algorithem+Segmentation+memory management
PPTX
Memory management
PPTX
os ppt.pptx
PPT
Csc4320 chapter 8 2
DOCX
PAGIN AND SEGMENTATION.docx
PPTX
VIRTUAL MEMORY
PPTX
Memory management in operating system | Paging | Virtual memory
PDF
Ch7_OS_Lecture 4.pdf
PDF
Unit 5
PPT
NOV11 virtual memory_Engineering_CSE.ppt
PPT
NOV11 virtual memory computer organization..ppt
PPT
unit-4 class (2).ppt,Memory managements part-1
PPTX
Presentation on Segmentation
PDF
CSI-503 - 8.Paging and Segmentation
Paging & segmentation; advantages and disadvantage
Fragmentation_Paging_Segmentation_Class.pptx
Os unit 2
os presentation.ppt
Paging +Algorithem+Segmentation+memory management
Memory management
os ppt.pptx
Csc4320 chapter 8 2
PAGIN AND SEGMENTATION.docx
VIRTUAL MEMORY
Memory management in operating system | Paging | Virtual memory
Ch7_OS_Lecture 4.pdf
Unit 5
NOV11 virtual memory_Engineering_CSE.ppt
NOV11 virtual memory computer organization..ppt
unit-4 class (2).ppt,Memory managements part-1
Presentation on Segmentation
CSI-503 - 8.Paging and Segmentation

Recently uploaded

PPTX
DeremCo_Centrocot_Recycled hybrid filament for technical textiles.pptx
PDF
Robotics: Presentation in Hardware interface
PDF
Understanding the Key Differences between NVR & DVR- NVR vs DVR
PPTX
IOT BASED HOME AUTOMATION USING RASPBERRY PI.pptx
PPTX
EHC UNIT 3,4,5.pptx all in one ppt it was good
PPTX
3.5_TCP_video_slides_discover_rdt_protocol.pptx
PDF
Basics of Electronics, Understanding Microcontrollers, Actuators and Sensors
PDF
Coinbase___pdf___ Report___Transactions.
PPTX
DreamTech-The-Dream-Recorder_2.0.pptx hs
PPTX
Introduction_to_Adobe_Photoshop.pptx for
PPT
01 introduction to Data communications & Networks.ppt
PPTX
Best Call Center VoIP System Providers in USA
PDF
Open Hardware PowerPC Desktop
PPTX
FINAL LESSON 1. HUMAN COMPUTER INTERACTION
DeremCo_Centrocot_Recycled hybrid filament for technical textiles.pptx
Robotics: Presentation in Hardware interface
Understanding the Key Differences between NVR & DVR- NVR vs DVR
IOT BASED HOME AUTOMATION USING RASPBERRY PI.pptx
EHC UNIT 3,4,5.pptx all in one ppt it was good
3.5_TCP_video_slides_discover_rdt_protocol.pptx
Basics of Electronics, Understanding Microcontrollers, Actuators and Sensors
Coinbase___pdf___ Report___Transactions.
DreamTech-The-Dream-Recorder_2.0.pptx hs
Introduction_to_Adobe_Photoshop.pptx for
01 introduction to Data communications & Networks.ppt
Best Call Center VoIP System Providers in USA
Open Hardware PowerPC Desktop
FINAL LESSON 1. HUMAN COMPUTER INTERACTION

Paging and Segmentation

  • 1.
    Segmentation And PagingForHCTM Kaithal Presented By :Madhur Gupta1712159CSE A 5th Sem ( 2012-2016)
  • 2.
    Contents InThe Presentation•Memory Segmentation• Segmentation Hardware• Advantages• Disadvantages• Paging• Frames• Mapping• Combining Segmentation with Paging
  • 3.
    1. Physical Memory-Totalmemory of the computer. EX: RAM2. Logical Memory- CPU memory3. Virtual memory- An imaginary memory area supported by someoperating systems (for example, Windows). It is an extension of logicalmemory
  • 4.
     If thesize of the program isgreater than the availablememory size, then the conceptof virtual memory is used Ever wondered how a 10GBGame like God OfWar fits intoyour 2GB RAM computer?
  • 5.
     Paging isa memory management technique in which the memoryis divided into fixed size pages. Paging is used for faster access to data. It is a logical concept
  • 6.
    STATEMENT 1STATEMENT 2STATEMENT3STATEMENT 4STATEMENT 5STATEMENT 6STATEMENT 7Suppose a program X consists of 7statements. But the memory can hold only4 statements, then Paging concept is used.PROGRAM XSTATEMENT 1STATEMENT 2STATEMENT 3STATEMENT 4STATEMENT 5STATEMENT 6STATEMENT 7
  • 7.
     Frames arephysical concept It is present in the RAM We cannot see Pages, but we can see Frames
  • 8.
     Converting pages(virtualaddress) into frames (physical address) Enables program to be executed It is performed by the Memory Management Unit (M.M.U.)CPU(WHEREPAGESAREDIVIDED)MMUMemory 1 Memory 2Virtual address ofeach pageConverts virtualaddress tophysical address If any error error occurs at anyphysical address, it is quicklyretrieved from memory andsent to the CPU
  • 9.
    0 0 00 0 1 0 1 1 1 0 1 1 1 06-bit page # 10-bit offset #16-bit logical address0 0 0 0 1 0 11 0 0 0 1 1 00 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0PageTable16-bit Physical address
  • 10.
     LOGICAL ADDRESSPAGENUMBER(WHICH PAGE ISTO BESEARCHED INTHEMEMORY)PAGE OFFSET(WHICH BYTE OF DATA ISTOBE READ FROMTHAT PAGE)MAXIMUM OF 6 BYTES MAXIMUM OF 10 BYTES PHYSICAL ADDRESSFRAME NUMBER FRAME OFFSETMAXIMUM OF 6 BYTES MAXIMUM OF 10 BYTES
  • 11.
  • 12.
    pageframe 0pageframe 1pageframe2pageframe 3physical memoryoffsetphysical addressF3’s ValueF3F2F0page table(MMU)offsetlogical addressP=3CPUP0P1P2P3P4P5P6P7F1
  • 13.
    The paging processis protected by the concept ofinsertion of an additional bit calledVALID/INVALID BITConsider a 14 bit address space= 2^14=16383 bytesLet us set an address limit of 10468If five process are defined within this address space(P0-P4), it is considered as aValid bitProcess P5 has started before 10468, so that alone isconsideredThe remaining processes are considered as InvalidIn this way the pages are internally fragmentedThis is how Paging is protected
  • 14.
    • No externalFragmentation•Simple memorymanagementalgorithm• Swapping is easy(Equal sized Pagesand Page Frames)• Internalfragmentation• Page tables mayconsume morememory.
  • 15.
     Segmentation isone of the most common ways to achieve memory protection. Because internal fragmentation of pages takes place, the user’s view ofmemory is lost The user will view the memory as a combination of segments In this type, memory addresses used are not contiguous Each memory segment is associated with a specific length and a set ofpermissions. When a process tries to access the memory it is first checked to see whether ithas the required permission to access the particular memory segment andwhether it is within the length specified by that particular memory segment.
  • 16.
    13241423user space physicalmemory spaceFreeFree
  • 17.
     Segment table- maps two-dimensional user defined address into one-dimensional physical address base - starting physical address of the segment limit - length of segmentLogical Address spaceSegment numberOffsetThe maximum length of the offset value is 12 bits
  • 18.
  • 19.
     No internalfragmentation Segment tables consume lessmemory than page Lends itself to sharing dataamong processes. Lends itself to protection.Costly memory managementalgorithmAs processes are loaded andremoved from memory , thefree memory space is brokeninto little pieces ,causingexternal fragmentation
  • 21.
    In a combinedpaging/segmentationsystema user’s addressspace is broken up into anumber of segments.Each segment is brokenup into a number of fixed-sized pages which areequal in length to a mainmemory frameSegmentation is visible tothe programmerPaging is transparent tothe programmer
  • 22.
    • www.cs.mun.ca/~paul/cs3725/material/web/notes/node12.html• http://en.wikipedia.org/wiki/Memory_segmentation•http://www.gitam.edu/eresource/comp/gvr(os)/8.5.htm• http://www.cs.columbia.edu/~junfeng/13fa-w4118/lectures/l05-mem.pdf• http://www.openclarity.com/node/22• http://www.cs.columbia.edu/~junfeng/12sp-w4118/lectures/l05-mem.pdf

[8]ページ先頭

©2009-2025 Movatter.jp