Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Computer architecture and organization, Study notes of Computer Architecture and Organization

Computer architecture and organization unit 5

Typology: Study notes

2023/2024

Available from 06/08/2025

anshuman-bishnoi
anshuman-bishnoi 🇮🇳

5 documents

1 / 27

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UNIT 5
Memory Organization: Types and capacity of memory, Memory Hierarchy, Cache Memory,
Virtual Memory.
What is Computer Memory?
Computermemory is just like the human brain. It is used to storedata/information
andinstructions. It is adata storageunit or a datastorage devicewhere data is to be processed
and instructions required for processing are stored. It can store both the input and output can be
stored here.
Characteristics of Computer Memory
It is faster computer memory as compared to secondary memory.
It issemiconductormemories.
It is usually a volatile memory, and main memory of the computer.
A computer system cannot run without primary memory.
How Does Computer Memory Work?
When you open a program, it is loaded from secondary memory into primary memory.
Because there are various types of memory and storage, an example would be moving a program
from asolid-state drive (SSD)to RAM. Because primary storage is accessed more quickly, the
opened software can connect with the computer’s processor more quickly. The primary memory
is readily accessible from temporary memory slots or other storage sites.
Memory is volatile, which means that data is only kept temporarily in memory. Data
saved in volatile memory is automatically destroyed when a computing device is turned off.
When you save a file, it is sent to secondary memory for storage.
There are various kinds of memory accessible. It’s operation will depend upon the type of
primary memory used. but normally, semiconductor-based memory is more related with
memory. Semiconductor memory made up ofIC (integrated circuits)with silicon-based metal-
oxide-semiconductor (MOS) transistors.
Types of Computer Memory
In general, computer memory is of three types:
Primary memory
Secondary memory
Cache memory
Now we discuss each type of memory one by one in detail:
1. Primary Memory
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b

Partial preview of the text

Download Computer architecture and organization and more Study notes Computer Architecture and Organization in PDF only on Docsity!

UNIT 5

Memory Organization: Types and capacity of memory, Memory Hierarchy, Cache Memory, Virtual Memory. What is Computer Memory? Computer memory is just like the human brain. It is used to store data/information and instructions. It is a data storage unit or a data storage device where data is to be processed and instructions required for processing are stored. It can store both the input and output can be stored here. Characteristics of Computer Memory  It is faster computer memory as compared to secondary memory.  It is semiconductor memories.  It is usually a volatile memory, and main memory of the computer.  A computer system cannot run without primary memory.  How Does Computer Memory Work? When you open a program, it is loaded from secondary memory into primary memory. Because there are various types of memory and storage, an example would be moving a program from a solid-state drive (SSD) to RAM. Because primary storage is accessed more quickly, the opened software can connect with the computer’s processor more quickly. The primary memory is readily accessible from temporary memory slots or other storage sites. Memory is volatile, which means that data is only kept temporarily in memory. Data saved in volatile memory is automatically destroyed when a computing device is turned off. When you save a file, it is sent to secondary memory for storage. There are various kinds of memory accessible. It’s operation will depend upon the type of primary memory used. but normally, semiconductor-based memory is more related with memory. Semiconductor memory made up of IC (integrated circuits) with silicon-based metal- oxide-semiconductor (MOS) transistors. Types of Computer Memory In general, computer memory is of three types:  Primary memory  Secondary memory  Cache memory Now we discuss each type of memory one by one in detail:

1. Primary Memory

It is also known as the main memory of the computer system. It is used to store data and programs or instructions during computer operations. Primary memory is a segment of computer memory that can be accessed directly by the processor. In a hierarchy of memory, primary memory has access time less than secondary memory and greater than cache memory. Generally, primary memory has a storage capacity lesser than secondary memory and greater than cache memory.It uses semiconductor technology and hence is commonly called semiconductor memory. Need of primary memory In order to enhance the efficiency of the system, memory is organized in such a way that access time for the ready process is minimized. The following approach is followed to minimize access time for the ready process.  All programs, files, and data are stored in secondary storage that is larger and hence has greater access time.  Secondary memory can not be accessed directly by a CPU or processor.  In order, to execute any process operating system loads the process in primary memory which is smaller and can be accessed directly by the CPU.  Since only those processes are loaded in primary memory which is ready to be executed, the CPU can access those processes efficiently and this optimizes the performance of the system. Primary Memory Example Primary Memory examples are RAM, ROM, cache, PROM, EPROM, registers, etc. Classification of Primary Memory Primary memory can be broadly classified into two parts:

  1. R ead- O nly M emory (ROM)
  2. R andom A ccess M emory (RAM) RAM (Random Access Memory): It is a volatile memory. Volatile memory stores information based on the power supply. If the power supply fails/ interrupted/stopped, all the data and information on this memory will be lost. RAM is used for booting up or start the computer. It temporarily stores programs/data which has to be executed by the processor. Any process in the system which needs to be executed is loaded in RAM which is processed by the CPU as per Instructions in the program. Like if we click on applications like Browser, firstly browser code will be loaded by the Operating system into the RAM after which the CPU will execute and open up the Browser. RAM is of two types:

o A 128 * 8 RAM chip has a memory capacity of 128 words of eight bits (one byte) per word. This requires a 7-bit address and an 8-bit bidirectional data bus. o The 8-bit bidirectional data bus allows the transfer of data either from memory to CPU during a read operation or from CPU to memory during a write operation. o The read and write inputs specify the memory operation, and the two chip select (CS) control inputs are for enabling the chip only when the microprocessor selects it. o The bidirectional data bus is constructed using three-state buffers. o The output generated by three-state buffers can be placed in one of the three possible states which include a signal equivalent to logic 1, a signal equal to logic 0, or a high- impedance state. Note: The logic 1 and 0 are standard digital signals whereas the high-impedance state behaves like an open circuit, which means that the output does not carry a signal and has no logic significance. The following function table specifies the operations of a 128 * 8 RAM chip. From the functional table, we can conclude that the unit is in operation only when CS1 = 1 and CS2 = 0. The bar on top of the second select variable indicates that this input is enabled when it is equal to 0.  ROM (Read Only Memory): It is a non-volatile memory. Non-volatile memory stores information even when there is a power supply failed/ interrupted/stopped. ROM is used to store information that is used to operate the system. As its name refers to read-only memory, we can only read the programs and data that is stored on it. ROM includes those programs which run on booting of the system (known as a bootstrap program that initializes OS) along with data like algorithm required by OS. Anything stored in ROM cannot be altered or changed. It contains some electronic fuses that can be programmed for a piece of specific information. The information stored in the ROM in binary format. It is also known as permanent memory. ROM is of four types:

MROM(Masked ROM): Hard-wired devices with a pre-programmed collection of data or instructions were the first ROMs. Masked ROMs are a type of low-cost ROM that works in this way.  PROM (Programmable Read Only Memory): This read-only memory is modifiable once by the user. The user purchases a blank PROM and uses a PROM program to put the required contents into the PROM. Its content can’t be erased once written.  EPROM (Erasable Programmable Read Only Memory): EPROM is an extension to PROM where you can erase the content of ROM by exposing it to Ultraviolet rays for nearly 40 minutes.  EEPROM (Electrically Erasable Programmable Read Only Memory): Here the written contents can be erased electrically. You can delete and reprogram EEPROM up to 10,000 times. Erasing and programming take very little time, i.e., nearly 4 -10 ms(milliseconds). Any area in an EEPROM can be wiped and programmed selectively. ROM chips are also available in a variety of sizes and are also used as per the system requirement. The following block diagram demonstrates the chip interconnection in a 512 * 8 ROM chip. o A ROM chip has a similar organization as a RAM chip. However, a ROM can only perform read operation; the data bus can only operate in an output mode. o The 9-bit address lines in the ROM chip specify any one of the 512 bytes stored in it. o The value for chip select 1 and chip select 2 must be 1 and 0 for the unit to operate. Otherwise, the data bus is said to be in a high-impedance state.

a storage device that can be inserted or removed from the computer according to our requirements. We can easily remove them from the computer system while the computer system is running. Removable storage devices are portable so we can easily transfer data from one computer to another. Also, removable storage devices provide the fast data transfer rates associated with storage area networks (SANs). Types of Removable Storage:  Optical discs (like CDs, DVDs, Blu-ray discs, etc.)  Memory cards  Floppy disks  Magnetic tapes  Disk packs  Paper storage (like punched tapes, punched cards, etc.) Following are the commonly used secondary memory devices are:

1. Floppy Disk: A floppy disk consists of a magnetic disc in a square plastic case. It is used to store data and to transfer data from one device to another device. Floppy disks are available in two sizes (a) Size: 3.5 inches, the Storage capacity of 1.44 MB (b) Size: 5.25 inches, the Storage capacity of 1.2 MB. To use a floppy disk, our computer needs to have a floppy disk drive. This storage device becomes obsolete now and has been replaced by CDs, DVDs, and flash drives. 2. Compact Disc: A Compact Disc (CD) is a commonly used secondary storage device. It contains tracks and sectors on its surface. Its shape is circular and is made up of polycarbonate plastic. The storage capacity of CD is up to 700 MB of data. A CD may also be called a CD- ROM (Compact Disc Read-Only Memory), in this computers can read the data present in a CD- ROM, but cannot write new data onto it. For a CD-ROM, we require a CD-ROM. CD is of two types:  CD-R (compact disc recordable): Once the data has been written onto it cannot be erased, it can only be read.  CD-RW (compact disc rewritable): It is a special type of CD in which data can be erased and rewritten as many times as we want. It is also called an erasable CD. 3. Digital Versatile Disc: A Digital Versatile Disc also known as DVD it is looks just like a CD, but the storage capacity is greater compared to CD, it stores up to 4.7 GB of data. DVD-ROM drive is needed to use DVD on a computer. The video files, like movies or video recordings, etc., are generally stored on DVD and you can run DVD using the DVD player. DVD is of three types:  DVD-ROM(Digital Versatile Disc Readonly): In DVD-ROM the manufacturer writes the data in it and the user can only read that data, cannot write new data in it. For example movie DVD, movie DVD is already written by the manufacturer we can only watch the movie but we cannot write new data into it.  DVD-R(Digital Versatile Disc Recordable): In DVD-R you can write the data but only one time. Once the data has been written onto it cannot be erased, it can only be read.  DVD-RW(Digital Versatile Disc Rewritable and Erasable): It is a special type of DVD in which data can be erased and rewritten as many times as we want. It is also called an erasable DVD.

4. Blu-ray Disc: A Blu-ray disc looks just like a CD or a DVD but it can store data or information up to 25 GB data. If you want to use a Blu-ray disc, you need a Blu-ray reader. The name Blu-ray is derived from the technology that is used to read the disc ‘Blu’ from the blue- violet laser and ‘ray’ from an optical ray. 5. Hard Disk: A hard disk is a part of a unit called a hard disk drive. It is used to storing a large amount of data. Hard disks or hard disk drives come in different storage capacities.(like 256 GB, 500 GB, 1 TB, and 2 TB, etc.). It is created using the collection of discs known as platters. The platters are placed one below the other. They are coated with magnetic material. Each platter consists of a number of invisible circles and each circle having the same centre called tracks. Hard disk is of two types (i) Internal hard disk (ii) External hard disk. 6. Flash Drive: A flash drive or pen drive comes in various storage capacities, such as 1 GB, 2 GB, 4 GB, 8 GB, 16 GB, 32 GB, 64 GB, up to 1 TB. A flash drive is used to transfer and store data. To use a flash drive, we need to plug it into a USB port on a computer. As a flash drive is easy to use and compact in size, Nowadays it is very popular. 7. Solid-state disk: It is also known as SDD. It is a non-volatile storage device that is used to store and access data. It is faster, does noiseless operations(because it does not contain any moving parts like the hard disk), consumes less power, etc. It is a great replacement for standard hard drives in computers and laptops if the price is low and it is also suitable for tablets, notebooks, etc because they do not require large storage. 8. SD Card: It is known as a Secure Digital Card. It is generally used in portable devices like mobile phones, cameras, etc., to store data. It is available in different sizes like 1 GB, 2 GB, 4 GB, 8 GB, 16 GB, 32 GB, 64 GB, etc. To view the data stored in the SD card you can remove them from the device and insert them into a computer with help of a card reader. The data stores in the SD card is stored in memory chips(present in the SD Card) and it does not contain any moving parts like the hard disk. Advantages: 1. Large storage capacity: Secondary memory devices typically have a much larger storage capacity than primary memory, allowing users to store large amounts of data and programs. 2. Non-volatile storage: Data stored on secondary memory devices is typically non- volatile, meaning it can be retained even when the computer is turned off. 3. Portability: Many secondary memory devices are portable, making it easy to transfer data between computers or devices. 4. Cost-effective: Secondary memory devices are generally more cost-effective than primary memory. Disadvantages: 1. Slower access times: Accessing data from secondary memory devices typically takes longer than accessing data from primary memory.

Memory Hierarchy Design Memory Hierarchy Design

1. Registers Registers are small, high-speed memory units located in the CPU. They are used to store the most frequently used data and instructions. Registers have the fastest access time and the smallest storage capacity, typically ranging from 16 to 64 bits. In Computer Architecture, the Registers are very fast computer memory which are used to execute programs and operations efficiently. This does by giving access to commonly used values, i.e., the values which are in the point of operation/execution at that time. So, for this purpose, there are several different classes of CPU registers which works in coordination with the computer memory to run operations efficiently. The sole purpose of having register is fast retrieval of data for processing by CPU. Though accessing instructions from RAM is comparatively faster with hard drive, it still isn’t enough for CPU. For even better processing, there are memories in CPU which can get data from RAM which are about to be executed beforehand. After registers we have cache memory, which are faster but less faster than registers.

These are classified as given below.  Accumulator: This is the most frequently used register used to store data taken from memory. It is in different numbers in different microprocessors.  Memory Address Registers (MAR): It holds the address of the location to be accessed from memory. MAR and MDR (Memory Data Register) together facilitate the communication of the CPU and the main memory.  Memory Data Registers (MDR): It contains data to be written into or to be read out from the addressed location.  General Purpose Registers: These are numbered as R0, R1, R2….Rn-1, and used to store temporary data during any ongoing operation. Its content can be accessed by assembly programming. Modern CPU architectures tends to use more GPR so that register-to-register addressing can be used more, which is comparatively faster than other addressing modes.  Program Counter (PC): Program Counter (PC) is used to keep the track of execution of the program. It contains the memory address of the next instruction to be fetched. PC points to the address of the next instruction to be fetched from the main memory when the previous instruction has been successfully completed. Program Counter (PC) also functions to count the number of instructions. The incrementation of PC depends on the type of architecture being used. If we are using 32-bit architecture, the PC gets incremented by 4 every time to fetch the next instruction.  Instruction Register (IR): The IR holds the instruction which is just about to be executed. The instruction from PC is fetched and stored in IR. As soon as the instruction in placed in IR, the CPU starts executing the instruction and the PC points to the next instruction to be executed.  Condition code register ( CCR ) : Condition code registers contain different flags that indicate the status of any operation.for instance lets suppose an operation caused creation of a negative result or zero, then these flags are set high accordingly.and the flags are

  1. Carry C: Set to 1 if an add operation produces a carry or a subtract operation produces a borrow; otherwise cleared to 0.
  2. Overflow V: Useful only during operations on signed integers.
  3. Zero Z: Set to 1 if the result is 0, otherwise cleared to 0.
  4. Negate N: Meaningful only in signed number operations. Set to 1 if a negative result is produced.
  5. Extend X: Functions as a carry for multiple precision arithmetic operations. These are generally decided by ALU.

Whenever CPU needs any data it searches for corresponding data in the cache (fast process) if data is found, it processes the data according to instructions, however, if data is not found in the cache CPU search for that data in primary memory(slower process) and loads it into the cache. This ensures frequently accessed data are always found in the cache and hence minimizes the time required to access the data. Cache Performance  On searching in the cache if data is found, a cache hit has occurred.  On searching in the cache if data is not found, a cache miss has occurred. Performance of cache is measured by the number of cache hits to the number of searches. This parameter of measuring performance is known as the Hit Ratio. Hit ratio=(Number of cache hits)/(Number of searches) Types of Cache Memory L1 or Level 1 Cache: It is the first level of cache memory that is present inside the processor. It is present in a small amount inside every core of the processor separately. The size of this memory ranges from 2KB to 64 KB. L2 or Level 2 Cache: It is the second level of cache memory that may present inside or outside the CPU. If not present inside the core, It can be shared between two cores depending upon the architecture and is connected to a processor with the high-speed bus. The size of memory ranges from 256 KB to 512 KB. L3 or Level 3 Cache: It is the third level of cache memory that is present outside the CPU and is shared by all the cores of the CPU. Some high processors may have this cache. This cache is used to increase the performance of the L2 and L1 cache. The size of this memory ranges from 1 MB to 8MB. Cache vs RAM Although Cache and RAM both are used to increase the performance of the system there exists a lot of differences in which they operate to increase the efficiency of the system. RAM Cache RAM is larger in size compared to cache. Memory ranges from 1MB to 16GB The cache is smaller in size. Memory ranges from 2KB to a few MB generally. It stores data that is currently processed by the processor. It holds frequently accessed data. OS interacts with secondary memory to get data to be stored in Primary Memory or RAM OS interacts with primary memory to get data to be stored in Cache. It is ensured that data in RAM are loaded before access to the CPU. This eliminates RAM miss never. CPU searches for data in Cache, if not found cache miss occur.

3. Main Memory Main memory, also known as RAM (Random Access Memory), is the primary memory of a computer system. It has a larger storage capacity than cache memory, but it is slower. Main memory is used to store data and instructions that are currently in use by the CPU. Types of Main MemoryStatic RAM: Static RAM stores the binary information in flip flops and information remains valid until power is supplied. It has a faster access time and is used in implementing cache memory.  Dynamic RAM: It stores the binary information as a charge on the capacitor. It requires refreshing circuitry to maintain the charge on the capacitors after a few milliseconds. It contains more memory cells per unit area as compared to SRAM. 4. Secondary Storage Secondary storage, such as hard disk drives (HDD) and solid-state drives (SSD), is a non-volatile memory unit that has a larger storage capacity than main memory. It is used to store data and instructions that are not currently in use by the CPU. Secondary storage has the slowest access time and is typically the least expensive type of memory in the memory hierarchy. Hard Disk Drives(HDD) and Solid State Drives(SSD) both are data storage devices. Whereas HDDs are more traditional storage mechanisms, SSDs are newer and more sophisticated. The primary distinction between HDD and SSD is in how data is stored and accessed. Let’s look at the fundamental distinctions between HDD and SSD. What is a Hard Disk Drive(HDD)? An HDD consists of a spinning disk (platter) coated with a magnetic material and a read/write head that reads and writes data on the disk’s surface. The read/write head moves back and forth across the spinning disk to access different parts of the data stored on the disk. HDDs have been around for decades and are the more traditional type of storage device. Features of Hard Disk Drive (HDD)  High storage capacity: HDDs offer a high storage capacity, with some models capable of storing up to 16TB of data.  Lower cost: HDDs are generally less expensive than SSDs, making them a more cost- effective option for storing large amounts of data.  Larger size: HDDs are physically larger and heavier than SSDs, making them less suitable for portable devices.  Slower performance: HDDs are slower than SSDs when it comes to data access and transfer speeds.  Mechanical parts: HDDs contain mechanical details that can wear out over time, making them less durable than SSDs. What is Solid State Drive(SSD)? SSDs, on the other hand, use flash memory to store data instead of a spinning disk. SSDs have no moving parts, making them much faster, more durable, and less susceptible to mechanical failure than HDDs.

HDD SSD

HDD is less reliable due to possibility of mechanical failure, like head crash and susceptibility to strong magnets. SSD is more reliable. HDD is cheaper per unit storage. SSD is costlier per unit storage. HDD is older and more traditional. SSD is newer to use. HDD can produce noise due to mechanical movements. SSD does not produces noise. The availability of HDD in a variety of capacities. The availability of SSD is limited in terms of variety of storage capacities as compared to HDD. It is more likely to breakdown after more uses because of the magnetic platters and moving mechanical parts. It is less likely to breakdown as compared to HDD because of no moving parts. HDD drives are more established and traditional. A more recent kind of storage drive is an SSD. HDDs are more reliable for long-term storage. SSDs are comparatively less reliable for long- term storage due to data leaks that can occur if kept unpowered for more than a year. The data accessing speed is slower as compared to SSD. The data accessing speed is much higher as compared to HDD. HDD has fragmentation that’s why The performance suffers because of fragmentation. SSD does not have fragmentation. The performance does not suffer because of fragmentation. HDDs are suitable for  Extensive storage  Long-term storage SSDs are suitable for  Fast data retrieval  Laptop or desktop because of low power consumption and size.

5. Magnetic Disk Magnetic Disks are simply circular plates that are fabricated with either a metal or a plastic or a magnetized material. The Magnetic disks work at a high speed inside the computer and these are frequently used. A magnetic Disk is a type of secondary memory that is a flat disc covered with a magnetic coating to hold information. It is used to store various programs and files. The polarized information in one direction is represented by 1, and vice versa. The direction is indicated by 0. Magnetic disks are less expensive than RAM and can store large amounts of data, but the data access rate is slower than main memory because of secondary memory. Data can be modified or can be deleted easily in the magnetic disk memory. It also allows random access to data. Figure – Magnetic Disk There are various advantages and disadvantages of magnetic disk memory. Advantages:- 1.These are economical memory

  1. Easy and direct access to data is possible.
  2. It can store large amounts of data.
  3. It has a better data transfer rate than magnetic tapes.
  4. It has less prone to corruption of data as compared to tapes. Disadvantages:-
  5. These are less expensive than RAM but more expensive than magnetic tape memories.
  6. It needs a clean and dust-free environment to store.
  7. These are not suitable for sequential access.

Characteristics of Memory HierarchyCapacity: It is the global volume of information the memory can store. As we move from top to bottom in the Hierarchy, the capacity increases.  Access Time: It is the time interval between the read/write request and the availability of the data. As we move from top to bottom in the Hierarchy, the access time increases.  Performance: Earlier when the computer system was designed without a Memory Hierarchy design, the speed gap increased between the CPU registers and Main Memory due to a large difference in access time. This results in lower performance of the system and thus, enhancement was required. This enhancement was made in the form of Memory Hierarchy Design because of which the performance of the system increases. One of the most significant ways to increase system performance is minimizing how far down the memory hierarchy one has to go to manipulate data.  Cost Per Bit: As we move from bottom to top in the Hierarchy, the cost per bit increases i.e. Internal Memory is costlier than External Memory. Advantages of Memory Hierarchy  It helps in removing some destruction, and managing the memory in a better way.  It helps in spreading the data all over the computer system.  It saves the consumer’s price and time. System-Supported Memory Standards According to the memory Hierarchy, the system-supported memory standards are defined below: Level 1 2 3 4 Name Register Cache Main Memory Secondary Memory Size <1 KB less than 16 MB

<16GB >100 GB

Implementation Multi-ports On-chip/ SRAM DRAM (capacitor memory) Magnetic Access Time 0.25ns to 0.5ns 0.5 to 25ns 80ns to 250ns 50 lakh ns Bandwidth 20000 to 1 lakh MB 5000 to 15000 1000 to 5000 20 to 150 Managed by Compiler Hardware Operating System Operating System Backing Mechanism From cache from Main Memory from Secondary Memory from End User

Virtual memory:

Virtual Memory (VM) Concept is similar to the Concept of Cache Memory. While Cache solves the speed up requirements in memory access by CPU, Virtual Memory solves the Main Memory (MM) Capacity requirements with a mapping association to Secondary Memory i.e Hard Disk. Both Cache and Virtual Memory are based on the Principle of Locality of Reference. Virtual Memory provides an illusion of unlimited memory being available to the Processes/ Programmers. In a VM implementation, a process looks at the resources with a logical view and the CPU looks at it from a Physical or real view of resources. Every program or process begins with its starting address as ‘0’ ( Logical view). However, there is only one real '0' address in Main Memory. Further, at any instant, many processes reside in Main Memory (Physical view). A Memory Management Hardware provides the mapping between logical and physical view. VM is hardware implementation and assisted by OS’s Memory Management Task. The basic facts of VM are:  All memory references by a process are all logical and dynamically translated by hardware into physical.  There is no need for the whole program code or data to be present in Physical memory and neither the data or program need to be present in contiguous locations of Physical Main Memory. Similarly, every process may also be broken up into pieces and loaded as necessitated.  The storage in secondary memory need not be contiguous. (Remember your single file may be stored in different sectors of the disk, which you may observe while doing defrag).  However, the Logical view is contiguous. Rest of the views are transparent to the user. Figure Storage views