INTRODUCTION TO COMPUTER MEMORY
INTRODUCTION TO COMPUTER MEMORY
DEFINITION:- Computer memory is any physical device capable of storing information temporarily like RAM (random access memory), or permanently, like ROM (read-only memory).
Memory devices utilize integrated circuits and are used by operating systems, software, and hardware.
Memory unit is the amount of data that can be stored in the storage unit. This storage capacity is expressed in terms of Bytes.
In computing, memory refers to the computer hardware integrated circuits that store information for immediate use in a computer; it is synonymous with the term "primary storage". Computer memory operates at a high speed, for example random-access memory (RAM), as a distinction from storage that provides slow-to-access information but offers higher capacities.
Enroll in our Interactive C Programming Course for FREE.
If required contents of the computer memory can be transferred to secondary storage; a very common way of doing this is through a memory management technique called "virtual memory". An archaic synonym for memory is store. Register is a very fast computer memory, used to store data/instruction in-execution.
What is Register:-
Register:- Definition:-A Register is a group of flip-flops with each flip-flop capable of storing one bit of information. An n-bit register has a group of n flip-flops and is capable of storing binary information of n-bits.
A register consists of a group of flip-flops and gates. The flip-flops hold the binary information and gates control when and how new information is transferred into a register. Various types of registers are available commercially. The simplest register is one that consists of only flip-flops with no external gates.
These days registers are also implemented as a register file.
Following are some commonly used registers types:
Accumulator: This is the most common register, used to store data taken out from the memory.
General Purpose Registers: This is used to store data intermediate results during program execution. It can be accessed via assembly programming.
Special Purpose
Registers: Users do not access these registers. These registers are for Computer system
Memory Address Register (MAR): Memory Address Register are those registers that holds the address for memory unit.
Memory Buffer Register ( MBR): Memory Buffer Register stores instruction and data received from the memory and sent from the memory.
Program Counter (PC) : Program Counter points to the next instruction to be executed.
Instruction Register (IR) : Instruction Register holds the instruction to be executed.
The term "memory", meaning "primary storage" or "main memory", is often associated with addressable semiconductor memory, i.e. integrated circuits consisting of silicon-based MOS transistors, used for example as primary storage but also other purposes in computers and other digital electronic devices.
There are two main kinds of semiconductor memory, volatile and non-volatile.
The following keywords explains the main memory storage units − 1. Bit (Binary Digit):- A binary digit is logical 0 and 1 representing a passive or an active state of a component in an electric circuit.
2. Nibble:-A group of 4 bits is called nibble.
3. Byte:-A group of 8 bits is called byte. A byte is the smallest unit, which can represent a data item or a character.
4. Word:- A computer word, like a byte, is a group of fixed number of bits processed as a unit, which varies from computer to computer but is fixed for each computer. The length of a computer word is called word-size or word length. It may be as small as 8 bits or may be as long as 96 bits. A computer stores the information in the form of computer words.
1. Bit:- The computer memory units start from bit. A bit is the smallest memory unit to measure data stored in main memory and storage devices. A bit can have only one binary value out of 0 and 1. 2. Byte:- It is the fundamental unit to measure data. It contains 8 bits or is equal to 8 bits. Thus a byte can represent 2*8 or 256 values.
3. Kilobyte:- A kilobyte contains 1024 bytes. 4. Megabyte:- A megabyte contains 1024 kilobytes. 5. Gigabyte:- A gigabyte contains 1024 megabyte. 6. Terabyte:- A terabyte contains 1024 gigabytes.
Types
of memory:-
There are two types of memory –
1. Primary Memory or Internal Memory or Main Memory
2. Secondary Memory or External memory or Auxiliary Memory
• 1. Primary Memory or Internal Memory or
Main Memory:-Primary memory holds only those data and instructions on which
the computer is currently working. It has a limited capacity and data is lost
when power is switched off. It is generally made up of semiconductor device.
These memories are not as fast as registers. The data and instruction required
to be processed resides in the main memory.
1. Random Access Memory (RAM):-
Random Access Memory is volatile. That means data is
retained in RAM as long as the computer is on, but it is lost when the computer
is turned off. When the computer is rebooted, the OS and other files are
reloaded into RAM, usually from an HDD or SSD.
The primary storage is referred to as random access memory
(RAM) due to the random selection of memory locations. It performs both read
and writes operations on memory. If power failures happened in systems during
memory access then you will lose your data permanently. So, RAM is volatile
memory.
A computer also works this way. If RAM fills up, the
computer's processor must repeatedly go to the hard disk to overlay the old
data in RAM with new data. This process slows the computer's operation.
RAM categorized into following types.
1. S-RAM
2. D- RAM
1. Static RAM (SRAM):-
The word static indicates that the memory retains
its contents as long as power is being supplied. However, data is lost when the
power gets down due to volatile nature. SRAM chips use a matrix of
6-transistors and no capacitors. Transistors do not require power to prevent
leakage, so SRAM need not be refreshed on a regular basis.
There is extra space in the matrix; hence SRAM uses more
chips than DRAM for the same amount of storage space, making the manufacturing
costs higher. SRAM is thus used as cache memory and has very fast access.
Memory unit is the amount of data that can be stored in the storage unit. This storage capacity is expressed in terms of Bytes. In computing, memory refers to the computer hardware integrated circuits that store information for immediate use in a computer; it is synonymous with the term "primary storage". Computer memory operates at a high speed, for example random-access memory (RAM), as a distinction from storage that provides slow-to-access information but offers higher capacities.
Types of memory:-
There are two types of memory –
1. Primary Memory or Internal Memory or Main Memory
2. Secondary Memory or External memory or Auxiliary Memory
1. Random Access Memory (RAM):-
Random Access Memory is volatile. That means data is retained in RAM as long as the computer is on, but it is lost when the computer is turned off. When the computer is rebooted, the OS and other files are reloaded into RAM, usually from an HDD or SSD.
The primary storage is referred to as random access memory (RAM) due to the random selection of memory locations. It performs both read and writes operations on memory. If power failures happened in systems during memory access then you will lose your data permanently. So, RAM is volatile memory.
A computer also works this way. If RAM fills up, the computer's processor must repeatedly go to the hard disk to overlay the old data in RAM with new data. This process slows the computer's operation.
RAM categorized into following types.
1. S-RAM
2. D- RAM
1. Static RAM (SRAM):-
The word static indicates that the memory retains its contents as long as power is being supplied. However, data is lost when the power gets down due to volatile nature. SRAM chips use a matrix of 6-transistors and no capacitors. Transistors do not require power to prevent leakage, so SRAM need not be refreshed on a regular basis.
There is extra space in the matrix; hence SRAM uses more chips than DRAM for the same amount of storage space, making the manufacturing costs higher. SRAM is thus used as cache memory and has very fast access.
While DRAM is typically used for main memory, today SRAM is
more often used for system cache. SRAM is said to be static because it doesn't
need to be refreshed, unlike dynamic RAM, which needs to be refreshed thousands
of times per second. As a result, SRAM is faster than DRAM. However, both types
of RAM are volatile, meaning that they lose their contents when the power
is turned off.
While DRAM is typically used for main memory, today SRAM is more often used for system cache. SRAM is said to be static because it doesn't need to be refreshed, unlike dynamic RAM, which needs to be refreshed thousands of times per second. As a result, SRAM is faster than DRAM. However, both types of RAM are volatile, meaning that they lose their contents when the power is turned off.
2. DRAM (Dynamic Random Access Memory): – DRAM, unlike
SRAM, must be continually refreshed in order to maintain the data.
This is done by placing the memory on a refresh circuit that rewrites the data
several hundred times per second. DRAM is used for most system memory as it is
cheap and small. All DRAMs are made up of memory cells, which are composed of
one capacitor and one transistor.
The term dynamic indicates that the memory must be
constantly refreshed or it will lose its contents. DRAM is typically used
for the main memory in computing devices. If a PC or Smartphone is advertised
as having 4-GB RAM or 16-GB RAM, those numbers refer to the DRAM, or main
memory, in the device.
Types of DRAM:
Synchronous DRAM (SDRAM) “synchronizes” the memory speed with CPU clock speed so that the memory controller knows the exact clock cycle when the requested data will be ready. This allows the CPU to perform more instructions at a given time. Typical SDRAM transfers data at speeds up to 133 MHz.
Rambus DRAM (RDRAM) takes its name after the company that made it, Rambus. It was popular in the early 2000s and was mainly used for video game devices and graphics cards, with transfer speeds up to 1 GHz.
Double Data Rate SDRAM (DDR SDRAM) is a type of synchronous memory that nearly doubles the bandwidth of a single data rate (SDR) SDRAM running at the same clock frequency by employing a method called "double pumping," which allows transfer of data on both the rising and falling edges of the clock signal without any increase in clock frequency.
2. Read Only Memory (ROM):-
ROM is permanent memory location that offers huge types of
standards to save data. But it work with read only operation. No data lose
happen whenever power failure occurs during the ROM memory work in computers.
ROM memory has several models such names are following.1. PROM
2. EPROM
3. EEPROM
1. PROM (Programmable Read-Only Memory):- It can be
programmed by user. Once programmed, the data and instructions in it cannot be
changed. PROM maintains large storage media but can’t offer the erase features
in ROM. PROM is read-only memory that can be modified only once by a user. The
user buys a blank PROM and enters the desired contents using a PROM program
This type of ROM maintains PROM chips to write data once and
read many. The programs or instructions designed in PROM can’t be erased by
other programs.
2. EPROM (Erasable Programmable Read-Only Memory):- It
can be reprogrammed. To erase data from it, expose it to ultra violet light.
EPROM can be erased by exposing it to ultra-violet light for duration of up to
40 minutes. Usually, an EPROM eraser achieves this functions reprogram it,
erase all the previous data. Erasable Programmable Read Only Memory designed
for recover the problems of PROM and ROM. Users can delete the data of EPROM
thorough pass on ultraviolet light and it erases chip is reprogrammed.
3. EEPROM (Electrically Erasable Programmable Read-Only
Memory):-The data can be erased by applying electric field, no need of ultra
violet light. We can erase only portions of the chip. EEPROM is programmed and
erased electrically. It can be erased and reprogrammed about ten thousand
times. Both erasing and programming take about 4 to 10 ms (millisecond).
Electrically Erasable Programmable Read Only Memory similar
to the EPROM but it uses electrical beam for erase the data of ROM.
Secondary Memory:
This type of memory is also known as external memory or
non-volatile. It is slower than the main memory. These are used for storing
data/information permanently. CPU directly does not access these memories;
instead they are accessed via input-output routines. The contents of secondary
memories are first transferred to the main memory, and then the CPU can access
it. For example, disk, CD-ROM, DVD, etc.
Secondary Memory is permanent storage memory on the
computer. It is non-volatile in nature means that its content will not lost
after switching off the electricity. The hard disk is a secondary storage
device in the computer. It is available in many sizes like in MB, GB, TB, etc.
The structure-hard disk is a hardware device having a
cylinder, platters, track, sector, read-write head. Usually, the hard drive is
a combination of drive known as platters connected to the spindle. Each platter
has two surfaces. We can write and read data on both sides of platters. The arm
is holding the read-write head for both sides of platters. Counting of
read-write head depends upon the number of platters.
Characteristics of Secondary Memory:-
These are magnetic and optical memories.
1. 1. It is known as the backup memory.
2. 2. It is a non-volatile memory.
3. 3. Data is permanently stored even if power is switched off.
4. 4. It is used for storage of data in a computer.
5. 5. Computer may run without the secondary memory.
6. 6. Slower than primary memories.
Structure of Storage Drive
2. Sector:- Tracks divided into some
portions known as a sector. Number of Sector depended upon the manufacturer.
The sector is used to store data and access the data. Sector has three
parts-Header, Data, and Trailer.
3. Header:- Header contains the
information to identify the sector.
4. Trailer:- Trailer contains the
information to correct the error regarding to stored data in the sector.
5. Cylinder:- Cylinder set of tracks,
one from each platter that is the equal vertically distance from disk arm. A
number of cylinders depending upon the number of track per surface. Suppose, if
a hard disk has six platters. Each platter has ten tracks than disk exactly has
ten cylinders.
6. Disk Capacity:- To find out the disk
capacity we should know about the number of cylinders, tracks per cylinder,
sector per track and data bytes stored on sector.
7. Seek time:- Time taken by disk
arm to move the head on the desired cylinder is known as seek time.
8. Rotational Latency:- Time taken by
disk arm to move on the desired sector on the cylinder is known as rotational latency.
9. Transfer rate:- Transfer rate defined
as the rate at which data flow between the drive and the computer.
The operating system used many disks
scheduling an algorithm to serve the process’s pending request for accessing
the disk-like FCFS Scheduling, SSTF Scheduling, SCAN Scheduling, C-SCAN
Scheduling, LOOK Scheduling, etc.
Types of secondary Memory :-
There are:
1. Magnetic Disk2. Floppy Disk3. Hard Disk4. Optical Disks
1. Magnetic Disk:-The Magnetic Disk is Flat, circular platter with metallic coating that is
rotated beneath read/write heads. It is a Random access device; read/write head
can be moved to any location on the platter
2. Floppy Disk:-These are small removable disks that are plastic coated with magnetic recording
material. Floppy disks are typically 3.5″ in size (diameter) and can hold 1.44
MB of data. This portable storage device is a rewritable media and can be
reused a number of times. Floppy disks are commonly used to move files between
different computers. The main disadvantage of floppy disks is that they can be
damaged easily and, therefore, are not very reliable. The following figure
shows an example of the floppy disk. Figure 3 shows a picture of the floppy
disk.
3. Hard Disk:-Another form of auxiliary storage is a hard disk. A hard disk consists of one
or more rigid metal plates coated with a metal oxide material that allows data
to be magnetically recorded on the surface of the platters. The hard disk
platters spin at 5 a high rate of speed, typically 5400 to 7200 revolutions per
minute (RPM).Storage capacities of hard disks for personal computers range from
10 GB to 120 GB (one billion bytes are called a gigabyte).4. Optical Disks:-Optical Mass Storage Devices Store bit values as variations in light
reflection. They have higher area density & longer data life than magnetic
storage. They are also standardized and relatively inexpensive. Their Uses: read-only
storage with low performance requirements, applications with high capacity
requirements & where portability in a standardized format is needed.
Types of Optical Disk:-There are 4 types 1. CD-ROM (read only)2. CD-R: (record) to a CD3. CD-RW: can write and erase CD to reuse it (re-writable)4. DVD (Digital Video Disk)
Cache Memory:-
A Cache (Pronounced as “cash”) is
a small and very fast temporary storage memory. It is designed to speed up the
transfer of data and instructions. It is located inside or close to the CPU
chip. It is faster than RAM and the data/instructions that are most recently or
most frequently used by CPU are stored in cache.
The data and instructions are retrieved
from RAM when CPU uses them for the first time. A copy of that data or
instructions is stored in cache. The next time the CPU needs that data or
instructions, it first looks in cache. If the required data is found there, it
is retrieved from cache memory instead of main memory. It speeds up the working
of CPU.
Or
Cache definition : The Cache
Memory (Pronounced as "cash") is the
volatile computer memory which is very nearest to the CPU so also
called CPU memory, all the Recent Instructions are Stored into the
Cache Memory. It is the fastest memory that provides high-speed data access to
a computer microprocessor. Cache meaning is that it is used for storing
the input which is given by the user and which is necessary for the computer
microprocessor to perform a Task. But the Capacity of the Cache Memory is too
low in compare to Memory (random access memory (RAM)) and Hard Disk.
Importance of Cache memory
The cache memory lies in the path between the processor and
the memory. The cache memory therefore, has lesser access time than memory and
is faster than the main memory. A cache memory has an access time of 100ns,
while the main memory may have an access time of 700ns.
The cache memory is very expensive and hence is limited in
capacity. Earlier cache memories were available separately but the
microprocessors contain the cache memory on the chip itself.
The need for the cache memory is due to the mismatch between
the speeds of the main memory and the CPU. The CPU clock is very fast, whereas
the main memory access time is comparatively slower.
Types/Levels of Cache Memory:-
A computer can have several different levels of
cache memory. The level numbers refers to distance from CPU where Level 1 is
the closest. All levels of cache memory are faster than RAM. The cache closest
to CPU is always faster but generally costs more and stores less data then
other level of cache.
There are three types of Cache memory
1. Level 1 (L1) cache or Primary Cache:-
L1 is the primary type cache memory. The Size of the L1
cache very small comparison to others that is between 2KB to 64KB, it depends
on computer processor. It is an embedded register in the computer microprocessor
(CPU).The Instructions that are required by the CPU that are firstly
searched in L1 Cache. Example of registers is accumulator, address
register, Program counter etc.
2. Level 2 (L2) cache or Secondary Cache:-
L2 is secondary type cache memory. The Size of the L2 cache
is more capacious than L1 that is between 256KB to 512KB.L2 cache is Located on
computer microprocessor. After searching the Instructions in L1 Cache, if not
found then it searched into L2 cache by computer microprocessor. The high-speed
system bus interconnecting the cache to the microprocessor.
3. Level 3 (L3) cache or Main Memory:-
The L3 cache is larger in size but also slower in speed than
L1 and L2,it's size is between 1MB to 8MB.In Multi core processors, each core
may have separate L1 and L2,but all core share a common L3 cache. L3 cache
double speed than the RAM.
Flash Memory:-
Flash memory is an electronic non-volatile computer storage
medium that can be electrically erased and reprogrammed. Toshiba developed
flash memory from EEPROM in the early 1980s, and then commercially introduced
it to the market in 1987. The two main types of flash memory are named after
the NAND and NOR logic gates.
Definition: Flash memory (Known as Flash Storage)
is a type of non-volatile storage memory that can be written or programmed in
units called “Sector” or a “Block.” Flash Memory is EEPROM (Electronically
Erasable Programmable Read-Only Memory) means that it can retain its
contents when the power supply removed, but whose contents can
be quickly erased and rewritten at the byte level by applying a short
pulse of higher voltage. This is called flash erasure, hence the name. Flash
memory is currently both too expensive and too slow to serve as main memory.
Flash memory (sometimes called "Flash RAM") is a
distinct EEPROM that can read block-wise. Typically the sizes of
the block can be from hundreds to thousands of bits. Flash Storage
block can be divided into at least two logical sub-blocks.
Flash memory mostly used in consumer storage devices,
and for networking technology. It commonly found in mobile phones, USB
flash drives, tablet computers, and embedded controllers.
Flash memory is often used to hold control code such as the
basic input/output system in a personal computer. When BIOS needs to be
changed (rewritten), the flash memory can be written to in block (rather than
byte) sizes, making it easy to update. On the other hand, flash memory is
not used as random access memory (RAM) because RAM needs to be addressable
at the byte level.
Flash memories are based on Floating-Gate
Transistors. Floating gate transistors are used in memory to store
a bit of information. Flash memories are used in
the device to store a large number of songs, images, files,
software, and video for an extended period, etc.
Types of Flash
Memory:-
Flash memory is available in two kinds NAND Flash
and NOR Flash Memory. NAND and NOR flash memory both have different
architecture and used for specific purpose.
1. NAND Flash Memory:-
In today is an environment where all devices
require high data density, faster speed access
and cost-effective chip for data storage. NAND memory
has needed less chip area hence more data density. NAND Memory used
the concept of the block to access and erases the data. Each
block contains the different size of pages various from bytes. MMU
(Memory Management Unit) helps NAND to the first page the content or
copied into RAM and then executed.
2. NOR Flash Memory:-
In the circuit of flash memory, memory
cells are connected in parallel. It provides random or
sequentially access memory. Data Reading process for NOR and RAM are
similar. We can execute the code neither directly from NOR without copying into
RAM. NOR memory ideal for runs small code instructions program. It
referred to Code-storage applications.
It used for low-density applications.
2. DRAM (Dynamic Random Access Memory): – DRAM, unlike SRAM, must be continually refreshed in order to maintain the data. This is done by placing the memory on a refresh circuit that rewrites the data several hundred times per second. DRAM is used for most system memory as it is cheap and small. All DRAMs are made up of memory cells, which are composed of one capacitor and one transistor.
The term dynamic indicates that the memory must be constantly refreshed or it will lose its contents. DRAM is typically used for the main memory in computing devices. If a PC or Smartphone is advertised as having 4-GB RAM or 16-GB RAM, those numbers refer to the DRAM, or main memory, in the device.
Types of DRAM:
Synchronous DRAM (SDRAM) “synchronizes” the memory speed with CPU clock speed so that the memory controller knows the exact clock cycle when the requested data will be ready. This allows the CPU to perform more instructions at a given time. Typical SDRAM transfers data at speeds up to 133 MHz.
Rambus DRAM (RDRAM) takes its name after the company that made it, Rambus. It was popular in the early 2000s and was mainly used for video game devices and graphics cards, with transfer speeds up to 1 GHz.
Double Data Rate SDRAM (DDR SDRAM) is a type of synchronous memory that nearly doubles the bandwidth of a single data rate (SDR) SDRAM running at the same clock frequency by employing a method called "double pumping," which allows transfer of data on both the rising and falling edges of the clock signal without any increase in clock frequency.
2. Read Only Memory (ROM):-
ROM is permanent memory location that offers huge types of standards to save data. But it work with read only operation. No data lose happen whenever power failure occurs during the ROM memory work in computers.
ROM memory has several models such names are following.
1. PROM
2. EPROM
3. EEPROM
1. PROM (Programmable Read-Only Memory):- It can be programmed by user. Once programmed, the data and instructions in it cannot be changed. PROM maintains large storage media but can’t offer the erase features in ROM. PROM is read-only memory that can be modified only once by a user. The user buys a blank PROM and enters the desired contents using a PROM program
This type of ROM maintains PROM chips to write data once and read many. The programs or instructions designed in PROM can’t be erased by other programs.
2. EPROM (Erasable Programmable Read-Only Memory):- It can be reprogrammed. To erase data from it, expose it to ultra violet light. EPROM can be erased by exposing it to ultra-violet light for duration of up to 40 minutes. Usually, an EPROM eraser achieves this functions reprogram it, erase all the previous data. Erasable Programmable Read Only Memory designed for recover the problems of PROM and ROM. Users can delete the data of EPROM thorough pass on ultraviolet light and it erases chip is reprogrammed.
3. EEPROM (Electrically Erasable Programmable Read-Only Memory):-The data can be erased by applying electric field, no need of ultra violet light. We can erase only portions of the chip. EEPROM is programmed and erased electrically. It can be erased and reprogrammed about ten thousand times. Both erasing and programming take about 4 to 10 ms (millisecond).
Electrically Erasable Programmable Read Only Memory similar to the EPROM but it uses electrical beam for erase the data of ROM.
Secondary Memory:
This type of memory is also known as external memory or non-volatile. It is slower than the main memory. These are used for storing data/information permanently. CPU directly does not access these memories; instead they are accessed via input-output routines. The contents of secondary memories are first transferred to the main memory, and then the CPU can access it. For example, disk, CD-ROM, DVD, etc.
Secondary Memory is permanent storage memory on the computer. It is non-volatile in nature means that its content will not lost after switching off the electricity. The hard disk is a secondary storage device in the computer. It is available in many sizes like in MB, GB, TB, etc.
The structure-hard disk is a hardware device having a cylinder, platters, track, sector, read-write head. Usually, the hard drive is a combination of drive known as platters connected to the spindle. Each platter has two surfaces. We can write and read data on both sides of platters. The arm is holding the read-write head for both sides of platters. Counting of read-write head depends upon the number of platters.
Characteristics of Secondary Memory:-
These are magnetic and optical memories.
1. 1. It is known as the backup memory.
2. 2. It is a non-volatile memory.
3. 3. Data is permanently stored even if power is switched off.
4. 4. It is used for storage of data in a computer.
5. 5. Computer may run without the secondary memory.
6. 6. Slower than primary memories.
Structure of Storage Drive
2. Sector:- Tracks divided into some portions known as a sector. Number of Sector depended upon the manufacturer. The sector is used to store data and access the data. Sector has three parts-Header, Data, and Trailer.
3. Header:- Header contains the information to identify the sector.
4. Trailer:- Trailer contains the information to correct the error regarding to stored data in the sector.
5. Cylinder:- Cylinder set of tracks, one from each platter that is the equal vertically distance from disk arm. A number of cylinders depending upon the number of track per surface. Suppose, if a hard disk has six platters. Each platter has ten tracks than disk exactly has ten cylinders.
6. Disk Capacity:- To find out the disk capacity we should know about the number of cylinders, tracks per cylinder, sector per track and data bytes stored on sector.
7. Seek time:- Time taken by disk arm to move the head on the desired cylinder is known as seek time.
8. Rotational Latency:- Time taken by disk arm to move on the desired sector on the cylinder is known as rotational latency.
9. Transfer rate:- Transfer rate defined as the rate at which data flow between the drive and the computer.
The operating system used many disks scheduling an algorithm to serve the process’s pending request for accessing the disk-like FCFS Scheduling, SSTF Scheduling, SCAN Scheduling, C-SCAN Scheduling, LOOK Scheduling, etc.
Types of secondary Memory :-
Cache Memory:-
A Cache (Pronounced as “cash”) is a small and very fast temporary storage memory. It is designed to speed up the transfer of data and instructions. It is located inside or close to the CPU chip. It is faster than RAM and the data/instructions that are most recently or most frequently used by CPU are stored in cache.
The data and instructions are retrieved from RAM when CPU uses them for the first time. A copy of that data or instructions is stored in cache. The next time the CPU needs that data or instructions, it first looks in cache. If the required data is found there, it is retrieved from cache memory instead of main memory. It speeds up the working of CPU.
Or
Cache definition : The Cache Memory (Pronounced as "cash") is the volatile computer memory which is very nearest to the CPU so also called CPU memory, all the Recent Instructions are Stored into the Cache Memory. It is the fastest memory that provides high-speed data access to a computer microprocessor. Cache meaning is that it is used for storing the input which is given by the user and which is necessary for the computer microprocessor to perform a Task. But the Capacity of the Cache Memory is too low in compare to Memory (random access memory (RAM)) and Hard Disk.
The cache memory lies in the path between the processor and the memory. The cache memory therefore, has lesser access time than memory and is faster than the main memory. A cache memory has an access time of 100ns, while the main memory may have an access time of 700ns.
The cache memory is very expensive and hence is limited in capacity. Earlier cache memories were available separately but the microprocessors contain the cache memory on the chip itself.
The need for the cache memory is due to the mismatch between the speeds of the main memory and the CPU. The CPU clock is very fast, whereas the main memory access time is comparatively slower.
Types/Levels of Cache Memory:-
A computer can have several different levels of cache memory. The level numbers refers to distance from CPU where Level 1 is the closest. All levels of cache memory are faster than RAM. The cache closest to CPU is always faster but generally costs more and stores less data then other level of cache.
There are three types of Cache memory
1. Level 1 (L1) cache or Primary Cache:-
L1 is the primary type cache memory. The Size of the L1 cache very small comparison to others that is between 2KB to 64KB, it depends on computer processor. It is an embedded register in the computer microprocessor (CPU).The Instructions that are required by the CPU that are firstly searched in L1 Cache. Example of registers is accumulator, address register, Program counter etc.
2. Level 2 (L2) cache or Secondary Cache:-
L2 is secondary type cache memory. The Size of the L2 cache is more capacious than L1 that is between 256KB to 512KB.L2 cache is Located on computer microprocessor. After searching the Instructions in L1 Cache, if not found then it searched into L2 cache by computer microprocessor. The high-speed system bus interconnecting the cache to the microprocessor.
3. Level 3 (L3) cache or Main Memory:-
The L3 cache is larger in size but also slower in speed than L1 and L2,it's size is between 1MB to 8MB.In Multi core processors, each core may have separate L1 and L2,but all core share a common L3 cache. L3 cache double speed than the RAM.
Flash Memory:-
Flash memory is an electronic non-volatile computer storage medium that can be electrically erased and reprogrammed. Toshiba developed flash memory from EEPROM in the early 1980s, and then commercially introduced it to the market in 1987. The two main types of flash memory are named after the NAND and NOR logic gates.
Definition: Flash memory (Known as Flash Storage) is a type of non-volatile storage memory that can be written or programmed in units called “Sector” or a “Block.” Flash Memory is EEPROM (Electronically Erasable Programmable Read-Only Memory) means that it can retain its contents when the power supply removed, but whose contents can be quickly erased and rewritten at the byte level by applying a short pulse of higher voltage. This is called flash erasure, hence the name. Flash memory is currently both too expensive and too slow to serve as main memory.
Flash memory (sometimes called "Flash RAM") is a distinct EEPROM that can read block-wise. Typically the sizes of the block can be from hundreds to thousands of bits. Flash Storage block can be divided into at least two logical sub-blocks.
Flash memory mostly used in consumer storage devices, and for networking technology. It commonly found in mobile phones, USB flash drives, tablet computers, and embedded controllers.
Flash memory is often used to hold control code such as the basic input/output system in a personal computer. When BIOS needs to be changed (rewritten), the flash memory can be written to in block (rather than byte) sizes, making it easy to update. On the other hand, flash memory is not used as random access memory (RAM) because RAM needs to be addressable at the byte level.
Flash memories are based on Floating-Gate Transistors. Floating gate transistors are used in memory to store a bit of information. Flash memories are used in the device to store a large number of songs, images, files, software, and video for an extended period, etc.
Types of Flash Memory:-
Flash memory is available in two kinds NAND Flash and NOR Flash Memory. NAND and NOR flash memory both have different architecture and used for specific purpose.
1. NAND Flash Memory:-
In today is an environment where all devices require high data density, faster speed access and cost-effective chip for data storage. NAND memory has needed less chip area hence more data density. NAND Memory used the concept of the block to access and erases the data. Each block contains the different size of pages various from bytes. MMU (Memory Management Unit) helps NAND to the first page the content or copied into RAM and then executed.
2. NOR Flash Memory:-
In the circuit of flash memory, memory cells are connected in parallel. It provides random or sequentially access memory. Data Reading process for NOR and RAM are similar. We can execute the code neither directly from NOR without copying into RAM. NOR memory ideal for runs small code instructions program. It referred to Code-storage applications. It used for low-density applications.
Comments
Post a Comment