0% found this document useful (0 votes)
26 views56 pages

Physical vs. Virtual Memory Explained

The document provides an overview of computer memory, detailing its types, features, and historical evolution. It distinguishes between physical memory (RAM) and virtual memory, explaining their roles in data storage and processing. Additionally, it covers the characteristics and classifications of different memory types, including RAM and ROM, along with their advantages and disadvantages.

Uploaded by

Cristy Nalual
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views56 pages

Physical vs. Virtual Memory Explained

The document provides an overview of computer memory, detailing its types, features, and historical evolution. It distinguishes between physical memory (RAM) and virtual memory, explaining their roles in data storage and processing. Additionally, it covers the characteristics and classifications of different memory types, including RAM and ROM, along with their advantages and disadvantages.

Uploaded by

Cristy Nalual
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Physical and

Virtual Memory
GROUP 7- 8 - 9
Ormega, Sharelyn

Computer Memory
 Computer Memory is any physical device, used to store data,
information/instruction temporarily/permanently.
 It is the collection of storage units that stores binary information
in the form of bits.
 The memory block is split into a small number of components,
called cells.
 Each cell has a unique address to store the data in memory, ranging
from zero to memory size minus one. For example, if the size of
computer memory is 64k words, the memory units have 64 * 1024 =
65536 locations or cells. The address of the memories cells varies
from 0 to 65535.
Ormega, Sharelyn

Why do we need a computer


memory?
 In the computer system, we need computer memory to store
various types of data like text, images, video, audio, documents,
etc.
 We can retrieve it when the data is required. For example, when
we write and execute any computer program, it is initially stored
in primary memory
 If the processor does not need particular items for a longer time,
the program or data is automatically saved into the permanent or
secondary memory. Then the data is called from secondary
memory to main memory and performs the execution of codes.
Ormega, Sharelyn

Features of Memory

 Location
 Capacity
 Access Methods
 Unit of Transfer
 Performance
 Physical Types
 Organization
 Physical Characteristics
Ormega, Sharelyn

Features of Memory Definition


 Location
 It represents the internal/external location of the memory in a
computer.
 The internal memory is inbuilt in computer memory.
 It is also known as primary memory
 the example of primary memory are
 Registers
 Cache
 Main memory
 Whereas, external memory is the separate storage device from the
computer, such as
 Disk
 tape
 USB pen drive
Ormega, Sharelyn

 Capacity
 It is the most important feature of computer memory.
 Storage capacity can vary in external and internal memory.
 External devices' storage capacity is measured in terms of bytes,
whereas the internal memory is measured with bytes or words.
 The storage word length can vary in bits, such as 8, 16 or 32 bits.
 Access Methods
 Memory can be accessed through four modes of memory
 DMA
 Sequential Access Method
 Random Access Method
 Associative Access Method
Ormega, Sharelyn

 Access Methods Four Modes


 DMA
 As the name specifies, Direct Memory Address (DMA) is a method that
allows input/output (I/O) devices to access or retrieve data directly or
from the main memory.
 Sequential Access Method
 The sequential access method is used in a data storage device to read
stored data sequentially from the computer memory. Whereas, the data
received from random access memory (RAM) can be in any order.
 Random Access Method
 It is a method used to randomly access data from memory. This method
is the opposite of SAM. For example, to go from A to Z in random access,
we can directly jump to any specified location. In the Sequential method,
we have to follow all intervening from A to Z to reach at the particular
memory location.
 Associative Access Method
 It is a special type of memory that optimizes search performance
through defined data to directly access the stored information based on
Ormega, Sharelyn

• Unit of transfer
• As the name suggests, a unit of transfer measures the transfer rate of bits that can be
read or write in or out of the memory devices.
• The transfer rate of data can be different in external and internal memory.
• Internal memory:
• The transfer rate of bits is mostly equal to the word size.
• External memory:
• The transfer rate of bit or unit is not equal to the word length. It is always greater than a word or
may be referred to as blocks.

• Performance
• The performance of memory is majorly divided into three parts
• Access Time:
• In random access memory, it represents the total time taken by memory devices to perform a read
or write operation that an address is sent to memory.
• Memory Cycle Time:
• Total time required to access memory block and additional required time before starting second
access.
• Transfer rate:
• It describes the transfer rate of data used to transmit memory to or from an external or internal
memory device. Bit transfer can be different for different external and internal devices.
Ormega, Sharelyn

• Physical types
• It defines the physical type of memory used in a computer such as
magnetic, semiconductor, magneto-optical and optical.

• Organization
• It defines the physical structure of the bits used in memory.

• Physical characteristics
• It specifies the physical behavior of the memory like volatile, non-
volatile or non-erasable memory.
• Volatile memory is known as RAM, which requires power to retain stored
information, and if any power loss has occurred, stored data will be lost.
• Non-volatile memory is a permanent storage memory that is used to obtain
any stored information, even when the power is off.
• Non-erasable memory is a type of memory that cannot be erased after the
manufactured like ROM because at the time of manufactured ROM are
programmed.
Licardo, Michael S.

What is Physical Memory?

• Physical memory refers to the actual RAM of the system, which


usually takes the form of cards (DIMMs) attached onto the
motherboard. Also called primary memory, it is the only storage
type directly accessibly to the CPU and holds the instructions of
programs to execute. Physical memory is linearly addressable;
memory addresses increase in a linear fashion and each byte is
directly addressable.
Licardo, Michael S.

Physical Memory History

• In the early 1940s, memory technology often permitted a


capacity of a few bytes.
• ENIAC is the first electronic programmable digital computer
using thousands of vacuum tubes, it could perform simple
calculations involving 20 numbers of ten decimal digits stored in
the vacuum tubes.

ENIAC
Electronic Numerical Integrator and Computer

The Vacuum Tubes


Licardo, Michael S.

Physical Memory History


• Delay-line memory is the next significant advance in computer
memory.
• Developed by J. Presper Eckert in the early 1940s.
• Through the construction of a glass tube filled with mercury and
plugged at each end with a quartz crystal.
• Delay lines could store bits of information in the form of sound
waves propagating through the mercury, with the quartz crystals
acting as transducers to read and write bits.

Delay-line memory
Licardo, Michael S.

Physical Memory History

• Magnetic-core memory allowed for recall of memory after


power loss. The dominant form of memory until the development
of MOS semiconductor memory in the 1960s.
• It was developed by Frederick W. Viehe and An Wang in the
late 1940s, and improved by Jay Forrester and Jan A.
Raichman in the early 1950s.

Magnetic-core memory
Licardo, Michael S.

Physical Memory History

• Flip-flop circuit is implemented as the first semiconductor


memory in the early 1960s using bipolar transistors.
• Semiconductor memory made from discrete devices was first
shipped by Texas instruments to the United States Air Force in
1961.

Flip-flop Circuit
First Semiconductor Memory
Licardo, Michael S.

Physical Memory History

• SP95 is the first bipolar semiconductor memory IC chip


introduced by IBM in 1965.
• While semiconductor memory offered improved performance
over magnetic-core memory, it remain larger and more
expensive and did not displace magnetic-core memory until the
late 1960s.

SP95
First bipolar semiconductor memory IC chip
Laturnas, John Claude S.

Classification of Memory

 The following figure represents the classification of memory:


Laturnas, John Claude S.

 Primary or Main Memory


 Primary memory is also known as the computer system's main memory
that communicates directly within the CPU, Auxiliary memory and the Cache
memory.
 Main memory is used to kept programs or data when the processor is
active to use them. When a program or data is activated to execute, the
processor first loads instructions or programs from secondary memory into
main memory, and then the processor starts execution.
 Accessing or executing of data from primary memory is faster because it
has a cache or register memory that provides faster response, and it is
located closer to the CPU. The primary memory is volatile, which means the
data in memory can be lost if it is not saved when a power failure occurs.
 It is costlier than secondary memory, and the main memory capacity is
limited as compared to secondary memory.
Laturnas, John Claude S.

 The primary memory is further divided into two


parts:
 RAM (Random Access Memory)
 ROM (Read Only Memory)
 Random Access Memory (RAM)
 Random Access Memory (RAM) is one of the faster types of main memory
accessed directly by the CPU. It is the hardware in a computer device to
temporarily store data, programs or program results. It is used to read/write
data in memory until the machine is working. It is volatile, which means if a
power failure occurs or the computer is turned off, the information stored in
RAM will be lost. All data stored in computer memory can be read or accessed
randomly at any time.
Laturnas, John Claude S.

 There are two types of RAM


 SRAM
 DRAM
 SRAM: SRMA (Static Random-Access Memory)
 is a type of RAM used to store static data in the memory. It means to store data
in SRAM remains active as long as the computer system has a power supply.
However, data is lost in SRAM when power failures have occurred.
 DRAM (Dynamic Random-Access Memory)
 is a type of RAM that is used for the dynamic storage of data in RAM. In DRAM,
each cell carries one-bit information. The cell is made up of two parts: a
capacitor and a transistor. The size of the capacitor and the transistor is so
small, requiring millions of them to store on a single chip. Hence, a DRAM chip
can hold more data than an SRAM chip of the same size. However, the capacitor
needs to be continuously refreshed to retain information because DRAM is
volatile. If the power is switched off, the data store in memory is lost.
Laturnas, John Claude S.

 Characteristics of Static Ram (SRAM)


1. It does not require to refresh.
2. It is faster than DRAM
3. It is expensive.
4. High power consumption
5. Longer life
6. Large size
7. Uses as a cache memory
 Characteristics of DRAM
1. It requires continuously refreshed to retain the data.
2. It is slower than SRAM
3. It holds a large amount of data
4. It is the combination of capacitor and transistor
5. It is less expensive as compared to SRAM
6. Less power consumption
Laturnas, John Claude S.

SRAM Vs. DRAM


Laturnas, John Claude S.

Advantages and Disadvantages of RAM

 Advantages of RAM
1. It is a faster type of memory in a computer.
2. It requires less power to operate.
3. Program loads much faster
4. More RAM increases the performance of a system and can multitask.
5. Perform read and write operations.
6. The processor can read information faster than a hard disc, floppy, USB, etc.
 Disadvantages of RAM
1. Less RAM reduces the speed and performance of a computer.
2. Due to volatile, it requires electricity to preserve the data.
3. It is expensive than ROM
4. It is unreliable as compared to ROM
5. The Size of RAM is limited.
Laturnas, John Claude S.

 Read Only Memory (ROM)


 ROM is a memory device or storage medium that is used to permanently store
information inside a chip.
 It is a read-only memory that can only read stored information, data or
programs, but we cannot write or modify anything. A ROM contains some
important instructions or program data that are required to start or boot a
computer. It is a non-volatile memory; it means that the stored information
cannot be lost even when the power is turned off or the system is shut down.
Laturnas, John Claude S.

 There are five types of Read Only Memory


 MROM (Masked Read Only Memory)
 PROM (Programmable Read Only Memory)
 EPROM (Erasable and Programmable Read Only Memory)
 EEPROM (Electrically Erasable and Programmable Read Only Memory)
 Flash ROM:
 MROM (Masked Read Only Memory)
 MROM is the oldest type of read-only memory whose program or data is pre-
configured by the integrated circuit manufacture at the time of manufacturing.
Therefore, a program or instruction stored within the MROM chip cannot be
changed by the user.
 PROM (Programmable Read Only Memory)
 It is a type of digital read-only memory, in which the user can write any type of
information or program only once. It means it is the empty PROM chip in which the
user can write the desired content or program only once using the special PROM
programmer or PROM burner device; after that, the data or instruction cannot be
changed or erased.
Laturnas, John Claude S.

 EPROM (Erasable and Programmable Read Only


Memory)
 It is the type of read only memory in which stored data can be erased and re-
programmed only once in the EPROM memory. It is a non-volatile memory chip that
holds data when there is no power supply and can also store data for a minimum of
10 to 20 years. In EPROM, if we want to erase any stored data and re-programmed it,
first, we need to pass the ultraviolet light for 40 minutes to erase the data; after that,
the data is re-created in EPROM.
 EEPROM (Electrically Erasable and Programmable
Read Only Memory)
 The EEROM is an electrically erasable and programmable read only memory used to
erase stored data using a high voltage electrical charge and re-programmed it. It is
also a non-volatile memory whose data cannot be erased or lost; even the power is
turned off. In EEPROM, the stored data can be erased and reprogrammed up to 10
thousand times, and the data erase one byte at a time.
 Flash ROM:
 Flash memory is a non-volatile storage memory chip that can be written or
programmed in small units called Block or Sector. Flash Memory is an EEPROM form of
computer memory, and the contents or data cannot be lost when the power source is
turned off. It is also used to transfer data between the computer and digital devices.
Laturnas, John Claude S.

Advantages and Disadvantages RAM


 Advantages of RAM
1. It is a non-volatile memory in which stored information can be lost even power is turned off.
2. It is static, so it does not require refreshing the content every time.
3. Data can be stored permanently.
4. It is easy to test and store large data as compared to RAM.
5. These cannot be changed accidently
6. It is cheaper than RAM.
7. It is simple and reliable as compared to RAM.
8. It helps to start the computer and loads the OS.
 Disadvantages of RAM
1. Store data cannot be updated or modify except to read the existing data.
2. It is a slower memory than RAM to access the stored data.
3. It takes around 40 minutes to destroy the existing data using the high charge of
ultraviolet light.
Laturnas, John Claude S.

 RAM Vs. ROM


Cebuano, Steve

 Secondary Memory
 Secondary memory is a permanent storage space to hold a large
amount of data. Secondary memory is also known as external memory
that representing the various storage media (hard drives, USB, CDs, flash
drives and DVDs) on which the computer data and program can be saved
on a long term basis.
 However, it is cheaper and slower than the main memory. Unlike primary
memory, secondary memory cannot be accessed directly by the CPU.
Instead of that, secondary memory data is first loaded into the RAM
(Random Access Memory) and then sent to the processor to read and
update the data.
 Secondary memory devices also include magnetic disks like hard disk and
floppy disks, an optical disk such as CDs and CDROMs, and magnetic
tapes.
Cebuano, Steve

 Features of Secondary Memory


 Its speed is slower than the primary/ main memory.
 Store data cannot be lost due to non-volatile nature.
 It can store large collections of different types, such as audio, video, pictures,
text, software, etc.
 All the stored data in a secondary memory cannot be lost because it is a
permanent storage area; even the power is turned off.
 It has various optical and magnetic memories to store data.
Cebuano, Steve

Types of Secondary Memory


The following are the types of secondary memory devices:

1. Hard Disk
2. Floppy Disk
3. CD (Compact Disc)
4. DVD Drive/Disc
5. Blu Ray Disc (BD)
6. Pen Drive
7. Cache Memory
8. Register Memory
Cebuano, Steve

 Hard Disk
 A hard disk is a computer's permanent
storage device. It is a non-volatile disk
that permanently stores data, programs,
and files, and cannot lose store data
when the computer's power source is
switched off.
 Typically, it is located internally on
computer's motherboard that stores and
retrieves data using one or more rigid fast
rotating disk platters inside an air-sealed
casing.
 It is a large storage device, found on
every computer or laptop for permanently
storing installed software, music, text
documentation, videos, operating system,
and data until the user did not delete.
Cebuano, Steve

 Floppy Disk
 A floppy disk is a secondary storage system
that consisting of thin, flexible magnetic
coating disks for holding electronic data such
as computer files. It is also known as Floppy
Diskette that comes in three sizes like 8
inches, 5.5 inches and 3.5 inches.
 The stored data of a floppy disk can be
accessed through the floppy disk drive.
Furthermore, it is the only way through a new
program installed on a computer or backup of
the information.
 However, it is the oldest type of portable
storage device, which can store data up to
1.44 MB. Since most programs were larger,
that required multiple floppy diskettes to
store large amounts of data. Therefore, it is
not used due to very low memory storage.
Cebuano, Steve

 CD (Compact Disc)
 A CD is an optical disk storage device,
stands for Compact Disc. It is a storage
device used to store various data types
like audio, videos, files, OS, Back-Up file,
and any other information useful to a
computer. The CD has a width of 1.2 mm
and 12 cm in height, which can store
approximately 783 MB of data size. It
uses laser light to read and write data
from the CDs.
Cebuano, Steve

 Types of CDs
 CD-ROM (Compact Disc Read Only Memory):
It is mainly used for bulk size mass like audio
CDs, software and computer games at the time
of manufacture. Users can only read data, text,
music, videos from the disc, but they cannot
modify or burnt it.
 CD-R (Compact Disc Recordable): The type of
Compact Disc used to write once by the user;
after that, it cannot be modified or erased.
 CD-RW (Compact Disc Rewritable): It is a
rewritable CD disc, often used to write or delete
the stored data.
Cabañas, Alfredo

 DVD Drive/Disc
 DVD is an optical disc storage device, stands
for Digital Video Display or Digital Versatile
Disc. It has the same size as a CD but can
store a larger amount of data than a compact
disc. It was developed in 1995 by Sony,
Panasonic, Toshiba and Philips four electronics
companies.
 DVD drives are divided into three types, such
as DVD ROM (Read Only Memory), DVD R
(Recordable) and DVD RW (Rewritable or
Erasable). It can store multiple data formats
like audio, videos, images, software, operating
system, etc. The storing capacity of data in
DVD is 4.7 GB to 17 GB.
Cabañas, Alfredo

 Blu Ray Disc (BD)


 Blu Ray is an Optical disc storage device used to store a large amount of data
or high definition of video recording and playing other media files.
 It uses laser technology to read the stored data of the Blu-ray Disk. It can store
more data at a greater density as compared to CD/ DVD. For example, compact
discs allow us to store 700 MB of data, and in DVDs, it provides up to 8 GB of
storage capacity, while Blu-ray Discs provide 28 GB of space to store data.

 Pen Drive
 A pen drive is a portable device used to permanently
store data and is also known as a USB flash drive. It is
commonly used to store and transfer the data connected
to a computer using a USB port. It does not have any
moveable part to store the data; it uses an integrated
circuit chip that stores the data. It allows the users to
store and transfer data like audio, videos, images, etc.
from one computer to any USB pen drive. The storing
capacity of pen drives from 64 MB to 128 GB or more.
Cabañas, Alfredo

 Cache Memory
 It is a small-sized chip-based computer memory that
lies between the CPU and the main memory. It is a
faster, high performance and temporary memory to
enhance the performance of the CPU. It stores all the
data and instructions that are often used by computer
CPUs. It also reduces the access time of data from the
main memory. It is faster than the main memory, and
sometimes, it is also called CPU memory because it is
very close to the CPU chip. The following are the
levels of cache memory.
 The Levels of Cache Memory
 L1 Cache: The L1 cache is also known as the onboard, internal, or primary cache. It is built with
the help of the CPU. Its speed is very high, and the size of the L1 cache varies from 8 KB to 128 KB.
 L2 Cache: It is also known as external or secondary cache, which requires fast access time to store
temporary data. It is built into a separate chip in a motherboard, not built into the CPU like the L1
level. The size of the L2 cache may be 128 KB to 1 MB.
 L3 Cache: L3 cache levels are generally used with high performance and capacity of the computer.
It is built into a motherboard. Its speed is very slow, and the maximum size up to 8 MB.
Cabañas, Alfredo

Advantages and Disadvantages of Cache Memory

 Advantages of Cache Memory


1. Cache memory is the faster memory as compared to the main memory.
2. It stores all data and instructions that are repeatedly used by the CPU for
improving the performance of a computer.
3. The access time of data is less than the main memory.

 Disadvantage of Cache Memory


1. It is very costly as compared to the Main memory and the Secondary memory.
2. It has limited storage capacity.
Cabañas, Alfredo

Register Memory
 The register memory is a temporary storage area for storing and
transferring the data and the instructions to a computer. It is the smallest
and fastest memory of a computer. It is a part of computer memory located
in the CPU as the form of registers. The register memory is 16, 32 and 64
bits in size. It temporarily stores data instructions and the address of the
memory that is repeatedly used to provide faster response to the CPU.
Cabañas, Alfredo

Primary Vs. Secondary Memory


Cabañas, Alfredo

What is Virtual Memory?


 Virtual memory
 It is a common technique used in a computer's operating system
(OS). Virtual memory uses both hardware and software to enable a
computer to compensate for physical memory shortages, temporarily
transferring data from random access memory (RAM) to disk storage.
 Example
 A business owner uses their computer's virtual memory system when
running multiple applications simultaneously. The user tries to load
their email in their browser window while also running word
processing software, shift scheduling software and a content
management system.
Basilisa, Astorga

Virtual Memory History


 In the 1950s, all larger programs had to contain logic for managing primary
and secondary storage, such as overlaying. Virtual memory was therefore
introduced not only to extend primary memory, but to make such an extension
as easy as possible for programmers to use. To allow
for multiprogramming and multitasking, many early systems divided memory
between multiple programs without virtual memory, such as early models of
the PDP-10 via registers.
 The first true virtual memory system was that implemented at the University of
Manchester to create a one-level storage system as part of the Atlas Computer.
It used a paging mechanism to map the virtual addresses available to the
programmer on to the real memory that consisted of 16,384 words of
primary core memory with an additional 98,304 words of secondary drum
memory.
 The first Atlas was commissioned in 1962 but working prototypes of paging had
been developed by 1959.
 In 1961, the Burroughs Corporation independently released the first
commercial computer with virtual memory, the B5000,
with segmentation rather than paging.
Basilisa, Astorga

Virtual Memory History


 IBM developed the concept of hypervisors in their CP-40 and CP-67, and in
1972 provided it for the S/370 as Virtual Machine Facility/370. IBM introduced
the Start Interpretive Execution (SIE) instruction as part of 370-XA on the 3081,
and VM/XA versions of VM to exploit it.
 Before virtual memory could be implemented in mainstream operating
systems, many problems had to be addressed. Dynamic address translation
required expensive and difficult-to-build specialized hardware; initial
implementations slowed down access to memory slightly.
 There were worries that new system-wide algorithms utilizing secondary
storage would be less effective than previously used application-specific
algorithms. By 1969, the debate over virtual memory for commercial
computers was over; an IBM research team led by David Sayre showed that
their virtual memory overlay system consistently worked better than the best
manually controlled systems.
Basilisa, Astorga

Virtual Memory History


 Throughout the 1970s, the IBM 370 series running their virtual-storage based
operating systems provided a means for business users to migrate multiple
older systems into fewer, more powerful, mainframes that had improved
price/performance. The first minicomputer to introduce virtual memory was the
Norwegian NORD-1; during the 1970s, other minicomputers implemented
virtual memory, notably VAX models running VMS.
 Virtual memory was introduced to the x86 architecture with the protected
mode of the Intel 80286 processor, but its segment swapping technique scaled
poorly to larger segment sizes.
 The Intel 80386 introduced paging support underneath the
existing segmentation layer, enabling the page fault exception to chain with
other exceptions without double fault. However, loading segment descriptors
was an expensive operation, causing operating system designers to rely strictly
on paging rather than a combination of paging and segmentation.
Selim, Queendey

What are the types of Virtual


Memory
 Entire memory operations of computer are
managed by the memory management unit
(MMU), and it is enabled with handling Virtual
Memory. Memory management unit is embedded
in the CPU(Central Processing Unit).
 Types of virtual memory: Paging and
Segmentation
 Virtual memory can be managed in a number of
different ways by a system’s operating system,
and the two most common approaches are
Selim, Queendey

Define the types of Virtual


Memory
(PAGING)

Paging is a virtual memory technique that separates memory into sections called paging
files. When a computer reaches its RAM limits, it transfers any currently unused pages into
the part of its hard drive used for virtual memory. The computer performs this process
using a swap file, a designated space within its hard drive for extending the virtual memory
of the computer's RAM. By moving unused files into its hard drive, the computer frees its
RAM space for other memory tasks and ensures that it doesn't run out of real memory.
 As part of this process, the computer uses page tables, which translate virtual addresses
into the physical addresses that the computer's memory management unit (MMU) uses to
process instructions. The MMU communicates between the computer's OS and its page
tables. When the user performs a task, the OS searches its RAM for the processes to
conduct the task. If it can't find the processes to complete the task in RAM,
the MMU prompts the OS to move the required pages into RAM and uses a page table to
note the new storage location of the pages. Page table: A page table is the data structure
used by a virtual memory system in a computer operating system to store the mapping
between visual address and physical addresses.
 Another type of paging which virtual memory uses is Anticipatory Paging, this is when
the operating system attempts to anticipate data that will be needed next and copies it to
the RAM before it is actually required.
Selim, Queendey

Disadvantages of Paging
 Individual programs face extra latency (more time to
load) when they access a page for the first time.
 Low powered, low cost embedded systems could
possibly not have a memory management unit that
support page replacement.
 Page replacement algorithms are complex.
 Security risks, including timing attacks are at risk.
 Thrashing will cause the computer performance to
degrade or collapse.
Bini, Alvin

Define the types of Virtual


Memory
(SEGMENTATION)

Main objective of using the segmentation is to handle thevirtual memory.

Demand segmentation allows for pages that are often referenced with each other to
be brought into memory together, this action will decrease the number of page faults.
 Segmentation is another method of managing virtual memory. A segmentation system
divides virtual memory into varying lengths and moves any segments that aren't in
use from the computer's virtual memory space to its hard drive. Like page tables,
segment tables track whether the computer stores the segment in memory or a
physical address. Segmentation differs from paging because it divides memory into
sections of varying lengths, while paging divides memory into units of equal size. With
paging, the hardware determines the size of a section, but the user can select the
length of a segment in a segmentation system.
 Segmentation is often slower than paging, but it offers the user more control over how
to divide memory and may make it easier to share data between processes. You can
customize the segments based on the machine's purpose and usage. Casual computer
users may prefer a paging system because it automatically handles memory divisions.
Bini, Alvin

Disadvantages of Segmentation
 But a problem with segmentation is that because each
segment is a different length, it can lead to memory
“fragmentation.” This means that as segments are
allocated and de-allocated, small chunks of memory
can be left scattered around which are too small to be
useful.
 As these small chunks build up, fewer and fewer
segments of useful size can be allocated. And if the OS
does start using these small segments then there are a
huge number to keep track of, and each process will
need to use many different segments, which is
inefficient and can reduce performance.
Maricel, Amandoron

Importance of Virtual Memory

 MULTITASKING
 One important use of virtual memory is multitasking. When a computer user opens multiple
programs at once, the data for these programs must be stored in memory for quick access. The
more programs are open, the memory is needed. When the computers physical memory is full, the
excess data is stored in virtual memory.
 LARGE PROGRAMS
 In addition to multitasking, virtual memory allows programmers to create larger and more complex
applications. When these programs are using, they occupy physical memory as well as virtual
memory.
 FLEXIBILITY
 If computers only relied on memory chips, far less memory would be available and the usefulness
of many software programs would be severely limited. Even though virtual memory is slower, it is
still useful because it greatly expands a computer’s functionality.
 CHANGING TIMES
 When virtual memory was first created, solid-state memory chips were much smaller and more
expensive. Todays’ memory chips can store many gigabytes of data at very low cost. As memory
chips continue to grow in capacity and prices fall, virtual memory is may be less useful in the
future.
Maricel, Amandoron

Advantages and Disadvantages of


Virtual Memory
 Advantages of Virtual Memory
 Allows more than one program to be executed at the same time.
 Common data or code may be shared between memory.
 The processes may become even larger than the overall physical memory, which means virtual memory can
be used to offload some of the memory, which isn’t being used in the physical memory.
 Virtual memory increases the overall memory on a system without adding RAM, this is advantageous as
virtual memory is less expensive.
 Eliminates external fragmentation.
 External fragmentation occurs when free memory is divided into smaller blocks, and is interspersed by
allocated memory. External fragmentation is regarded to be a disadvantage in storage allocation algorithms,
when they fail to order memory used by programs efficiently.
 Less input/output is required, which leads to faster and easy swapping of processes.
 Memory holes: Memory holes could cause fragmentation, though virtual memory solves this issue as virtual
memory doesn’t access the physical memory management unit, furthermore, every program has its own
mapping and using the mapping we can put our program data wherever we want in the RAM.
 Disadvantages of Virtual Memory
 If the system relies to much on virtual memory, it may cause a decrease in performance.
 The more virtual memory that’s being used, the less disk space a user has for storage.
Romero, Kay Trecia

Example of Virtual Memory


 Suppose, if operating system requires the 200 MB memory’s space to manage the
all programs, which are working in currently. But, at present having only 100 MB
physical memory space that is stored on the Random Access Memory (RAM).
 Then, Operating system will try to create the 200 MB of virtual memory, and VMM
(Virtual Memory Manager) helps to handle that [Link] has to work to arise
the new files on the hard disk, which are need (100 MB) such as (200 Mb-100 MB)
= 100 MB.
 VMM has responsible to deal in real memory, which is only 100 MB.
Canada, Renegin

What is the Difference Between


Physical and Virtual Memory
 Physical memory: Physical memory refers to the RAM or the
primary memory in the computer. Physical memory is a volatile
memory. Therefore, it requires a continuous flow of power to
retain data.
 Virtual memory is a logical memory. In other words, it is a
memory management technique performed by the operating
system. Virtual memory allows the programmer to use more
memory for the programs than the available physical memory. If
the physical memory is 4GB and the virtual memory is 16GB, the
programmer can use the 16GB virtual memory to execute the
program. Using virtual memory, he can execute complex
programs that require more memory than the physical memory.
Canada, Renegin

What is the Difference Between


Physical and Virtual Memory
 The main difference between physical and virtual memory is that
the physical memory refers to the actual RAM of the system
attached to the motherboard, but the virtual memory is a
memory management technique that allows the users to execute
programs larger than the actual physical memory.
 Memory management is an important operation in an operating
system. It allows the processes to move back and forth between
the main memory and hard disk during the time of executing the
program. Moreover, this process keeps on track of every memory
location in order to allocate processes and to free the memory.
Physical memory is the primary memory that has the currently
executing programs. On the other hand, virtual memory extends the
capacity of the main memory to execute large programs using the
hard disk.
Canada, Renegin

What is the Difference Between


Physical and Virtual Memory

 Physical memory, which is the actual RAM, is a form of computer


data storage that stores the currently executing programs. In
contrast, virtual memory is a memory management technique
that creates an illusion to users of larger physical memory. Thus,
this is the main difference between physical and virtual memory.
Thank You

Reporters
 Gro • Orm hel  Group 8  Group 9
up 7 ega, • Cabañas, Alfredo • Selim, Queendy
• Can
Shar • Cebuano, Steve • Bini, Alvin
• Latu ada,
elyn • Basilisa, Dayaguit • Romero, Kay
rnas, Rene
John • Licar gin • Amandoron, Maricel
Clau do,
de Mica

You might also like