SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
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
Memory Management
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

More Related Content

PPT
Databases: Locking Methods
PPTX
INTER PROCESS COMMUNICATION (IPC).pptx
DOCX
Group Communication in distributed Systems.docx
PPT
message passing
PPTX
Memory Management
PPT
Java Multithreading and Concurrency
PPTX
Introduction to parallel processing
PPTX
Distributed Operating Systems
Databases: Locking Methods
INTER PROCESS COMMUNICATION (IPC).pptx
Group Communication in distributed Systems.docx
message passing
Memory Management
Java Multithreading and Concurrency
Introduction to parallel processing
Distributed Operating Systems

What's hot (20)

PPTX
Message queues
PPT
Advanced Operating System- Introduction
PPTX
Parallel Processing.pptx
DOCX
OSI model (Tamil)
PPTX
Corba concepts & corba architecture
PPTX
Context model
PPTX
Synchronous vs Asynchronous Programming
PDF
Chapter 5 Database Transaction Management
PPT
Os Swapping, Paging, Segmentation and Virtual Memory
PPTX
Memory virtualization
PDF
MC 7204 OS Question Bank with Answer
PDF
Multithreading
PPTX
Deadlock ppt
PPTX
Multithreading and concurrency in android
PPT
Amoeba Operating System
PDF
Transaction Properties(ACID Properties)
PPTX
Memory technology and optimization in Advance Computer Architechture
Message queues
Advanced Operating System- Introduction
Parallel Processing.pptx
OSI model (Tamil)
Corba concepts & corba architecture
Context model
Synchronous vs Asynchronous Programming
Chapter 5 Database Transaction Management
Os Swapping, Paging, Segmentation and Virtual Memory
Memory virtualization
MC 7204 OS Question Bank with Answer
Multithreading
Deadlock ppt
Multithreading and concurrency in android
Amoeba Operating System
Transaction Properties(ACID Properties)
Memory technology and optimization in Advance Computer Architechture
Ad

Similar to Memory Management (20)

PPTX
Memory Management in Operating Systems ppt.pptx
PPTX
OS Unit 2.pptx
PDF
The life and times
PDF
Memory Management slides of operating system
PPTX
chapter 2 memory and process management
PPTX
Os unit 3
PPT
memory management and Virtual Memory.ppt
PPT
Cache replacement policies,cache miss,writingtechniques
PPT
Virtual Memory
PPTX
Paging +Algorithem+Segmentation+memory management
PPTX
Virtual Memory
PDF
muja osjkkhkhkkhkkkfdxfdfddkhvjlbjljlhgg
PPT
Memory comp
PPTX
Memory management in operating system | Paging | Virtual memory
PPT
Power Point Presentation on Virtual Memory.ppt
PPT
Chapter 2 part 1
PPTX
Memory management1
PPTX
Abhaycavirtual memory and the pagehit.pptx
PPTX
Memory management Assignment Help
PPTX
Computer architecture virtual memory
Memory Management in Operating Systems ppt.pptx
OS Unit 2.pptx
The life and times
Memory Management slides of operating system
chapter 2 memory and process management
Os unit 3
memory management and Virtual Memory.ppt
Cache replacement policies,cache miss,writingtechniques
Virtual Memory
Paging +Algorithem+Segmentation+memory management
Virtual Memory
muja osjkkhkhkkhkkkfdxfdfddkhvjlbjljlhgg
Memory comp
Memory management in operating system | Paging | Virtual memory
Power Point Presentation on Virtual Memory.ppt
Chapter 2 part 1
Memory management1
Abhaycavirtual memory and the pagehit.pptx
Memory management Assignment Help
Computer architecture virtual memory
Ad

More from lavanya marichamy (17)

PPTX
Digital video
PPTX
Network design consideration
PPTX
Java servlets and CGI
PPTX
Data structure - traveling sales person and mesh algorithm
PPTX
Fundamentals and image compression models
PPTX
Software requirements specification
PPTX
Data mining primitives
PPTX
Query evaluation and optimization
PPTX
Basic Computer Organisation And Design
PPTX
Register Transfer Language,Bus and Memory Transfer
PPTX
Arithmetic micro operations
PPTX
Recovery with concurrent transaction
PPTX
Pointer in c
PPTX
Dynamic memory allocation in c
PPTX
microcomputer architecture-Instruction formats
PPTX
IEEE STANDARED 802.5 LAN
PPTX
Broadband isdn and atm
Digital video
Network design consideration
Java servlets and CGI
Data structure - traveling sales person and mesh algorithm
Fundamentals and image compression models
Software requirements specification
Data mining primitives
Query evaluation and optimization
Basic Computer Organisation And Design
Register Transfer Language,Bus and Memory Transfer
Arithmetic micro operations
Recovery with concurrent transaction
Pointer in c
Dynamic memory allocation in c
microcomputer architecture-Instruction formats
IEEE STANDARED 802.5 LAN
Broadband isdn and atm

Recently uploaded (20)

PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
master seminar digital applications in india
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Lesson notes of climatology university.
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
master seminar digital applications in india
Updated Idioms and Phrasal Verbs in English subject
Yogi Goddess Pres Conference Studio Updates
Supply Chain Operations Speaking Notes -ICLT Program
Lesson notes of climatology university.
Microbial diseases, their pathogenesis and prophylaxis
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Anesthesia in Laparoscopic Surgery in India
2.FourierTransform-ShortQuestionswithAnswers.pdf
Final Presentation General Medicine 03-08-2024.pptx
Cell Types and Its function , kingdom of life
Paper A Mock Exam 9_ Attempt review.pdf.
LDMMIA Reiki Yoga Finals Review Spring Summer
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Practical Manual AGRO-233 Principles and Practices of Natural Farming
202450812 BayCHI UCSC-SV 20250812 v17.pptx

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
  • 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.