Ptech GRP 5
Ptech GRP 5
MANAGEMENT
Memory
Memory management is the functionality of
Management
an operating system (OS) that manages the
primary memory, which includes the
movement of processes back and forth
between the main and the secondary
memory during execution. Memory
management tracks every memory location,
whether it is allocated or free, and checks
the amount of memory to be allocated for
each process. It also facilitates the process
allocation and correspondingly updates the
memory status.
Types of addresses used in a program before and
after memory allocation:
ADDRESSES
These are the addresses used in a
Symbolic source code. The variable names,
Addresses constants, and instruction labels are the
basic elements of a symbolic address
space.
These are the addresses at the time of
Relative compilation. A compiler converts
Addresses symbolic addresses into relative
addresses
TERMS
main memory
A variable-length block of data that resides in the
Segment
secondary memory.
TERMS
This occurs when the allotted memory blocks are
Internal of fixed size, and specific processes need more
fragmentation – space or less space than the size of the allotted
memory block
The following are the requirements that memory
management intends to satisfy:
It is not possible for a programmer to know in
REQUIREMENTS
Relocation advance which programs will reside in the main
memory at the exact time of the program
execution. Hence, the possibility that the program
may be moved within the main memory due to
swapping should always be considered.
Each process should be protected against
Protection unwanted interference by other processes,
whether accidental or intentional. Thus, programs
in other processes should not be able to reference
memory locations in a process, for reading or
writing purposes, without permission.
Any protection mechanism must have the
Sharing
flexibility to allow several processes to access the
same portion of the main memory. If a number of
processes are executing the same program, it is
advantageous to allow each process to access the
same copy of the program rather than have its
own separate copy.
The following are the requirements that memory
management intends to satisfy:
Most programs are organized into modules, some
REQUIREMENTS
Logical of which are unmodified, read-only or execute-
organization only, and some of which contain data that are
modifiable.
The task of moving and organizing information flow
Physical between the main and the secondary memory
organization should be a system responsibility.
Virtual memory
Virtual memory is an abstraction of the main
memory, providing processes and the kernel with
their own, almost infinite, private view of the main
memory. Virtual memory is made possible through
the support from both the processor and operating
system. Belowmultitasking,
It supports are some characteristics of a virtual
allowing processes and the
memory
kernel: to operate on their own private address
space without worrying about contention.
It supports oversubscription of the main memory,
allowing the operating system to transparently map
virtual memory between the main and the
secondary memory,
It is not a real as and
memory needed.
most operating systems
map virtual memory to real memory only on
demand (when the memory is first populated or
VIRTUAL MEMORY
Virtual
Memory
Paging
This partitioning method is
similar to simple paging, but
does not necessarily load all
of the pages of the process.
This has no external
fragmentation and
encompass large virtual
address space, that may lead
to a higher degree of
multiprogramming.
VIRTUAL MEMORY
Virtual
Memory
Segmentatio
This partitioning method is
similar to simple
n
segmentation, but does not
necessarily load all the
segments of a process. This
has no internal fragmentation
and encompass a large virtual
address space, that may also
lead to a higher degree of
multiprogramming.
THANK
YOU