SlideShare uma empresa Scribd logo
1 de 18
Memory management
Presented by
M . Lavanya
M.sc(CS & IT)
Nadar Saraswathi college of arts & science.
Vadapudupatti ,Theni.
MEMORY MANAGEMENT
• Main Memory refers to a physical memory that is the internal
memory to the computer.
• The word main is used to distinguish it from external mass storage
devices such as disk drives. Main memory is also known as RAM.
• The computer is able to change only data that is in main memory.
• Therefore, every program we execute and every file we access must
be copied from a storage device into main memory.
MEMORY MANAGEMENT REQUIREMENTS.
Five requirements:
• Relocation
• Protection
• Sharing
• Logical organization
• Physical organization
• Relocation
– programmer cannot know where the program will be placed in
memory when it is executed
– a process may be relocated in main memory due to swapping
– swapping enables the OS to have a larger pool of ready-to-
execute processes
– memory references in code (for both instructions and data) must
be translated to actual physical memory address
• Protection
– processes should not be able to reference memory locations
in another process without permission
– impossible to check addresses at compile time in programs
since the program could be relocated
– address references must be checked at run time by
hardware
• Sharing
– must allow several processes to access a common portion
of main memory without compromising protection
• cooperating processes may need to share access to the
same data structure
• better to allow each process to access the same copy of
the program rather than have their own separate copy
• Logical Organization
– users write programs in modules with different characteristics
• instruction modules are execute-only
• data modules are either read-only or read/write
• some modules are private others are public
– To effectively deal with user programs, the OS and hardware
should support a basic form of module to provide the required
protection and sharing.
• Physical Organization
– secondary memory is the long term store for programs and
data while main memory holds program and data currently
in use
– moving information between these two levels of memory is
a major concern of memory management (OS)
• it is highly inefficient to leave this responsibility to the
application programmer
FIXED PARTITIONING
• Split the physical memory into partitions into each a process
may be assigned
Two difficulties:
• The programmer may have to rewrite a program in order to fit
into even the largest available partition. Overlaying may be
used.
• Internal fragmentation typically results--there's memory that
is unused within each partition.
PLACEMENT ALGORITHM
• With equal sized partitions there's not much to
consider. Swapping out for more throughput may require
some policies
• For unequal sized partitions, the programs may be queued to
use the "best" partition. This may not give the best throughput
as some partitions may go unused.
RELOCATION
• Because of swapping and compaction, a process may occupy
different main memory locations during its lifetime
• Hence physical memory references by a process cannot be
fixed
• This problem is solved by distinguishing between logical
address and physical address
VIRTUAL MEMORY
• Virtual Memory is a space where large programs can store
themselves in form of pages while their execution and only the
required pages or portions of processes are loaded into the
main memory. This technique is useful as large virtual memory
is provided for user programs when a very small physical
memory is there.
Benefits of Virtual Memory :
• Large programs can be written, as virtual space available is
huge compared to physical memory.
• Less I/O required, leads to faster and easy swapping of
processes.
• More physical memory available, as programs are stored on
virtual memory, so they occupy very less space on actual
physical memory.
PAGING
• Main memory is partition into equal fixed-sized chunks (of
relatively small size)
• Trick: each process is also divided into chunks of the same
size called pages
• The process pages can thus be assigned to the available chunks
in main memory called frames (or page frames)
• Consequence: a process does not need to occupy a contiguous
portion of memory
PAGE TABLE
• The OS now needs to maintain (in main memory) a page table
for each process
• Each entry of a page table consist of the frame number where
the corresponding page is physically located
• The page table is indexed by the page number to obtain the
frame number
• A free frame list, available for pages, is maintained
ADDRESS TRANSLATION IN PAGING
SYSTEM
Address translation by paging is similar to segmentation. A
virtual address is comprised of a page number and an offset.
Page tables are used to translate the page number into a page
frame number; that is, the physical location of the page in
main memory.
Memory Management
Memory Management

Mais conteúdo relacionado

Mais procurados

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
 
40 demand paging
40 demand paging40 demand paging
40 demand pagingmyrajendra
 
Memory management
Memory managementMemory management
Memory managementImran Khan
 
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page tableduvvuru madhuri
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual MemoryArchith777
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structuresMukesh Chinta
 
Windows memory management
Windows memory managementWindows memory management
Windows memory managementTech_MX
 
services and system calls of operating system
services and system calls of operating system services and system calls of operating system
services and system calls of operating system Saurabh Soni
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
Operating System Unit 1
Operating System Unit 1Operating System Unit 1
Operating System Unit 1SanthiNivas
 
Operating system presentation
Operating system presentationOperating system presentation
Operating system presentationSonu Vishwakarma
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and SegmentationMadhur Gupta
 
File system Os
File system OsFile system Os
File system OsNehal Naik
 

Mais procurados (20)

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
 
40 demand paging
40 demand paging40 demand paging
40 demand paging
 
Memory management
Memory managementMemory management
Memory management
 
file management
 file management file management
file management
 
Memory management
Memory managementMemory management
Memory management
 
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page table
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
 
Windows memory management
Windows memory managementWindows memory management
Windows memory management
 
services and system calls of operating system
services and system calls of operating system services and system calls of operating system
services and system calls of operating system
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Operating System Unit 1
Operating System Unit 1Operating System Unit 1
Operating System Unit 1
 
Memory management OS
Memory management OSMemory management OS
Memory management OS
 
Operating system presentation
Operating system presentationOperating system presentation
Operating system presentation
 
File management
File managementFile management
File management
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and Segmentation
 
Memory management
Memory managementMemory management
Memory management
 
Memory management
Memory managementMemory management
Memory management
 
File system Os
File system OsFile system Os
File system Os
 

Semelhante a Memory Management

memory managment on computer science.ppt
memory managment on computer science.pptmemory managment on computer science.ppt
memory managment on computer science.pptfootydigarse
 
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
 
Operating system 36 virtual memory
Operating system 36 virtual memoryOperating system 36 virtual memory
Operating system 36 virtual memoryVaibhav Khanna
 
07-MemoryManagement.ppt
07-MemoryManagement.ppt07-MemoryManagement.ppt
07-MemoryManagement.ppthello509579
 
Power Point Presentation on Virtual Memory.ppt
Power Point Presentation on Virtual Memory.pptPower Point Presentation on Virtual Memory.ppt
Power Point Presentation on Virtual Memory.pptRahulRaj395610
 
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxLecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxAmanuelmergia
 
PAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxPAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxImranBhatti58
 
Memory management
Memory managementMemory management
Memory managementPATELARCH
 
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
 
CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management ghayour abbas
 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementkazim Hussain
 
08 operating system support
08 operating system support08 operating system support
08 operating system supportdilip kumar
 
08 operating system support
08 operating system support08 operating system support
08 operating system supportBitta_man
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSKumar Pritam
 
CSE2010- Module 4 V1.pptx
CSE2010- Module 4 V1.pptxCSE2010- Module 4 V1.pptx
CSE2010- Module 4 V1.pptxMadhuraK13
 
chapter 2 memory and process management
chapter 2 memory and process managementchapter 2 memory and process management
chapter 2 memory and process managementAisyah Rafiuddin
 

Semelhante a Memory Management (20)

Os unit 3
Os unit 3Os unit 3
Os unit 3
 
memory managment on computer science.ppt
memory managment on computer science.pptmemory managment on computer science.ppt
memory managment on computer science.ppt
 
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...
 
Operating system 36 virtual memory
Operating system 36 virtual memoryOperating system 36 virtual memory
Operating system 36 virtual memory
 
07-MemoryManagement.ppt
07-MemoryManagement.ppt07-MemoryManagement.ppt
07-MemoryManagement.ppt
 
Power Point Presentation on Virtual Memory.ppt
Power Point Presentation on Virtual Memory.pptPower Point Presentation on Virtual Memory.ppt
Power Point Presentation on Virtual Memory.ppt
 
UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptx
 
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxLecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptx
 
PAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxPAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docx
 
Memory management
Memory managementMemory management
Memory management
 
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
 
CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management
 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory management
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
CSE2010- Module 4 V1.pptx
CSE2010- Module 4 V1.pptxCSE2010- Module 4 V1.pptx
CSE2010- Module 4 V1.pptx
 
chapter 2 memory and process management
chapter 2 memory and process managementchapter 2 memory and process management
chapter 2 memory and process management
 

Mais de lavanya marichamy

Network design consideration
Network design considerationNetwork design consideration
Network design considerationlavanya marichamy
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmlavanya marichamy
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression modelslavanya marichamy
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specificationlavanya marichamy
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimizationlavanya marichamy
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Designlavanya marichamy
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transferlavanya marichamy
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transactionlavanya marichamy
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in clavanya marichamy
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formatslavanya marichamy
 

Mais de lavanya marichamy (17)

Digital video
Digital videoDigital video
Digital video
 
Network design consideration
Network design considerationNetwork design consideration
Network design consideration
 
Java servlets and CGI
Java servlets and CGIJava servlets and CGI
Java servlets and CGI
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithm
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specification
 
Data mining primitives
Data mining primitivesData mining primitives
Data mining primitives
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimization
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Design
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
Recovery with concurrent transaction
Recovery with concurrent transactionRecovery with concurrent transaction
Recovery with concurrent transaction
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formats
 
IEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LANIEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LAN
 
Broadband isdn and atm
Broadband  isdn and atmBroadband  isdn and atm
Broadband isdn and atm
 

Último

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
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
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
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
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
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
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 

Último (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
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
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
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
 
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"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
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
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 

Memory Management

  • 1. Memory management Presented by M . Lavanya M.sc(CS & IT) Nadar Saraswathi college of arts & science. Vadapudupatti ,Theni.
  • 2. MEMORY MANAGEMENT • Main Memory refers to a physical memory that is the internal memory to the computer. • The word main is used to distinguish it from external mass storage devices such as disk drives. Main memory is also known as RAM. • The computer is able to change only data that is in main memory. • Therefore, every program we execute and every file we access must be copied from a storage device into main memory.
  • 3. MEMORY MANAGEMENT REQUIREMENTS. Five requirements: • Relocation • Protection • Sharing • Logical organization • Physical organization
  • 4. • Relocation – programmer cannot know where the program will be placed in memory when it is executed – a process may be relocated in main memory due to swapping – swapping enables the OS to have a larger pool of ready-to- execute processes – memory references in code (for both instructions and data) must be translated to actual physical memory address
  • 5. • Protection – processes should not be able to reference memory locations in another process without permission – impossible to check addresses at compile time in programs since the program could be relocated – address references must be checked at run time by hardware
  • 6. • Sharing – must allow several processes to access a common portion of main memory without compromising protection • cooperating processes may need to share access to the same data structure • better to allow each process to access the same copy of the program rather than have their own separate copy
  • 7. • Logical Organization – users write programs in modules with different characteristics • instruction modules are execute-only • data modules are either read-only or read/write • some modules are private others are public – To effectively deal with user programs, the OS and hardware should support a basic form of module to provide the required protection and sharing.
  • 8. • Physical Organization – secondary memory is the long term store for programs and data while main memory holds program and data currently in use – moving information between these two levels of memory is a major concern of memory management (OS) • it is highly inefficient to leave this responsibility to the application programmer
  • 9. FIXED PARTITIONING • Split the physical memory into partitions into each a process may be assigned Two difficulties: • The programmer may have to rewrite a program in order to fit into even the largest available partition. Overlaying may be used. • Internal fragmentation typically results--there's memory that is unused within each partition.
  • 10. PLACEMENT ALGORITHM • With equal sized partitions there's not much to consider. Swapping out for more throughput may require some policies • For unequal sized partitions, the programs may be queued to use the "best" partition. This may not give the best throughput as some partitions may go unused.
  • 11. RELOCATION • Because of swapping and compaction, a process may occupy different main memory locations during its lifetime • Hence physical memory references by a process cannot be fixed • This problem is solved by distinguishing between logical address and physical address
  • 12. VIRTUAL MEMORY • Virtual Memory is a space where large programs can store themselves in form of pages while their execution and only the required pages or portions of processes are loaded into the main memory. This technique is useful as large virtual memory is provided for user programs when a very small physical memory is there. Benefits of Virtual Memory : • Large programs can be written, as virtual space available is huge compared to physical memory. • Less I/O required, leads to faster and easy swapping of processes. • More physical memory available, as programs are stored on virtual memory, so they occupy very less space on actual physical memory.
  • 13. PAGING • Main memory is partition into equal fixed-sized chunks (of relatively small size) • Trick: each process is also divided into chunks of the same size called pages • The process pages can thus be assigned to the available chunks in main memory called frames (or page frames) • Consequence: a process does not need to occupy a contiguous portion of memory
  • 14.
  • 15. PAGE TABLE • The OS now needs to maintain (in main memory) a page table for each process • Each entry of a page table consist of the frame number where the corresponding page is physically located • The page table is indexed by the page number to obtain the frame number • A free frame list, available for pages, is maintained
  • 16. ADDRESS TRANSLATION IN PAGING SYSTEM Address translation by paging is similar to segmentation. A virtual address is comprised of a page number and an offset. Page tables are used to translate the page number into a page frame number; that is, the physical location of the page in main memory.