SlideShare a Scribd company logo
1 of 17
OPERATING SYSTEM
PANKAJ DEBBARMA
Deptt. of CSE, TIT, Narsingarh
Segmentation
CONTENTS
Segmentation
• Segmentation
• Segmentation with
paging
Figure 3-30. In a one-
dimensional address space
with growing tables, one
table may bump into another.
Segmentation Figure 3-31. A segmented memory
allows each table to grow or shrink
independently of the other tables.
Segmentation
CONSIDERATION PAG. SEG.
Need the programmer be aware that this technique
is being used?
No Yes
How many linear address spaces are there? 1 Many
Can the total address space exceed the size of
physical memory?
Yes Yes
Can procedures and data be distinguished and
separately protected?
No Yes
Can tables whose size fluctuates be accommodated
easily?
No Yes
Is sharing of procedures between users facilitated? No Yes
Segmentation
Why was paging invented?
• To get a large linear address space without
having to buy more physical memory.
Why was segmentation invented?
• To allow programs and data to be broken up
into logically independent address spaces and
to aid sharing and protection.
Segmentation
Q. Consider the following segment table:
What are the physical addresses for the following logical addresses ?
(i) 0430 (ii) 110 (iii) 2500 (iv) 3400 (v) 4112
Segment Base Length
0 219 600
1 2300 14
2 90 100
3 1327 580
4 1952 96
Segmentation
Q. On a system using simple segmentation, compute the
physical address for each of the logical addresses given the
following segment table. If the address generates a segment
fault, indicate so.
(i) 0, 99 (ii) 2, 78 (iii) 1, 265 (iv) 3, 222 (v) 0, 111
Segment Base Length
0 330 124
1 876 124
2 111 99
3 498 302
Figure 3-33. (a)-(d) Development of checkerboarding. (e) Removal of the
checkerboarding by compaction.
Figure 3-34. The MULTICS
virtual memory. (a) The
descriptor segment pointed
to the page tables.
Segmentation with Paging: MULTICS
• 218 segments (262144)
• 1 segment = 65,536 (36-
bit) words long
• Each segment treated as a
virtual memory
Figure 3-34. The MULTICS virtual memory. (b) A segment descriptor.
The numbers are the field lengths.
Segmentation with Paging: MULTICS
Figure 3-35. A 34-bit MULTICS virtual address.
Segmentation with Paging: MULTICS
When memory reference occurs, following algorithm is carried out (Figure 3-36).
1. The segment number was used to find the segment descriptor.
2. A check was made to see if the segment’s page table was in memory. If it
was, it was located. If it was not, a segment fault occurred. If there was a
protection violation, a fault (trap) occurred.
Segmentation with Paging: MULTICS
(contd.)
3. The page table entry for the
requested virtual page was
examined. If the page itself was
not in memory, a page fault was
triggered. If it was in memory,
the main-memory address of the
start of the page was extracted
from the page table entry.
4. The offset was added to the page
origin to give the main memory
address where the word was
located.
5. The read or store finally took
place.
Figure 3-36. Conversion
of a two-part MULTICS
address into a main
memory address.
Figure 3-37. A simplified
version of the MULTICS
TLB (16-word high speed).
The existence of two page
sizes made the actual TLB
more complicated.
Segmentation with Paging: MULTICS
Segmentation with Paging: MULTICS
Q. In a paged-segmented system, a virtual address
consists of 32 bits of which 12 bits are
displacement, 11 bits are segment number and
9 bits are page number. Calculate the following:
(i) Page size
(ii) Maximum segment size
(iii) Maximum number of pages
(iv) Maximum number of segments
OS-02 Segmentation.pptx

More Related Content

Similar to OS-02 Segmentation.pptx

Ca31317323
Ca31317323Ca31317323
Ca31317323
IJMER
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentation
Tech_MX
 
Table Partitioning: Secret Weapon for Big Data Problems
Table Partitioning: Secret Weapon for Big Data ProblemsTable Partitioning: Secret Weapon for Big Data Problems
Table Partitioning: Secret Weapon for Big Data Problems
John Sterrett
 
ppt on Segmentation in operationg system
ppt on Segmentation in operationg systemppt on Segmentation in operationg system
ppt on Segmentation in operationg system
suraj sharma
 

Similar to OS-02 Segmentation.pptx (20)

Operating system 34 contiguous allocation
Operating system 34 contiguous allocationOperating system 34 contiguous allocation
Operating system 34 contiguous allocation
 
PAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxPAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docx
 
os presentation.ppt
os presentation.pptos presentation.ppt
os presentation.ppt
 
Ca31317323
Ca31317323Ca31317323
Ca31317323
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentation
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and Segmentation
 
local_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptxlocal_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptx
 
os ppt.pptx
os  ppt.pptxos  ppt.pptx
os ppt.pptx
 
DataSructure-Time and Space Complexity.pptx
DataSructure-Time and Space Complexity.pptxDataSructure-Time and Space Complexity.pptx
DataSructure-Time and Space Complexity.pptx
 
Table Partitioning: Secret Weapon for Big Data Problems
Table Partitioning: Secret Weapon for Big Data ProblemsTable Partitioning: Secret Weapon for Big Data Problems
Table Partitioning: Secret Weapon for Big Data Problems
 
Chapter07_ds.ppt
Chapter07_ds.pptChapter07_ds.ppt
Chapter07_ds.ppt
 
A Dependent Set Based Approach for Large Graph Analysis
A Dependent Set Based Approach for Large Graph AnalysisA Dependent Set Based Approach for Large Graph Analysis
A Dependent Set Based Approach for Large Graph Analysis
 
Csc4320 chapter 8 2
Csc4320 chapter 8 2Csc4320 chapter 8 2
Csc4320 chapter 8 2
 
Protected mode memory addressing 8086
Protected mode memory addressing 8086Protected mode memory addressing 8086
Protected mode memory addressing 8086
 
U I - 4. 80386 Real mode.pptx
U I - 4. 80386 Real mode.pptxU I - 4. 80386 Real mode.pptx
U I - 4. 80386 Real mode.pptx
 
Paging
PagingPaging
Paging
 
previous question solve of operating system.
previous question solve of operating system.previous question solve of operating system.
previous question solve of operating system.
 
ppt on Segmentation in operationg system
ppt on Segmentation in operationg systemppt on Segmentation in operationg system
ppt on Segmentation in operationg system
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
Cache recap
Cache recapCache recap
Cache recap
 

More from Pankaj Debbarma

More from Pankaj Debbarma (17)

AI-09 Logic in AI
AI-09 Logic in AIAI-09 Logic in AI
AI-09 Logic in AI
 
AI-08 Game Playing.pptx
AI-08 Game Playing.pptxAI-08 Game Playing.pptx
AI-08 Game Playing.pptx
 
OS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptxOS-01 Virtual Memory.pptx
OS-01 Virtual Memory.pptx
 
AI-06 Search Techniques - Informed.pptx
AI-06 Search Techniques - Informed.pptxAI-06 Search Techniques - Informed.pptx
AI-06 Search Techniques - Informed.pptx
 
AI-05 Search Algorithms.pptx
AI-05 Search Algorithms.pptxAI-05 Search Algorithms.pptx
AI-05 Search Algorithms.pptx
 
CP03-Data Structures.pptx
CP03-Data Structures.pptxCP03-Data Structures.pptx
CP03-Data Structures.pptx
 
AI-04 Production System - Search Problem.pptx
AI-04 Production System - Search Problem.pptxAI-04 Production System - Search Problem.pptx
AI-04 Production System - Search Problem.pptx
 
AI-03 Problems State Space.pptx
AI-03 Problems State Space.pptxAI-03 Problems State Space.pptx
AI-03 Problems State Space.pptx
 
CP02-Structure and Union.pptx
CP02-Structure and Union.pptxCP02-Structure and Union.pptx
CP02-Structure and Union.pptx
 
Intelligent Agents
Intelligent AgentsIntelligent Agents
Intelligent Agents
 
CP01.pptx
CP01.pptxCP01.pptx
CP01.pptx
 
Computer Graphics & Visualization - 06
Computer Graphics & Visualization - 06Computer Graphics & Visualization - 06
Computer Graphics & Visualization - 06
 
HTTP and Email
HTTP and EmailHTTP and Email
HTTP and Email
 
Ppt World Wide Web
Ppt World Wide WebPpt World Wide Web
Ppt World Wide Web
 
Ppt congestion control
Ppt congestion controlPpt congestion control
Ppt congestion control
 
NETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical AddressingNETWORK LAYER - Logical Addressing
NETWORK LAYER - Logical Addressing
 
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTPTRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
 

Recently uploaded

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
Health
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 

OS-02 Segmentation.pptx

  • 1. OPERATING SYSTEM PANKAJ DEBBARMA Deptt. of CSE, TIT, Narsingarh Segmentation
  • 3. Figure 3-30. In a one- dimensional address space with growing tables, one table may bump into another.
  • 4. Segmentation Figure 3-31. A segmented memory allows each table to grow or shrink independently of the other tables.
  • 6. CONSIDERATION PAG. SEG. Need the programmer be aware that this technique is being used? No Yes How many linear address spaces are there? 1 Many Can the total address space exceed the size of physical memory? Yes Yes Can procedures and data be distinguished and separately protected? No Yes Can tables whose size fluctuates be accommodated easily? No Yes Is sharing of procedures between users facilitated? No Yes
  • 7. Segmentation Why was paging invented? • To get a large linear address space without having to buy more physical memory. Why was segmentation invented? • To allow programs and data to be broken up into logically independent address spaces and to aid sharing and protection.
  • 8. Segmentation Q. Consider the following segment table: What are the physical addresses for the following logical addresses ? (i) 0430 (ii) 110 (iii) 2500 (iv) 3400 (v) 4112 Segment Base Length 0 219 600 1 2300 14 2 90 100 3 1327 580 4 1952 96
  • 9. Segmentation Q. On a system using simple segmentation, compute the physical address for each of the logical addresses given the following segment table. If the address generates a segment fault, indicate so. (i) 0, 99 (ii) 2, 78 (iii) 1, 265 (iv) 3, 222 (v) 0, 111 Segment Base Length 0 330 124 1 876 124 2 111 99 3 498 302
  • 10. Figure 3-33. (a)-(d) Development of checkerboarding. (e) Removal of the checkerboarding by compaction.
  • 11. Figure 3-34. The MULTICS virtual memory. (a) The descriptor segment pointed to the page tables. Segmentation with Paging: MULTICS • 218 segments (262144) • 1 segment = 65,536 (36- bit) words long • Each segment treated as a virtual memory
  • 12. Figure 3-34. The MULTICS virtual memory. (b) A segment descriptor. The numbers are the field lengths. Segmentation with Paging: MULTICS
  • 13. Figure 3-35. A 34-bit MULTICS virtual address. Segmentation with Paging: MULTICS When memory reference occurs, following algorithm is carried out (Figure 3-36). 1. The segment number was used to find the segment descriptor. 2. A check was made to see if the segment’s page table was in memory. If it was, it was located. If it was not, a segment fault occurred. If there was a protection violation, a fault (trap) occurred.
  • 14. Segmentation with Paging: MULTICS (contd.) 3. The page table entry for the requested virtual page was examined. If the page itself was not in memory, a page fault was triggered. If it was in memory, the main-memory address of the start of the page was extracted from the page table entry. 4. The offset was added to the page origin to give the main memory address where the word was located. 5. The read or store finally took place. Figure 3-36. Conversion of a two-part MULTICS address into a main memory address.
  • 15. Figure 3-37. A simplified version of the MULTICS TLB (16-word high speed). The existence of two page sizes made the actual TLB more complicated. Segmentation with Paging: MULTICS
  • 16. Segmentation with Paging: MULTICS Q. In a paged-segmented system, a virtual address consists of 32 bits of which 12 bits are displacement, 11 bits are segment number and 9 bits are page number. Calculate the following: (i) Page size (ii) Maximum segment size (iii) Maximum number of pages (iv) Maximum number of segments