SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
8.1 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Contiguous Allocation
 Main memory must support both OS and user processes
 Limited resource, must allocate efficiently
 Contiguous allocation is one early method
 Main memory usually into two partitions:
 Resident operating system, usually held in low memory with
interrupt vector
 User processes then held in high memory
 Each process contained in single contiguous section of
memory
8.2 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Contiguous Allocation (Cont.)
 Relocation registers used to protect user processes from each
other, and from changing operating-system code and data
 Base register contains value of smallest physical address
 Limit register contains range of logical addresses – each
logical address must be less than the limit register
 MMU maps logical address dynamically
 Can then allow actions such as kernel code being transient
and kernel changing size
8.3 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Hardware Support for Relocation and Limit Registers
8.4 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Multiple-partition allocation
 Multiple-partition allocation
 Degree of multiprogramming limited by number of partitions
 Variable-partition sizes for efficiency (sized to a given process’ needs)
 Hole – block of available memory; holes of various size are scattered
throughout memory
 When a process arrives, it is allocated memory from a hole large enough to
accommodate it
 Process exiting frees its partition, adjacent free partitions combined
 Operating system maintains information about:
a) allocated partitions b) free partitions (hole)
8.5 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Dynamic Storage-Allocation Problem
 First-fit: Allocate the first hole that is big enough
 Best-fit: Allocate the smallest hole that is big enough; must
search entire list, unless ordered by size
 Produces the smallest leftover hole
 Worst-fit: Allocate the largest hole; must also search entire list
 Produces the largest leftover hole
How to satisfy a request of size n from a list of free holes?
First-fit and best-fit better than worst-fit in terms of speed and storage
utilization
8.6 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Fragmentation
 External Fragmentation – total memory space exists to
satisfy a request, but it is not contiguous
 Internal Fragmentation – allocated memory may be slightly
larger than requested memory; this size difference is memory
internal to a partition, but not being used
 First fit analysis reveals that given N blocks allocated, 0.5 N
blocks lost to fragmentation
 1/3 may be unusable -> 50-percent rule
8.7 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Fragmentation (Cont.)
 Reduce external fragmentation by compaction
 Shuffle memory contents to place all free memory together
in one large block
 Compaction is possible only if relocation is dynamic, and is
done at execution time
 I/O problem
 Latch job in memory while it is involved in I/O
 Do I/O only into OS buffers
 Now consider that backing store has same fragmentation
problems
Ad

Recommended

contiguous memory allocation.pptx
contiguous memory allocation.pptx
Rajapriya82
 
Memory allocation (4)
Memory allocation (4)
rockymani
 
Virtual memory management in Operating System
Virtual memory management in Operating System
Rashmi Bhat
 
Allocation of Frames & Thrashing
Allocation of Frames & Thrashing
arifmollick8578
 
Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 
Threads & Concurrency
Threads & Concurrency
NomanMHasan
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
sgpraju
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
Wayne Jones Jnr
 
Page replacement algorithms
Page replacement algorithms
sangrampatil81
 
Operating system memory management
Operating system memory management
rprajat007
 
Kernel I/O subsystem
Kernel I/O subsystem
AtiKa Bhatti
 
Demand paging
Demand paging
SwaroopSorte
 
Directory structure
Directory structure
sangrampatil81
 
Paging.ppt
Paging.ppt
infomerlin
 
Segmentation in operating systems
Segmentation in operating systems
Dr. Jasmine Beulah Gnanadurai
 
Memory Management in OS
Memory Management in OS
vampugani
 
Deadlock
Deadlock
Rajandeep Gill
 
Operating system paging and segmentation
Operating system paging and segmentation
hamza haseeb
 
Demand paging
Demand paging
Trinity Dwarka
 
Chapter 10 - File System Interface
Chapter 10 - File System Interface
Wayne Jones Jnr
 
Deadlock Avoidance - OS
Deadlock Avoidance - OS
MsAnita2
 
Allocation methods continuous method.47
Allocation methods continuous method.47
myrajendra
 
File allocation methods (1)
File allocation methods (1)
Dr. Jasmine Beulah Gnanadurai
 
File System in Operating System
File System in Operating System
Meghaj Mallick
 
8 memory management strategies
8 memory management strategies
Dr. Loganathan R
 
System calls
System calls
Bernard Senam
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.
Ravi Kumar Patel
 
Semophores and it's types
Semophores and it's types
Nishant Joshi
 
ch8 Memory management (Operating System).ppt
ch8 Memory management (Operating System).ppt
hashim986673
 
ch9.pptx
ch9.pptx
Shakeel Ahmed, PhD
 

More Related Content

What's hot (20)

Page replacement algorithms
Page replacement algorithms
sangrampatil81
 
Operating system memory management
Operating system memory management
rprajat007
 
Kernel I/O subsystem
Kernel I/O subsystem
AtiKa Bhatti
 
Demand paging
Demand paging
SwaroopSorte
 
Directory structure
Directory structure
sangrampatil81
 
Paging.ppt
Paging.ppt
infomerlin
 
Segmentation in operating systems
Segmentation in operating systems
Dr. Jasmine Beulah Gnanadurai
 
Memory Management in OS
Memory Management in OS
vampugani
 
Deadlock
Deadlock
Rajandeep Gill
 
Operating system paging and segmentation
Operating system paging and segmentation
hamza haseeb
 
Demand paging
Demand paging
Trinity Dwarka
 
Chapter 10 - File System Interface
Chapter 10 - File System Interface
Wayne Jones Jnr
 
Deadlock Avoidance - OS
Deadlock Avoidance - OS
MsAnita2
 
Allocation methods continuous method.47
Allocation methods continuous method.47
myrajendra
 
File allocation methods (1)
File allocation methods (1)
Dr. Jasmine Beulah Gnanadurai
 
File System in Operating System
File System in Operating System
Meghaj Mallick
 
8 memory management strategies
8 memory management strategies
Dr. Loganathan R
 
System calls
System calls
Bernard Senam
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.
Ravi Kumar Patel
 
Semophores and it's types
Semophores and it's types
Nishant Joshi
 
Page replacement algorithms
Page replacement algorithms
sangrampatil81
 
Operating system memory management
Operating system memory management
rprajat007
 
Kernel I/O subsystem
Kernel I/O subsystem
AtiKa Bhatti
 
Memory Management in OS
Memory Management in OS
vampugani
 
Operating system paging and segmentation
Operating system paging and segmentation
hamza haseeb
 
Chapter 10 - File System Interface
Chapter 10 - File System Interface
Wayne Jones Jnr
 
Deadlock Avoidance - OS
Deadlock Avoidance - OS
MsAnita2
 
Allocation methods continuous method.47
Allocation methods continuous method.47
myrajendra
 
File System in Operating System
File System in Operating System
Meghaj Mallick
 
8 memory management strategies
8 memory management strategies
Dr. Loganathan R
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.
Ravi Kumar Patel
 
Semophores and it's types
Semophores and it's types
Nishant Joshi
 

Similar to Contiguous Memory Allocation.ppt (20)

ch8 Memory management (Operating System).ppt
ch8 Memory management (Operating System).ppt
hashim986673
 
ch9.pptx
ch9.pptx
Shakeel Ahmed, PhD
 
ch9.pptx
ch9.pptx
farzeenabaid01
 
Main Memory
Main Memory
Jenny Galino
 
To lean about os easy way to understanding
To lean about os easy way to understanding
yasodha067
 
Chapter 9 Operating Systems silberschatz
Chapter 9 Operating Systems silberschatz
GiulianoRanauro
 
ch8-1 (final Memory).pptx
ch8-1 (final Memory).pptx
AnamRiaz31
 
Main Memory
Main Memory
QueenVictoria7
 
operating systems module 4 engineering.pptx
operating systems module 4 engineering.pptx
examlab57
 
Main memory-2 (ch8,os)
Main memory-2 (ch8,os)
University of Technology - Iraq
 
Ch07
Ch07
Ala' Mohammad
 
Operating systems presentation part 1 2025
Operating systems presentation part 1 2025
mousmiksu
 
Operating system- memory management this ppt elaborated the concepts related ...
Operating system- memory management this ppt elaborated the concepts related ...
CSEHOD13
 
Operating System-Ch8 memory management
Operating System-Ch8 memory management
Syaiful Ahdan
 
Chapter Five main management of memory .ppt
Chapter Five main management of memory .ppt
YoomifTube
 
memorymanagementmawaodisjoidjaoijscawd.ppt
memorymanagementmawaodisjoidjaoijscawd.ppt
LPhanMinhKhoa
 
Ch8 main memory
Ch8 main memory
Syaiful Ahdan
 
Materi8mainmemory
Materi8mainmemory
Universitas Perwira Purbalingga
 
Operating system 34 contiguous allocation
Operating system 34 contiguous allocation
Vaibhav Khanna
 
Ch8
Ch8
Sathiya Rajesh
 
ch8 Memory management (Operating System).ppt
ch8 Memory management (Operating System).ppt
hashim986673
 
To lean about os easy way to understanding
To lean about os easy way to understanding
yasodha067
 
Chapter 9 Operating Systems silberschatz
Chapter 9 Operating Systems silberschatz
GiulianoRanauro
 
ch8-1 (final Memory).pptx
ch8-1 (final Memory).pptx
AnamRiaz31
 
operating systems module 4 engineering.pptx
operating systems module 4 engineering.pptx
examlab57
 
Operating systems presentation part 1 2025
Operating systems presentation part 1 2025
mousmiksu
 
Operating system- memory management this ppt elaborated the concepts related ...
Operating system- memory management this ppt elaborated the concepts related ...
CSEHOD13
 
Operating System-Ch8 memory management
Operating System-Ch8 memory management
Syaiful Ahdan
 
Chapter Five main management of memory .ppt
Chapter Five main management of memory .ppt
YoomifTube
 
memorymanagementmawaodisjoidjaoijscawd.ppt
memorymanagementmawaodisjoidjaoijscawd.ppt
LPhanMinhKhoa
 
Operating system 34 contiguous allocation
Operating system 34 contiguous allocation
Vaibhav Khanna
 
Ad

More from infomerlin (20)

6 launching satellite.ppscscccascaascstx
6 launching satellite.ppscscccascaascstx
infomerlin
 
5.Range & angle to satellitefdfdfdfdfdfd
5.Range & angle to satellitefdfdfdfdfdfd
infomerlin
 
GSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptx
infomerlin
 
sat-ppt.pptx
sat-ppt.pptx
infomerlin
 
Page Replacement Algorithms.pptx
Page Replacement Algorithms.pptx
infomerlin
 
Segmentation.ppt
Segmentation.ppt
infomerlin
 
Allocating of Frames.pptx
Allocating of Frames.pptx
infomerlin
 
Allocating Kernel Memory.pptx
Allocating Kernel Memory.pptx
infomerlin
 
Deadlock Detection.pptx
Deadlock Detection.pptx
infomerlin
 
Deadlock Prevention.pptx
Deadlock Prevention.pptx
infomerlin
 
Frame detection.pdf
Frame detection.pdf
infomerlin
 
Deadlock Backgroud.pptx
Deadlock Backgroud.pptx
infomerlin
 
5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptx
infomerlin
 
LNA.ppt
LNA.ppt
infomerlin
 
Lecture 4.pptx
Lecture 4.pptx
infomerlin
 
System Calls.ppt
System Calls.ppt
infomerlin
 
Lec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.ppt
infomerlin
 
cs-intro-os.ppt
cs-intro-os.ppt
infomerlin
 
Lecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptx
infomerlin
 
Noise in AM systems.ppt
Noise in AM systems.ppt
infomerlin
 
6 launching satellite.ppscscccascaascstx
6 launching satellite.ppscscccascaascstx
infomerlin
 
5.Range & angle to satellitefdfdfdfdfdfd
5.Range & angle to satellitefdfdfdfdfdfd
infomerlin
 
GSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptx
infomerlin
 
Page Replacement Algorithms.pptx
Page Replacement Algorithms.pptx
infomerlin
 
Segmentation.ppt
Segmentation.ppt
infomerlin
 
Allocating of Frames.pptx
Allocating of Frames.pptx
infomerlin
 
Allocating Kernel Memory.pptx
Allocating Kernel Memory.pptx
infomerlin
 
Deadlock Detection.pptx
Deadlock Detection.pptx
infomerlin
 
Deadlock Prevention.pptx
Deadlock Prevention.pptx
infomerlin
 
Frame detection.pdf
Frame detection.pdf
infomerlin
 
Deadlock Backgroud.pptx
Deadlock Backgroud.pptx
infomerlin
 
5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptx
infomerlin
 
Lecture 4.pptx
Lecture 4.pptx
infomerlin
 
System Calls.ppt
System Calls.ppt
infomerlin
 
Lec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.ppt
infomerlin
 
cs-intro-os.ppt
cs-intro-os.ppt
infomerlin
 
Lecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptx
infomerlin
 
Noise in AM systems.ppt
Noise in AM systems.ppt
infomerlin
 
Ad

Recently uploaded (20)

Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
 
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
List View Components in Odoo 18 - Odoo Slides
List View Components in Odoo 18 - Odoo Slides
Celine George
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
 
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
 
LDMMIA Shop & Student News Summer Solstice 25
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
List View Components in Odoo 18 - Odoo Slides
List View Components in Odoo 18 - Odoo Slides
Celine George
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 

Contiguous Memory Allocation.ppt

  • 1. 8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Contiguous Allocation  Main memory must support both OS and user processes  Limited resource, must allocate efficiently  Contiguous allocation is one early method  Main memory usually into two partitions:  Resident operating system, usually held in low memory with interrupt vector  User processes then held in high memory  Each process contained in single contiguous section of memory
  • 2. 8.2 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Contiguous Allocation (Cont.)  Relocation registers used to protect user processes from each other, and from changing operating-system code and data  Base register contains value of smallest physical address  Limit register contains range of logical addresses – each logical address must be less than the limit register  MMU maps logical address dynamically  Can then allow actions such as kernel code being transient and kernel changing size
  • 3. 8.3 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Hardware Support for Relocation and Limit Registers
  • 4. 8.4 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Multiple-partition allocation  Multiple-partition allocation  Degree of multiprogramming limited by number of partitions  Variable-partition sizes for efficiency (sized to a given process’ needs)  Hole – block of available memory; holes of various size are scattered throughout memory  When a process arrives, it is allocated memory from a hole large enough to accommodate it  Process exiting frees its partition, adjacent free partitions combined  Operating system maintains information about: a) allocated partitions b) free partitions (hole)
  • 5. 8.5 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Dynamic Storage-Allocation Problem  First-fit: Allocate the first hole that is big enough  Best-fit: Allocate the smallest hole that is big enough; must search entire list, unless ordered by size  Produces the smallest leftover hole  Worst-fit: Allocate the largest hole; must also search entire list  Produces the largest leftover hole How to satisfy a request of size n from a list of free holes? First-fit and best-fit better than worst-fit in terms of speed and storage utilization
  • 6. 8.6 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Fragmentation  External Fragmentation – total memory space exists to satisfy a request, but it is not contiguous  Internal Fragmentation – allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used  First fit analysis reveals that given N blocks allocated, 0.5 N blocks lost to fragmentation  1/3 may be unusable -> 50-percent rule
  • 7. 8.7 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition Fragmentation (Cont.)  Reduce external fragmentation by compaction  Shuffle memory contents to place all free memory together in one large block  Compaction is possible only if relocation is dynamic, and is done at execution time  I/O problem  Latch job in memory while it is involved in I/O  Do I/O only into OS buffers  Now consider that backing store has same fragmentation problems