Uci 101 Lec 4
Uci 101 Lec 4
• Registers
• Buffers
• Cache Memory
• Primary Memory/Main Memory
• Secondary Memory
REGISTERS
• It is used to hold those parts of data and program which are most
frequently used by CPU.
• The parts of data and programs are transferred from main memory to
cache memory by operating system, from where CPU can access
them.
characteristics of cache memory
• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.
• It stores the program that can be executed within a short period of
time.
• It stores data for temporary use
Buffers
• Memories located either in output devices such as printers or input
devices
• They are used to enhance the performance of the CPU
Primary memory/main memory
• Primary memory holds only those data and instructions on which
computer is currently working.
• It has limited capacity and data gets 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 instructions required to be processed earlier reside in
main memory.
• It is divided into two subcategories RAM and ROM.
Random access memory (RAM)
• Also called working memory.
• Used to hold data and instructions needed by currently running
applications
• Information in RAM can be read, written and replaced.
• Contents in RAM are stored temporarily i.e. contents are lost when the
computer is put off
Characteristics of RAM
• Its content is user defined i.e. the users are the ones who decide what
to be contained in RAM
• Faster than secondary memories.
• Relatively expensive than secondary memories
Types of RAM
• There are two main types of RAM:
• Static RAM
• Dynamic RAM
Static RAM
• Is a fast(high speed) type of RAM.
• Mostly located inside a microprocessor.
• Expensive than dynamic RAM
• Doesn’t require refreshing as long as power is on
• Used as cache memory
• Large size
• Expensive
• High power consumption
Dynamic RAM
• Relatively slower and cheaper than static RAM
• It needs to be refreshed continuously even if power is on hence the
name dynamic.
• Smaller in size
• Less expensive
• Less power consumption
Read only memory (ROM)
• Stores data and instructions permanently.
• Kind of data and instructions stored include; POST instructions,
Booting files necessary for start up process
Types of ROM
1. Mask Read Only Memory: once information is written on the device
by the manufacturer, it can not be edited or changed
2. Programmable Read Only Memory: allows the user to alter or
change it only once after the content is written on it.
3. Erasable Programmable Read Only Memory(EPROM). Allows the
user to alter its contents many times. Contents can be erased using
ultra violet light and new contents written
4. Electrically Erasable Programmable Read Only Memory (EEPROM).
This type of ROM can be erased and reprogrammed using
electricity
Advantages of ROM
• Non-volatile in nature
• These cannot be accidentally changed
• Cheaper than RAMs
• Easy to test
• More Reliable than RAMs
• These are static and do not require refreshing
Memory capacity
• This is the amount of data a storage device can hold or store and is
measured in bytes.
• A byte is a unit of storage equivalent to a single character or a group of
eight bits.
• A character can be alphabetic letters, space, special symbols,
numbers(0-9) and punctuation.
• A bit is a unit of basic memory represented by either 1 or 0.
• Binary digit (BIT).
MEMORY CAPACITY UNITS
Units No. of Bytes No. of characters
1 Terabyte (TB) 1 024 000 000 000 bytes 1 024 000 000 000
characters
Secondary storage
• This type of memory is also known as external memory or non-
volatile.
• It is slower than main memory.
• These are used for storing Data/Information permanently.
• There are several limitations with primary storage:
Limited capacity because the cost per bit of storage is high
Volatile- data stored is lost when electric power is turned off or interrupted
Secondary storage cont’d
• CPU directly does not access these memories; instead they are
accessed via input-output routines. Contents of secondary memories
are first transferred to main memory and then CPU can access it.
Examples include: hard disk, CD-ROM, DVD, magnetic disk, etc.
Characteristics of secondary storage
• These are magnetic and optical memories.
• It is known as backup memory (also called auxiliary storage).
• It is non-volatile memory.
• Data is permanently stored even if power is switched off.
• It is used for storage of the data in the computer(programs, user files,
etc).
• Cheaper than primary storage
• Slower than primary memories.
Memory hierarchy
registers
Chache memory
Primary storage
Secondary storage
• Increasing size
• Decreasing access speed
• Decreasing cost