SlideShare a Scribd company logo
1 of 23
Operating Systems-
Memory management
PREPARED BY,
V.SANTHI
ASSISTANT PROFESSOR,
DEPARTMENT OF BCA,
BON SECOURS COLLEGE FOR WOMEN,
THANJAVUR.
Memory management : Early systems
Memory Allocation schemes:
Single user configurations
Fixed Partitions
Dynamic Partitions
Relocatable Dynamic Partitions
• Main memory –temporary memory(RAM)
• Secondary memory –Permanent memory(ROM)
• Single user contiguous scheme:
• Single Contiguous Memory Allocation is a simple
memory allocation scheme,
• Requires no special hardware features. Entire available memory
is allocated to a single job.
• In this scheme of allocation, the main memory is divided into 2
contiguous regions.
• One portion is permanently allocated to the operating system. All the remaining
memory is available for a single job, which has to be processed. The Job actually
uses some part of the allocated memory.
• Two h/w items need:
• 1.Register to store address
• 2. Accumulator keep track of the size ,the Program being read into memory
• It doesn’t support multiprogramming or N/W, handle one job at a time.
• All the computer's memory, usually with, the exception of a small portion
reserved for the operating system.
• Early years computer were physically large & low memory capacity.
• If the program doesn’t fit ,either the main memory must be increased or
program must be modified.
• Advantage:
• 1. Simple Allocation
• 2. Entire scheme requires less memory
• 3. Easy to implement & use.
• Disadvantage:
• 1. Memory & CPU not fully Utilized
• 2. User program is being limited.
• It allow multiprogramming within main memory-one partition for each job.
• Each Memory partition was designed when the system power on, and to be
reconfigured when the system shut down(Restart).
• Protect job’s memory space
• Once Partition assigned to a job , no other job will assign to that partition.
• Fixed partition allocation ,protection was mandatory for each partitions.
• Joint responsibility OS –H/W.
Fixed / Static Partitions:
• Its better than single contiguous allocation,
because it allow several program into
main memory at the same time.
• Internal fragmentation-drawback
• 100k
• J1= 75k
• 25k
• J2=25k
• 50k
• J3=45k
• 25k
• J4=23k
OS
DYNAMIC PARTITION:
• Partitions(MM) are created dynamically.
• Dynamic partition utilizes the memory when the 1st job load , jobs are not
in same size.
• It fit into the available space based on priority. (First come – First served
bases.).
• Memory creates fragment of free memory b/w blocks called external
fragmentation.
100k
150k
200k
OS
Best fit vs First fit:
• Best fit:
• The best fit deals with allocating the smallest free partition which meets
the requirement of the requesting process. This algorithm first searches the
entire list of free partitions and considers the smallest hole that is adequate.
It then tries to find a hole which is close to actual process size needed.
• J1-135k 100k - waiting job
• j2-75k 150k =15free
• j3-165k 200k =35 free
• Disadvantage: upcoming job must be wait till memory to be arrange
75k
165k
75k
135k
First fit
• In the first fit approach is to allocate the first free partition or hole large
enough which can accommodate the process. It finishes after finding
the first suitable free partition.
• 100k - waiting job
• 150k =100free
• 200k =150 free
J1-
10k
J2-
50k
J3-
50k
J4-
50k
Deallocation:100k free50k called de-allocation
• Deallocation of memory by the Operating System (OS) is a way to free the
Random Access Memory (RAM) of finished processes. New processes
are allocated again. This is how the OS works
with allocation and deallocation.
• In fixed partition- when job is completed memory manager resets the
memory block free –to store another job.
• 1.when the block to be de-allocated is adjacent(3-free-busy-free) to another
free block.
• 2.when the block to be de-allocated is b/w two free block.
• 3.when the block to be de-allocated is isolated from other free block.
J1-
50k
J1-50k
50k
Null entry:
• the status is changed from “a null entry to free” – indicate that a
new block of memory is available.
• When the null entry found, the beginning memory location of the
terminating job is entered in the beginning address column,(1000)
• the job size is entered under the memory block size column.
Relocatable dynamic partitions:
• In relocatable dynamic partition, memory manager in operating system
relocates the program, that is all empty blocks are gathered to form one
single block of large memory enough to accommodate some or all of the
jobs waiting in the queue.
• Compaction(defragmentation & garbage collection)- combining all the
empty memory spaces together.
Compaction
• it’s not a easy task, every program memory must be reallocated, so they are
contiguous, - every address, every reference to an address within the each
program must be adjusted to new location in memory.- OS must be
differentiate ADDRESS & DATA VALUE.
• All numbers are stored in memory as binary values.
• Assembly language instruction to ADD integer 1 to I,
• Instruction like ADDI A ,1 ex: (A+1)
Flag:
• A flag is a value that acts as a signal for a function or process. The value of
the flag is used to determine the next step of a program.
• Flags are often binary flags, which contain a Boolean value (true or false).
However, not all flags are binary, meaning they can store a range of values.
After relocation & compaction – free list & busy list updated
Show block of free memory show the new location of the job
under the process
Register: used to relocate the memory
1.Bound Register- store highest/lowest memory location
2.Relocation Register-value must be added to each address
referenced in program(correct memory address)
It has 3 approach in relocating memory:
• One is ->100k -75% used
• Balance 25% memory wasted
• Second is: compact memory only- constant checking of entry queue
• Make jobs were waiting.
• 3rd one:
• Prescribed amount of time elapsed, if chosen time is too small , system will
spend more time on compaction on processing.
PAGED MEMORY ALLOCATION:
• Before job loaded into memory divided into some parts called page-in memory location its called page frames.
• Paged memory allocation – based on dividing each incoming job into pages of equal size- some OS page size is equal size of
memory Block size.
• Page can be stored in any available page frame in main memory
• Operating systems, paging is a memory management scheme -a computer stores and retrieves data from secondary storage for
use in main memory. In this scheme, the operating system retrieves data from secondary storage in same-size blocks called
pages.
• Advantage : storing program is Non-contiguous in Main memory- so its more efficiently use any page of any job
• Before executing a program, memory manager prepares it by:
1) Determining the number of pages in the program
2) Locating enough empty “page frames” in main memory
3) Loading all of the program’s page into them(MM).
• 1st page contains first instruction.
• Last page contains last instruction
• job1 divided into 4 pages: page 0,page 1, page 2, page 3,
• Total job size: 350bytes,
• page 0 - 100
• page 1 - 100
• page 2 - 100
• page 3 – 50 (few job size perfectly fill with page size)so internal
fragmentation occurs.
• Next job must be wait till job1 ends.
• If job is Larger than 1100 bytes it never fit to memory.
• It is Non-Contiguous storage.

More Related Content

What's hot

Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory managementMukesh Chinta
 
9 virtual memory management
9 virtual memory management9 virtual memory management
9 virtual memory managementDr. Loganathan R
 
Distributed file system
Distributed file systemDistributed file system
Distributed file systemAnamika Singh
 
Understanding operating systems 5th ed ch03
Understanding operating systems 5th ed ch03Understanding operating systems 5th ed ch03
Understanding operating systems 5th ed ch03BarrBoy
 
40 demand paging
40 demand paging40 demand paging
40 demand pagingmyrajendra
 
Free space managment46
Free space managment46Free space managment46
Free space managment46myrajendra
 
Os structure
Os structureOs structure
Os structureMohd Arif
 
Operating System-Ch8 memory management
Operating System-Ch8 memory managementOperating System-Ch8 memory management
Operating System-Ch8 memory managementSyaiful Ahdan
 
Memory management early_systems
Memory management early_systemsMemory management early_systems
Memory management early_systemsMybej Che
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device ManagementDamian T. Gordon
 
Memory management
Memory managementMemory management
Memory managementcpjcollege
 
Memory management ppt
Memory management pptMemory management ppt
Memory management pptManishaJha43
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating SystemsRitu Ranjan Shrivastwa
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System ImplementationWayne Jones Jnr
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process SchedulingShipra Swati
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memoryMazin Alwaaly
 

What's hot (20)

Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
 
9 virtual memory management
9 virtual memory management9 virtual memory management
9 virtual memory management
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Understanding operating systems 5th ed ch03
Understanding operating systems 5th ed ch03Understanding operating systems 5th ed ch03
Understanding operating systems 5th ed ch03
 
40 demand paging
40 demand paging40 demand paging
40 demand paging
 
Free space managment46
Free space managment46Free space managment46
Free space managment46
 
Os structure
Os structureOs structure
Os structure
 
Operating System-Ch8 memory management
Operating System-Ch8 memory managementOperating System-Ch8 memory management
Operating System-Ch8 memory management
 
Memory management early_systems
Memory management early_systemsMemory management early_systems
Memory management early_systems
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
 
Memory management
Memory managementMemory management
Memory management
 
Memory management
Memory managementMemory management
Memory management
 
Memory management ppt
Memory management pptMemory management ppt
Memory management ppt
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Sequential consistency model
Sequential consistency modelSequential consistency model
Sequential consistency model
 
Ch05 coa9e
Ch05 coa9eCh05 coa9e
Ch05 coa9e
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 

Similar to Memory management: Early systems and allocation schemes

Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
Storage management
Storage managementStorage management
Storage managementAtul Sharma
 
M20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptxM20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptxHarikishnaKNHk
 
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...LeahRachael
 
Memory management
Memory managementMemory management
Memory managementPATELARCH
 
Introduction of Memory Management
Introduction of Memory Management Introduction of Memory Management
Introduction of Memory Management Maitree Patel
 
chapter 2 memory and process management
chapter 2 memory and process managementchapter 2 memory and process management
chapter 2 memory and process managementAisyah Rafiuddin
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1rohassanie
 
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxLecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxAmanuelmergia
 
Memory Management in Operating Systems for all
Memory Management in Operating Systems for allMemory Management in Operating Systems for all
Memory Management in Operating Systems for allVSKAMCSPSGCT
 
Introduction to Parallel Computing
Introduction to Parallel ComputingIntroduction to Parallel Computing
Introduction to Parallel ComputingAkhila Prabhakaran
 
memory managment on computer science.ppt
memory managment on computer science.pptmemory managment on computer science.ppt
memory managment on computer science.pptfootydigarse
 

Similar to Memory management: Early systems and allocation schemes (20)

Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory management
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptx
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Storage management
Storage managementStorage management
Storage management
 
M20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptxM20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptx
 
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
 
Memory management
Memory managementMemory management
Memory management
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
 
Introduction of Memory Management
Introduction of Memory Management Introduction of Memory Management
Introduction of Memory Management
 
chapter 2 memory and process management
chapter 2 memory and process managementchapter 2 memory and process management
chapter 2 memory and process management
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
 
Operating System
Operating SystemOperating System
Operating System
 
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxLecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptx
 
Memory Management in Operating Systems for all
Memory Management in Operating Systems for allMemory Management in Operating Systems for all
Memory Management in Operating Systems for all
 
Chapter07_ds.ppt
Chapter07_ds.pptChapter07_ds.ppt
Chapter07_ds.ppt
 
Module5 secondary storage
Module5 secondary storageModule5 secondary storage
Module5 secondary storage
 
Introduction to Parallel Computing
Introduction to Parallel ComputingIntroduction to Parallel Computing
Introduction to Parallel Computing
 
memory managment on computer science.ppt
memory managment on computer science.pptmemory managment on computer science.ppt
memory managment on computer science.ppt
 

More from SanthiNivas

exception-handling-in-java.ppt
exception-handling-in-java.pptexception-handling-in-java.ppt
exception-handling-in-java.pptSanthiNivas
 
Introduction to PHP.ppt
Introduction to PHP.pptIntroduction to PHP.ppt
Introduction to PHP.pptSanthiNivas
 
static methods.pptx
static methods.pptxstatic methods.pptx
static methods.pptxSanthiNivas
 
transmission media.ppt
transmission media.ppttransmission media.ppt
transmission media.pptSanthiNivas
 
Internet Basics Presentation.pptx
Internet Basics Presentation.pptxInternet Basics Presentation.pptx
Internet Basics Presentation.pptxSanthiNivas
 
Features of Java.pptx
Features of Java.pptxFeatures of Java.pptx
Features of Java.pptxSanthiNivas
 
Output Devices.pptx
Output Devices.pptxOutput Devices.pptx
Output Devices.pptxSanthiNivas
 
Input Devices.pptx
Input Devices.pptxInput Devices.pptx
Input Devices.pptxSanthiNivas
 
Operating System File Management Unit v.pptx
Operating System File Management Unit v.pptxOperating System File Management Unit v.pptx
Operating System File Management Unit v.pptxSanthiNivas
 
Input and Output Devices
Input and Output DevicesInput and Output Devices
Input and Output DevicesSanthiNivas
 
DDA ALGORITHM.pdf
DDA ALGORITHM.pdfDDA ALGORITHM.pdf
DDA ALGORITHM.pdfSanthiNivas
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2SanthiNivas
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer GraphicsSanthiNivas
 
Page Layout and Background
Page Layout and BackgroundPage Layout and Background
Page Layout and BackgroundSanthiNivas
 
3-D Transformation in Computer Graphics
3-D Transformation in Computer Graphics3-D Transformation in Computer Graphics
3-D Transformation in Computer GraphicsSanthiNivas
 
4. THREE DIMENSIONAL DISPLAY METHODS
4.	THREE DIMENSIONAL DISPLAY METHODS4.	THREE DIMENSIONAL DISPLAY METHODS
4. THREE DIMENSIONAL DISPLAY METHODSSanthiNivas
 

More from SanthiNivas (20)

packages.ppt
packages.pptpackages.ppt
packages.ppt
 
exception-handling-in-java.ppt
exception-handling-in-java.pptexception-handling-in-java.ppt
exception-handling-in-java.ppt
 
Introduction to PHP.ppt
Introduction to PHP.pptIntroduction to PHP.ppt
Introduction to PHP.ppt
 
static methods.pptx
static methods.pptxstatic methods.pptx
static methods.pptx
 
Topologies.ppt
Topologies.pptTopologies.ppt
Topologies.ppt
 
transmission media.ppt
transmission media.ppttransmission media.ppt
transmission media.ppt
 
Internet Basics Presentation.pptx
Internet Basics Presentation.pptxInternet Basics Presentation.pptx
Internet Basics Presentation.pptx
 
Topologies.ppt
Topologies.pptTopologies.ppt
Topologies.ppt
 
Features of Java.pptx
Features of Java.pptxFeatures of Java.pptx
Features of Java.pptx
 
Output Devices.pptx
Output Devices.pptxOutput Devices.pptx
Output Devices.pptx
 
Input Devices.pptx
Input Devices.pptxInput Devices.pptx
Input Devices.pptx
 
Operating System File Management Unit v.pptx
Operating System File Management Unit v.pptxOperating System File Management Unit v.pptx
Operating System File Management Unit v.pptx
 
Input and Output Devices
Input and Output DevicesInput and Output Devices
Input and Output Devices
 
HTML
HTMLHTML
HTML
 
DDA ALGORITHM.pdf
DDA ALGORITHM.pdfDDA ALGORITHM.pdf
DDA ALGORITHM.pdf
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Page Layout and Background
Page Layout and BackgroundPage Layout and Background
Page Layout and Background
 
3-D Transformation in Computer Graphics
3-D Transformation in Computer Graphics3-D Transformation in Computer Graphics
3-D Transformation in Computer Graphics
 
4. THREE DIMENSIONAL DISPLAY METHODS
4.	THREE DIMENSIONAL DISPLAY METHODS4.	THREE DIMENSIONAL DISPLAY METHODS
4. THREE DIMENSIONAL DISPLAY METHODS
 

Recently uploaded

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 

Recently uploaded (20)

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 

Memory management: Early systems and allocation schemes

  • 1. Operating Systems- Memory management PREPARED BY, V.SANTHI ASSISTANT PROFESSOR, DEPARTMENT OF BCA, BON SECOURS COLLEGE FOR WOMEN, THANJAVUR.
  • 2. Memory management : Early systems Memory Allocation schemes: Single user configurations Fixed Partitions Dynamic Partitions Relocatable Dynamic Partitions
  • 3. • Main memory –temporary memory(RAM) • Secondary memory –Permanent memory(ROM) • Single user contiguous scheme: • Single Contiguous Memory Allocation is a simple memory allocation scheme, • Requires no special hardware features. Entire available memory is allocated to a single job.
  • 4. • In this scheme of allocation, the main memory is divided into 2 contiguous regions. • One portion is permanently allocated to the operating system. All the remaining memory is available for a single job, which has to be processed. The Job actually uses some part of the allocated memory. • Two h/w items need: • 1.Register to store address • 2. Accumulator keep track of the size ,the Program being read into memory • It doesn’t support multiprogramming or N/W, handle one job at a time.
  • 5. • All the computer's memory, usually with, the exception of a small portion reserved for the operating system. • Early years computer were physically large & low memory capacity. • If the program doesn’t fit ,either the main memory must be increased or program must be modified.
  • 6. • Advantage: • 1. Simple Allocation • 2. Entire scheme requires less memory • 3. Easy to implement & use. • Disadvantage: • 1. Memory & CPU not fully Utilized • 2. User program is being limited.
  • 7. • It allow multiprogramming within main memory-one partition for each job. • Each Memory partition was designed when the system power on, and to be reconfigured when the system shut down(Restart). • Protect job’s memory space • Once Partition assigned to a job , no other job will assign to that partition. • Fixed partition allocation ,protection was mandatory for each partitions. • Joint responsibility OS –H/W. Fixed / Static Partitions:
  • 8. • Its better than single contiguous allocation, because it allow several program into main memory at the same time.
  • 9.
  • 10. • Internal fragmentation-drawback • 100k • J1= 75k • 25k • J2=25k • 50k • J3=45k • 25k • J4=23k OS
  • 11. DYNAMIC PARTITION: • Partitions(MM) are created dynamically. • Dynamic partition utilizes the memory when the 1st job load , jobs are not in same size. • It fit into the available space based on priority. (First come – First served bases.). • Memory creates fragment of free memory b/w blocks called external fragmentation. 100k 150k 200k OS
  • 12. Best fit vs First fit: • Best fit: • The best fit deals with allocating the smallest free partition which meets the requirement of the requesting process. This algorithm first searches the entire list of free partitions and considers the smallest hole that is adequate. It then tries to find a hole which is close to actual process size needed. • J1-135k 100k - waiting job • j2-75k 150k =15free • j3-165k 200k =35 free • Disadvantage: upcoming job must be wait till memory to be arrange 75k 165k 75k 135k
  • 13. First fit • In the first fit approach is to allocate the first free partition or hole large enough which can accommodate the process. It finishes after finding the first suitable free partition. • 100k - waiting job • 150k =100free • 200k =150 free J1- 10k J2- 50k J3- 50k J4- 50k
  • 14. Deallocation:100k free50k called de-allocation • Deallocation of memory by the Operating System (OS) is a way to free the Random Access Memory (RAM) of finished processes. New processes are allocated again. This is how the OS works with allocation and deallocation. • In fixed partition- when job is completed memory manager resets the memory block free –to store another job. • 1.when the block to be de-allocated is adjacent(3-free-busy-free) to another free block. • 2.when the block to be de-allocated is b/w two free block. • 3.when the block to be de-allocated is isolated from other free block. J1- 50k J1-50k 50k
  • 15. Null entry: • the status is changed from “a null entry to free” – indicate that a new block of memory is available. • When the null entry found, the beginning memory location of the terminating job is entered in the beginning address column,(1000) • the job size is entered under the memory block size column.
  • 16. Relocatable dynamic partitions: • In relocatable dynamic partition, memory manager in operating system relocates the program, that is all empty blocks are gathered to form one single block of large memory enough to accommodate some or all of the jobs waiting in the queue. • Compaction(defragmentation & garbage collection)- combining all the empty memory spaces together.
  • 17. Compaction • it’s not a easy task, every program memory must be reallocated, so they are contiguous, - every address, every reference to an address within the each program must be adjusted to new location in memory.- OS must be differentiate ADDRESS & DATA VALUE. • All numbers are stored in memory as binary values. • Assembly language instruction to ADD integer 1 to I, • Instruction like ADDI A ,1 ex: (A+1)
  • 18. Flag: • A flag is a value that acts as a signal for a function or process. The value of the flag is used to determine the next step of a program. • Flags are often binary flags, which contain a Boolean value (true or false). However, not all flags are binary, meaning they can store a range of values.
  • 19. After relocation & compaction – free list & busy list updated Show block of free memory show the new location of the job under the process Register: used to relocate the memory 1.Bound Register- store highest/lowest memory location 2.Relocation Register-value must be added to each address referenced in program(correct memory address)
  • 20. It has 3 approach in relocating memory: • One is ->100k -75% used • Balance 25% memory wasted • Second is: compact memory only- constant checking of entry queue • Make jobs were waiting. • 3rd one: • Prescribed amount of time elapsed, if chosen time is too small , system will spend more time on compaction on processing.
  • 21. PAGED MEMORY ALLOCATION: • Before job loaded into memory divided into some parts called page-in memory location its called page frames. • Paged memory allocation – based on dividing each incoming job into pages of equal size- some OS page size is equal size of memory Block size. • Page can be stored in any available page frame in main memory • Operating systems, paging is a memory management scheme -a computer stores and retrieves data from secondary storage for use in main memory. In this scheme, the operating system retrieves data from secondary storage in same-size blocks called pages. • Advantage : storing program is Non-contiguous in Main memory- so its more efficiently use any page of any job
  • 22. • Before executing a program, memory manager prepares it by: 1) Determining the number of pages in the program 2) Locating enough empty “page frames” in main memory 3) Loading all of the program’s page into them(MM). • 1st page contains first instruction. • Last page contains last instruction
  • 23. • job1 divided into 4 pages: page 0,page 1, page 2, page 3, • Total job size: 350bytes, • page 0 - 100 • page 1 - 100 • page 2 - 100 • page 3 – 50 (few job size perfectly fill with page size)so internal fragmentation occurs. • Next job must be wait till job1 ends. • If job is Larger than 1100 bytes it never fit to memory. • It is Non-Contiguous storage.