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

More Related Content

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

What's hot

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

Similar to Paging and Segmentation

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

Recently uploaded

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

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