SlideShare a Scribd company logo
1 of 8
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Allocating Kernel Memory
10.2 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Allocating Kernel Memory
 Treated differently from user memory
 Often allocated from a free-memory pool
 Kernel requests memory for structures of varying sizes
 Some kernel memory needs to be contiguous
 I.e. for device I/O
10.3 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Buddy System
 Allocates memory from fixed-size segment consisting of physically-contiguous
pages
 Memory allocated using power-of-2 allocator
 Satisfies requests in units sized as power of 2
 Request rounded up to next highest power of 2
 When smaller allocation needed than is available, current chunk split into
two buddies of next-lower power of 2
 Continue until appropriate sized chunk available
 For example, assume 256KB chunk available, kernel requests 21KB
 Split into AL and AR of 128KB each
 One further divided into BL and BR of 64KB
– One further into CL and CR of 32KB each – one used to satisfy
request
 Advantage – quickly coalesce unused chunks into larger chunk
 Disadvantage - fragmentation
10.4 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Buddy System Allocator
10.5 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Slab Allocator
 Alternate strategy
 Slab is one or more physically contiguous pages
 Cache consists of one or more slabs
 Single cache for each unique kernel data structure
 Each cache filled with objects – instantiations of the data structure
 When cache created, filled with objects marked as free
 When structures stored, objects marked as used
 If slab is full of used objects, next object allocated from empty slab
 If no empty slabs, new slab allocated
 Benefits include no fragmentation, fast memory request satisfaction
10.6 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Slab Allocation
10.7 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Slab Allocator in Linux
 For example process descriptor is of type struct task_struct
 Approx 1.7KB of memory
 New task -> allocate new struct from cache
 Will use existing free struct task_struct
 Slab can be in three possible states
1. Full – all used
2. Empty – all free
3. Partial – mix of free and used
 Upon request, slab allocator
1. Uses free struct in partial slab
2. If none, takes one from empty slab
3. If no empty slab, create new empty
10.8 Silberschatz, Galvin and Gagne ©2018
Operating System Concepts – 10th Edition
Slab Allocator in Linux (Cont.)
 Slab started in Solaris, now wide-spread for both kernel mode and user
memory in various OSes
 Linux 2.2 had SLAB, now has both SLOB and SLUB allocators
 SLOB for systems with limited memory
 Simple List of Blocks – maintains 3 list objects for small, medium, large
objects
 SLUB is performance-optimized SLAB removes per-CPU queues,
metadata stored in page structure

More Related Content

What's hot

Wcdma kpi-analysis
Wcdma kpi-analysisWcdma kpi-analysis
Wcdma kpi-analysisa8us
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryWayne Jones Jnr
 
Ibm spectrum scale fundamentals workshop for americas part 5 ess gnr-usecases...
Ibm spectrum scale fundamentals workshop for americas part 5 ess gnr-usecases...Ibm spectrum scale fundamentals workshop for americas part 5 ess gnr-usecases...
Ibm spectrum scale fundamentals workshop for americas part 5 ess gnr-usecases...xKinAnx
 
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...xKinAnx
 
Operating systems chapter 5 silberschatz
Operating systems chapter 5 silberschatzOperating systems chapter 5 silberschatz
Operating systems chapter 5 silberschatzGiulianoRanauro
 
3GPP SON Series: Mobility Load Balancing (MLB)
3GPP SON Series: Mobility Load Balancing (MLB)3GPP SON Series: Mobility Load Balancing (MLB)
3GPP SON Series: Mobility Load Balancing (MLB)3G4G
 
Flow control and error control
Flow control and error controlFlow control and error control
Flow control and error controlBHUVIJAYAVELU
 
Spectrum Scale Memory Usage
Spectrum Scale Memory UsageSpectrum Scale Memory Usage
Spectrum Scale Memory UsageTomer Perry
 
Jvm & Garbage collection tuning for low latencies application
Jvm & Garbage collection tuning for low latencies applicationJvm & Garbage collection tuning for low latencies application
Jvm & Garbage collection tuning for low latencies applicationQuentin Ambard
 
Les 10 Tune Rman
Les 10 Tune RmanLes 10 Tune Rman
Les 10 Tune Rmanvivaankumar
 
Virtual memory
Virtual memoryVirtual memory
Virtual memoryrapunzel08
 
279934373-6-GSM-Paging-Affecting-Factors-Check-Methods-and-Tools-and-Delivera...
279934373-6-GSM-Paging-Affecting-Factors-Check-Methods-and-Tools-and-Delivera...279934373-6-GSM-Paging-Affecting-Factors-Check-Methods-and-Tools-and-Delivera...
279934373-6-GSM-Paging-Affecting-Factors-Check-Methods-and-Tools-and-Delivera...ssuser38e5dc1
 
Operating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsOperating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsPeter Tröger
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationWayne Jones Jnr
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and SegmentationMadhur Gupta
 

What's hot (20)

Wcdma kpi-analysis
Wcdma kpi-analysisWcdma kpi-analysis
Wcdma kpi-analysis
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
 
Ibm spectrum scale fundamentals workshop for americas part 5 ess gnr-usecases...
Ibm spectrum scale fundamentals workshop for americas part 5 ess gnr-usecases...Ibm spectrum scale fundamentals workshop for americas part 5 ess gnr-usecases...
Ibm spectrum scale fundamentals workshop for americas part 5 ess gnr-usecases...
 
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
 
Operating systems chapter 5 silberschatz
Operating systems chapter 5 silberschatzOperating systems chapter 5 silberschatz
Operating systems chapter 5 silberschatz
 
3GPP SON Series: Mobility Load Balancing (MLB)
3GPP SON Series: Mobility Load Balancing (MLB)3GPP SON Series: Mobility Load Balancing (MLB)
3GPP SON Series: Mobility Load Balancing (MLB)
 
Unit 1 ppt
Unit 1 pptUnit 1 ppt
Unit 1 ppt
 
Data link control protocol(1)
Data link control protocol(1)Data link control protocol(1)
Data link control protocol(1)
 
Flow control and error control
Flow control and error controlFlow control and error control
Flow control and error control
 
Spectrum Scale Memory Usage
Spectrum Scale Memory UsageSpectrum Scale Memory Usage
Spectrum Scale Memory Usage
 
Jvm & Garbage collection tuning for low latencies application
Jvm & Garbage collection tuning for low latencies applicationJvm & Garbage collection tuning for low latencies application
Jvm & Garbage collection tuning for low latencies application
 
Pram model
Pram modelPram model
Pram model
 
Segmentation in operating systems
Segmentation in operating systemsSegmentation in operating systems
Segmentation in operating systems
 
Les 10 Tune Rman
Les 10 Tune RmanLes 10 Tune Rman
Les 10 Tune Rman
 
Page replacement
Page replacementPage replacement
Page replacement
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
279934373-6-GSM-Paging-Affecting-Factors-Check-Methods-and-Tools-and-Delivera...
279934373-6-GSM-Paging-Affecting-Factors-Check-Methods-and-Tools-and-Delivera...279934373-6-GSM-Paging-Affecting-Factors-Check-Methods-and-Tools-and-Delivera...
279934373-6-GSM-Paging-Affecting-Factors-Check-Methods-and-Tools-and-Delivera...
 
Operating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsOperating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management Concepts
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process Synchronization
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and Segmentation
 

Similar to Allocating Kernel Memory.pptx

Google File System
Google File SystemGoogle File System
Google File SystemDreamJobs1
 
A presentaion on Panasas HPC NAS
A presentaion on Panasas HPC NASA presentaion on Panasas HPC NAS
A presentaion on Panasas HPC NASRahul Janghel
 
342557457-Tcs-d-DBA-Rac.ppt
342557457-Tcs-d-DBA-Rac.ppt342557457-Tcs-d-DBA-Rac.ppt
342557457-Tcs-d-DBA-Rac.pptNithinRoy12
 
Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Prashanth Kumar
 
Linux memory consumption
Linux memory consumptionLinux memory consumption
Linux memory consumptionhaish
 
A guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on KubernetesA guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on Kubernetest8kobayashi
 
Mastering OpenStack - Episode 07 - Compute Nodes
Mastering OpenStack - Episode 07 - Compute NodesMastering OpenStack - Episode 07 - Compute Nodes
Mastering OpenStack - Episode 07 - Compute NodesRoozbeh Shafiee
 
Advance google file system
Advance google file systemAdvance google file system
Advance google file systemLalit Rastogi
 
Avi Apelbaum - RAC
Avi Apelbaum - RAC Avi Apelbaum - RAC
Avi Apelbaum - RAC gridcontrol
 
Jaspreet webinar-cns
Jaspreet webinar-cnsJaspreet webinar-cns
Jaspreet webinar-cnsJaspreet Kaur
 
ch8-1 (final Memory).pptx
ch8-1 (final Memory).pptxch8-1 (final Memory).pptx
ch8-1 (final Memory).pptxAnamRiaz31
 
2800-lecture8-memeory-management in operating system.pdf
2800-lecture8-memeory-management in operating system.pdf2800-lecture8-memeory-management in operating system.pdf
2800-lecture8-memeory-management in operating system.pdfYawkalAddis
 
[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching SolutionsITviec
 
Chapter 9 Operating Systems silberschatz
Chapter 9 Operating Systems silberschatzChapter 9 Operating Systems silberschatz
Chapter 9 Operating Systems silberschatzGiulianoRanauro
 
Configuring Aerospike - Part 2
Configuring Aerospike - Part 2 Configuring Aerospike - Part 2
Configuring Aerospike - Part 2 Aerospike, Inc.
 
Contiguous Memory Allocation.ppt
Contiguous Memory Allocation.pptContiguous Memory Allocation.ppt
Contiguous Memory Allocation.pptinfomerlin
 

Similar to Allocating Kernel Memory.pptx (20)

Google File System
Google File SystemGoogle File System
Google File System
 
A presentaion on Panasas HPC NAS
A presentaion on Panasas HPC NASA presentaion on Panasas HPC NAS
A presentaion on Panasas HPC NAS
 
342557457-Tcs-d-DBA-Rac.ppt
342557457-Tcs-d-DBA-Rac.ppt342557457-Tcs-d-DBA-Rac.ppt
342557457-Tcs-d-DBA-Rac.ppt
 
Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)
 
Linux memory consumption
Linux memory consumptionLinux memory consumption
Linux memory consumption
 
A guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on KubernetesA guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on Kubernetes
 
Mastering OpenStack - Episode 07 - Compute Nodes
Mastering OpenStack - Episode 07 - Compute NodesMastering OpenStack - Episode 07 - Compute Nodes
Mastering OpenStack - Episode 07 - Compute Nodes
 
Advance google file system
Advance google file systemAdvance google file system
Advance google file system
 
Avi Apelbaum - RAC
Avi Apelbaum - RAC Avi Apelbaum - RAC
Avi Apelbaum - RAC
 
Jaspreet webinar-cns
Jaspreet webinar-cnsJaspreet webinar-cns
Jaspreet webinar-cns
 
ch8-1 (final Memory).pptx
ch8-1 (final Memory).pptxch8-1 (final Memory).pptx
ch8-1 (final Memory).pptx
 
ch9.pptx
ch9.pptxch9.pptx
ch9.pptx
 
ch9.pptx
ch9.pptxch9.pptx
ch9.pptx
 
2800-lecture8-memeory-management in operating system.pdf
2800-lecture8-memeory-management in operating system.pdf2800-lecture8-memeory-management in operating system.pdf
2800-lecture8-memeory-management in operating system.pdf
 
[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions[Hanoi-August 13] Tech Talk on Caching Solutions
[Hanoi-August 13] Tech Talk on Caching Solutions
 
Chapter 9 Operating Systems silberschatz
Chapter 9 Operating Systems silberschatzChapter 9 Operating Systems silberschatz
Chapter 9 Operating Systems silberschatz
 
Updates
UpdatesUpdates
Updates
 
Updates
UpdatesUpdates
Updates
 
Configuring Aerospike - Part 2
Configuring Aerospike - Part 2 Configuring Aerospike - Part 2
Configuring Aerospike - Part 2
 
Contiguous Memory Allocation.ppt
Contiguous Memory Allocation.pptContiguous Memory Allocation.ppt
Contiguous Memory Allocation.ppt
 

More from infomerlin

GSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptxGSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptxinfomerlin
 
Page Replacement Algorithms.pptx
Page Replacement Algorithms.pptxPage Replacement Algorithms.pptx
Page Replacement Algorithms.pptxinfomerlin
 
Segmentation.ppt
Segmentation.pptSegmentation.ppt
Segmentation.pptinfomerlin
 
Allocating of Frames.pptx
Allocating of Frames.pptxAllocating of Frames.pptx
Allocating of Frames.pptxinfomerlin
 
Deadlock Detection.pptx
Deadlock Detection.pptxDeadlock Detection.pptx
Deadlock Detection.pptxinfomerlin
 
Deadlock Prevention.pptx
Deadlock Prevention.pptxDeadlock Prevention.pptx
Deadlock Prevention.pptxinfomerlin
 
Frame detection.pdf
Frame detection.pdfFrame detection.pdf
Frame detection.pdfinfomerlin
 
Deadlock Backgroud.pptx
Deadlock Backgroud.pptxDeadlock Backgroud.pptx
Deadlock Backgroud.pptxinfomerlin
 
5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptx5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptxinfomerlin
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptxinfomerlin
 
System Calls.ppt
System Calls.pptSystem Calls.ppt
System Calls.pptinfomerlin
 
Lec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.pptLec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.pptinfomerlin
 
cs-intro-os.ppt
cs-intro-os.pptcs-intro-os.ppt
cs-intro-os.pptinfomerlin
 
Lecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptxLecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptxinfomerlin
 
Noise in AM systems.ppt
Noise in AM systems.pptNoise in AM systems.ppt
Noise in AM systems.pptinfomerlin
 
Lecture 22 Threshold effects in FM.pptx
Lecture 22 Threshold effects in FM.pptxLecture 22 Threshold effects in FM.pptx
Lecture 22 Threshold effects in FM.pptxinfomerlin
 
Lecture-5 AM Signal Generation – Type 1.pptx
Lecture-5 AM Signal Generation – Type 1.pptxLecture-5 AM Signal Generation – Type 1.pptx
Lecture-5 AM Signal Generation – Type 1.pptxinfomerlin
 

More from infomerlin (20)

GSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptxGSC-21_029_4_09_TSDSI-R1-1.pptx
GSC-21_029_4_09_TSDSI-R1-1.pptx
 
sat-ppt.pptx
sat-ppt.pptxsat-ppt.pptx
sat-ppt.pptx
 
Paging.ppt
Paging.pptPaging.ppt
Paging.ppt
 
Page Replacement Algorithms.pptx
Page Replacement Algorithms.pptxPage Replacement Algorithms.pptx
Page Replacement Algorithms.pptx
 
Segmentation.ppt
Segmentation.pptSegmentation.ppt
Segmentation.ppt
 
Allocating of Frames.pptx
Allocating of Frames.pptxAllocating of Frames.pptx
Allocating of Frames.pptx
 
Deadlock Detection.pptx
Deadlock Detection.pptxDeadlock Detection.pptx
Deadlock Detection.pptx
 
Deadlock Prevention.pptx
Deadlock Prevention.pptxDeadlock Prevention.pptx
Deadlock Prevention.pptx
 
Frame detection.pdf
Frame detection.pdfFrame detection.pdf
Frame detection.pdf
 
Deadlock Backgroud.pptx
Deadlock Backgroud.pptxDeadlock Backgroud.pptx
Deadlock Backgroud.pptx
 
5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptx5G Hackathon - Brainstorming Session.pptx
5G Hackathon - Brainstorming Session.pptx
 
LNA.ppt
LNA.pptLNA.ppt
LNA.ppt
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptx
 
System Calls.ppt
System Calls.pptSystem Calls.ppt
System Calls.ppt
 
Lec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.pptLec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.ppt
 
cs-intro-os.ppt
cs-intro-os.pptcs-intro-os.ppt
cs-intro-os.ppt
 
Lecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptxLecture-2 Signal-Spectra-Modulation.pptx
Lecture-2 Signal-Spectra-Modulation.pptx
 
Noise in AM systems.ppt
Noise in AM systems.pptNoise in AM systems.ppt
Noise in AM systems.ppt
 
Lecture 22 Threshold effects in FM.pptx
Lecture 22 Threshold effects in FM.pptxLecture 22 Threshold effects in FM.pptx
Lecture 22 Threshold effects in FM.pptx
 
Lecture-5 AM Signal Generation – Type 1.pptx
Lecture-5 AM Signal Generation – Type 1.pptxLecture-5 AM Signal Generation – Type 1.pptx
Lecture-5 AM Signal Generation – Type 1.pptx
 

Recently uploaded

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
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 torqueBhangaleSonal
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
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.pptxJuliansyahHarahap1
 

Recently uploaded (20)

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
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
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
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
 

Allocating Kernel Memory.pptx

  • 1. Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Allocating Kernel Memory
  • 2. 10.2 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Allocating Kernel Memory  Treated differently from user memory  Often allocated from a free-memory pool  Kernel requests memory for structures of varying sizes  Some kernel memory needs to be contiguous  I.e. for device I/O
  • 3. 10.3 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Buddy System  Allocates memory from fixed-size segment consisting of physically-contiguous pages  Memory allocated using power-of-2 allocator  Satisfies requests in units sized as power of 2  Request rounded up to next highest power of 2  When smaller allocation needed than is available, current chunk split into two buddies of next-lower power of 2  Continue until appropriate sized chunk available  For example, assume 256KB chunk available, kernel requests 21KB  Split into AL and AR of 128KB each  One further divided into BL and BR of 64KB – One further into CL and CR of 32KB each – one used to satisfy request  Advantage – quickly coalesce unused chunks into larger chunk  Disadvantage - fragmentation
  • 4. 10.4 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Buddy System Allocator
  • 5. 10.5 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Slab Allocator  Alternate strategy  Slab is one or more physically contiguous pages  Cache consists of one or more slabs  Single cache for each unique kernel data structure  Each cache filled with objects – instantiations of the data structure  When cache created, filled with objects marked as free  When structures stored, objects marked as used  If slab is full of used objects, next object allocated from empty slab  If no empty slabs, new slab allocated  Benefits include no fragmentation, fast memory request satisfaction
  • 6. 10.6 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Slab Allocation
  • 7. 10.7 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Slab Allocator in Linux  For example process descriptor is of type struct task_struct  Approx 1.7KB of memory  New task -> allocate new struct from cache  Will use existing free struct task_struct  Slab can be in three possible states 1. Full – all used 2. Empty – all free 3. Partial – mix of free and used  Upon request, slab allocator 1. Uses free struct in partial slab 2. If none, takes one from empty slab 3. If no empty slab, create new empty
  • 8. 10.8 Silberschatz, Galvin and Gagne ©2018 Operating System Concepts – 10th Edition Slab Allocator in Linux (Cont.)  Slab started in Solaris, now wide-spread for both kernel mode and user memory in various OSes  Linux 2.2 had SLAB, now has both SLOB and SLUB allocators  SLOB for systems with limited memory  Simple List of Blocks – maintains 3 list objects for small, medium, large objects  SLUB is performance-optimized SLAB removes per-CPU queues, metadata stored in page structure