SlideShare uma empresa Scribd logo
1 de 23
Segmentation And Paging
For HCTM Kaithal Presented By :
Madhur Gupta
1712159
CSE 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: RAM
2. Logical Memory- CPU memory
3. Virtual memory- An imaginary memory area supported by some
operating systems (for example, Windows). It is an extension of logical
memory
 If the size of the program is
greater than the available
memory size, then the concept
of virtual memory is used
 Ever wondered how a 10GB
Game like God OfWar fits into
your 2GB RAM computer?
 Paging is a memory management technique in which the memory
is divided into fixed size pages.
 Paging is used for faster access to data.
 It is a logical concept
STATEMENT 1
STATEMENT 2
STATEMENT 3
STATEMENT 4
STATEMENT 5
STATEMENT 6
STATEMENT 7
Suppose a program X consists of 7
statements. But the memory can hold only
4 statements, then Paging concept is used.
PROGRAM X
STATEMENT 1
STATEMENT 2
STATEMENT 3
STATEMENT 4
STATEMENT 5
STATEMENT 6
STATEMENT 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
(WHERE
PAGESARE
DIVIDED)
MMU
Memory 1 Memory 2Virtual address of
each page
Converts virtual
address to
physical address
 If any error error occurs at any
physical address, it is quickly
retrieved from memory and
sent to the CPU
0 0 0 0 0 1 0 1 1 1 0 1 1 1 0
6-bit page # 10-bit offset #
16-bit logical address
0 0 0 0 1 0 1
1 0 0 0 1 1 0
0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0
PageTable
16-bit Physical address
 LOGICAL ADDRESS
PAGE NUMBER
(WHICH PAGE ISTO BE
SEARCHED INTHE
MEMORY)
PAGE OFFSET
(WHICH BYTE OF DATA ISTO
BE READ FROMTHAT PAGE)
MAXIMUM OF 6 BYTES MAXIMUM OF 10 BYTES
 PHYSICAL ADDRESS
FRAME NUMBER FRAME OFFSET
MAXIMUM OF 6 BYTES MAXIMUM OF 10 BYTES
LOGICAL ADDRESS
PAGE P0
P1
P2
P3
P4
P5
P6
P7
MAPPING
PHYSICAL
ADDRESS
P7
P2
P1
P5
FO
F1
F2
F3
page
frame 0
page
frame 1
page
frame 2
page
frame 3
physical memory
offset
physical address
F3’s Value
F3
F2
F0
page table(MMU)
offset
logical address
P=3
CPU
P0
P1
P2
P3
P4
P5
P6
P7
F1
The paging process is protected by the concept of
insertion 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 is
considered
The remaining processes are considered as Invalid
In this way the pages are internally fragmented
This is how Paging is protected
• No external
Fragmentation
• Simple memory
management
algorithm
• Swapping is easy
(Equal sized Pages
and Page Frames)
• Internal
fragmentation
• Page tables may
consume more
memory.
 Segmentation is one of the most common ways to achieve memory protection.
 Because internal fragmentation of pages takes place, the user’s view of
memory 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 of
permissions.
 When a process tries to access the memory it is first checked to see whether it
has the required permission to access the particular memory segment and
whether it is within the length specified by that particular memory segment.
1
3
2
4
1
4
2
3
user space physical memory space
Free
Free
 Segment table - maps two-dimensional user defined address into one-
dimensional physical address
 base - starting physical address of the segment
 limit - length of segment
Logical Address space
Segment number
Offset
The maximum length of the offset value is 12 bits
Logical
Address
0<d<limit
 No internal fragmentation
 Segment tables consume less
memory than page
 Lends itself to sharing data
among processes.
 Lends itself to protection.
Costly memory management
algorithm
As processes are loaded and
removed from memory , the
free memory space is broken
into little pieces ,causing
external fragmentation
In a combined
paging/segmentation
system a user’s address
space is broken up into a
number of segments.
Each segment is broken
up into a number of fixed-
sized pages which are
equal in length to a main
memory frame
Segmentation is visible to
the programmer
Paging is transparent to
the 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

Mais conteúdo relacionado

Mais procurados

Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memoryMazin Alwaaly
 
Operating system paging and segmentation
Operating system paging and segmentationOperating system paging and segmentation
Operating system paging and segmentationhamza haseeb
 
File System and File allocation tables
File System and File allocation tablesFile System and File allocation tables
File System and File allocation tablesshashikant pabari
 
Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt Arpita Naik
 
basics of virtual memory
basics of virtual memorybasics of virtual memory
basics of virtual memoryAdarsh Patel
 
Elements of cache design
Elements of cache designElements of cache design
Elements of cache designRohail Butt
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithmssangrampatil81
 
Operating system 40 lru algorithm
Operating system 40 lru algorithmOperating system 40 lru algorithm
Operating system 40 lru algorithmVaibhav Khanna
 
Computer architecture memory system
Computer architecture memory systemComputer architecture memory system
Computer architecture memory systemMazin Alwaaly
 
FILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMSFILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMSAbhishek Dutta
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1Anwal Mirza
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208Ameer Mehmood
 

Mais procurados (20)

Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Operating system paging and segmentation
Operating system paging and segmentationOperating system paging and segmentation
Operating system paging and segmentation
 
File System and File allocation tables
File System and File allocation tablesFile System and File allocation tables
File System and File allocation tables
 
Memory management
Memory managementMemory management
Memory management
 
Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt
 
Cache memory
Cache memoryCache memory
Cache memory
 
basics of virtual memory
basics of virtual memorybasics of virtual memory
basics of virtual memory
 
Elements of cache design
Elements of cache designElements of cache design
Elements of cache design
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Operating system 40 lru algorithm
Operating system 40 lru algorithmOperating system 40 lru algorithm
Operating system 40 lru algorithm
 
Swapping | Computer Science
Swapping | Computer ScienceSwapping | Computer Science
Swapping | Computer Science
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Computer architecture memory system
Computer architecture memory systemComputer architecture memory system
Computer architecture memory system
 
Memory management
Memory managementMemory management
Memory management
 
FILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMSFILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMS
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208
 

Semelhante a Paging and Segmentation

Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating SystemRaj Mohan
 
Bab 4
Bab 4Bab 4
Bab 4n k
 
Unit 5Memory management.pptx
Unit 5Memory management.pptxUnit 5Memory management.pptx
Unit 5Memory management.pptxSourabhRaj29
 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementkazim Hussain
 
Memory Managment(OS).pptx
Memory Managment(OS).pptxMemory Managment(OS).pptx
Memory Managment(OS).pptxRohitPaul71
 
Main memory os - prashant odhavani- 160920107003
Main memory   os - prashant odhavani- 160920107003Main memory   os - prashant odhavani- 160920107003
Main memory os - prashant odhavani- 160920107003Prashant odhavani
 
Memory management
Memory managementMemory management
Memory managementcpjcollege
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptxRajapriya82
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsDrishti Bhalla
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OSC.U
 

Semelhante a Paging and Segmentation (20)

Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
Bab 4
Bab 4Bab 4
Bab 4
 
Unit 5Memory management.pptx
Unit 5Memory management.pptxUnit 5Memory management.pptx
Unit 5Memory management.pptx
 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory management
 
Chapter 8 - Main Memory
Chapter 8 - Main MemoryChapter 8 - Main Memory
Chapter 8 - Main Memory
 
Memory Managment(OS).pptx
Memory Managment(OS).pptxMemory Managment(OS).pptx
Memory Managment(OS).pptx
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
Main memory os - prashant odhavani- 160920107003
Main memory   os - prashant odhavani- 160920107003Main memory   os - prashant odhavani- 160920107003
Main memory os - prashant odhavani- 160920107003
 
Memory comp
Memory compMemory comp
Memory comp
 
Memory management OS
Memory management OSMemory management OS
Memory management OS
 
Ch8
Ch8Ch8
Ch8
 
Operating system
Operating systemOperating system
Operating system
 
Memory management
Memory managementMemory management
Memory management
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating Systems
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
 
OSCh9
OSCh9OSCh9
OSCh9
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
 

Último

Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Pooja Nehwal
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointGetawu
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsPooja Nehwal
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...Suhani Kapoor
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...Call Girls in Nagpur High Profile
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样qaffana
 
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)kojalkojal131
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...Pooja Nehwal
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查awo24iot
 
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...Pooja Nehwal
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Último (20)

Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power point
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call Girls
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
 
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
young call girls in Sainik Farm 🔝 9953056974 🔝 Delhi escort Service
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
 
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
 
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 

Paging and Segmentation

  • 1. Segmentation And Paging For HCTM Kaithal Presented By : Madhur Gupta 1712159 CSE 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-Total memory of the computer. EX: RAM 2. Logical Memory- CPU memory 3. Virtual memory- An imaginary memory area supported by some operating systems (for example, Windows). It is an extension of logical memory
  • 4.  If the size of the program is greater than the available memory size, then the concept of virtual memory is used  Ever wondered how a 10GB Game like God OfWar fits into your 2GB RAM computer?
  • 5.  Paging is a memory management technique in which the memory is divided into fixed size pages.  Paging is used for faster access to data.  It is a logical concept
  • 6. STATEMENT 1 STATEMENT 2 STATEMENT 3 STATEMENT 4 STATEMENT 5 STATEMENT 6 STATEMENT 7 Suppose a program X consists of 7 statements. But the memory can hold only 4 statements, then Paging concept is used. PROGRAM X STATEMENT 1 STATEMENT 2 STATEMENT 3 STATEMENT 4 STATEMENT 5 STATEMENT 6 STATEMENT 7
  • 7.  Frames are physical concept  It is present in the RAM  We cannot see Pages, but we can see Frames
  • 8.  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 (WHERE PAGESARE DIVIDED) MMU Memory 1 Memory 2Virtual address of each page Converts virtual address to physical address  If any error error occurs at any physical address, it is quickly retrieved from memory and sent to the CPU
  • 9. 0 0 0 0 0 1 0 1 1 1 0 1 1 1 0 6-bit page # 10-bit offset # 16-bit logical address 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 PageTable 16-bit Physical address
  • 10.  LOGICAL ADDRESS PAGE NUMBER (WHICH PAGE ISTO BE SEARCHED INTHE MEMORY) PAGE OFFSET (WHICH BYTE OF DATA ISTO BE READ FROMTHAT PAGE) MAXIMUM OF 6 BYTES MAXIMUM OF 10 BYTES  PHYSICAL ADDRESS FRAME NUMBER FRAME OFFSET MAXIMUM OF 6 BYTES MAXIMUM OF 10 BYTES
  • 12. page frame 0 page frame 1 page frame 2 page frame 3 physical memory offset physical address F3’s Value F3 F2 F0 page table(MMU) offset logical address P=3 CPU P0 P1 P2 P3 P4 P5 P6 P7 F1
  • 13. The paging process is protected by the concept of insertion 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 is considered The remaining processes are considered as Invalid In this way the pages are internally fragmented This is how Paging is protected
  • 14. • No external Fragmentation • Simple memory management algorithm • Swapping is easy (Equal sized Pages and Page Frames) • Internal fragmentation • Page tables may consume more memory.
  • 15.  Segmentation is one of the most common ways to achieve memory protection.  Because internal fragmentation of pages takes place, the user’s view of memory 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 of permissions.  When a process tries to access the memory it is first checked to see whether it has the required permission to access the particular memory segment and whether it is within the length specified by that particular memory segment.
  • 16. 1 3 2 4 1 4 2 3 user space physical memory space Free Free
  • 17.  Segment table - maps two-dimensional user defined address into one- dimensional physical address  base - starting physical address of the segment  limit - length of segment Logical Address space Segment number Offset The maximum length of the offset value is 12 bits
  • 19.  No internal fragmentation  Segment tables consume less memory than page  Lends itself to sharing data among processes.  Lends itself to protection. Costly memory management algorithm As processes are loaded and removed from memory , the free memory space is broken into little pieces ,causing external fragmentation
  • 20.
  • 21. In a combined paging/segmentation system a user’s address space is broken up into a number of segments. Each segment is broken up into a number of fixed- sized pages which are equal in length to a main memory frame Segmentation is visible to the programmer Paging is transparent to the 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