0% found this document useful (0 votes)
3 views

Chapter 4 Memory and File Management

Memory management is the process of coordinating a computer's main memory to ensure efficient allocation and deallocation for the operating system and applications. It involves managing a hierarchy of memory types, including registers, cache memory, main memory, magnetic disks, and magnetic tape, each with specific roles and speeds. Key requirements for an effective memory management system include relocation, protection, sharing, logical organization, and physical organization of memory resources.

Uploaded by

Jean Villaluz
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Chapter 4 Memory and File Management

Memory management is the process of coordinating a computer's main memory to ensure efficient allocation and deallocation for the operating system and applications. It involves managing a hierarchy of memory types, including registers, cache memory, main memory, magnetic disks, and magnetic tape, each with specific roles and speeds. Key requirements for an effective memory management system include relocation, protection, sharing, logical organization, and physical organization of memory resources.

Uploaded by

Jean Villaluz
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Memory Management

Chapter 4
What is Memory Management
• Memory management is the process of controlling and coordinating a
computer's main memory. It ensures that blocks of memory space are
properly managed and allocated so the operating system (OS),
applications and other running processes have the memory they need to
carry out their operations.

• Memory management takes into account the capacity limitations of the


memory device itself, deallocating memory space when it is no longer
needed or extending that space through virtual memory.
• Memory management strives to optimize memory usage so the CPU can
efficiently access the instructions and data it needs to execute the various
processes.
Memory Hierarchy
• The computer memory can be divided into 5 major
hierarchies that are based on use as well as speed. A
processor can easily move from any one level to some
other on the basis of its requirements. These five
hierarchies in a system’s memory are register, cache
memory, main memory, magnetic disc, and magnetic
tape.
Design of Memory Hierarchy
In computers, the memory hierarchy primarily includes the following:
1. Registers
• The register is usually an SRAM or static RAM in the computer processor that is used to hold the data word
that is typically 64 bits or 128 bits. A majority of the processors make use of a status word register and an
accumulator. The accumulator is primarily used to store the data in the form of mathematical operations,
and the status word register is primarily used for decision making.
2. Cache Memory
• The cache basically holds a chunk of information that is used frequently from the main memory. We can also
find cache memory in the processor. In case the processor has a single-core, it will rarely have multiple
cache levels. The present multi-core processors would have three 2-levels for every individual core, and one
of the levels is shared.
3. Main Memory
• In a computer, the main memory is nothing but the CPU’s memory unit that communicates directly. It’s the
primary storage unit of a computer system. The main memory is very fast and a very large memory that is
used for storing the information throughout the computer’s operations. This type of memory is made up of
ROM as well as RAM.
4. Magnetic Disks
• In a computer, the magnetic disks are circular plates that’s fabricated with plastic or metal with a
magnetized material. Two faces of a disk are frequently used, and many disks can be stacked on a single
spindle by read/write heads that are obtainable on every plane. The disks in a computer jointly turn at high
speed.
5. Magnetic Tape
• Magnetic tape refers to a normal magnetic recording designed with a slender magnetizable overlay that
covers an extended, thin strip of plastic film. It is used mainly to back up huge chunks of data. When a
computer needs to access a strip, it will first mount it to access the information. Once the information is
allowed, it will then be unmounted. The actual access time of a computer memory would be slower within a
Requirements of Memory Management System
1. Relocation – The available memory is generally shared among a number of processes in a
multiprogramming system, so it is not possible to know in advance which other programs will be
resident in main memory at the time of execution of his program.
2. Protection – There is always a danger when we have multiple programs executing at the same
time - one program may write to the address space of another program. So every process must
be protected against unwanted interference if one process tries to write into the memory space
of another process - whether accidental or incidental. The operating system makes a trade-off
between relocation and protection requirement: in order to satisfy the relocation requirement the
difficulty of satisfying the protection requirement increases in difficulty.
3. Sharing – A protection mechanism must allow several processes to access the same portion of
main memory. This must allow for each processes the ability to access the same copy of the
program rather than have their own separate copy.
4. Logical organization – Main memory is organized as linear or it can be a one-dimensional
address space which consists of a sequence of bytes or words. Most of the programs can be
organized into modules, some of those are unmodifiable (read-only, execute only) and some of
those contain data that can be modified. To effectively deal with a user program, the operating
system and computer hardware must support a basic module to provide the required protection
and sharing.
5. Physical organization – The structure of computer memory has two levels referred to as main
memory and secondary memory. Main memory is relatively very fast and costly as compared to
the secondary memory. Main memory is volatile. Thus secondary memory is provided for storage
of data on a long-term basis while the main memory holds currently used programs. The major
system concern between main memory and secondary memory is the flow of information and it
Midterm Laboratory Exercise/Exam
File Management
Chapter 4

You might also like