Cs pw1 Presec
Cs pw1 Presec
ANSWERS
1. Memory hierarchy refers to the structured arrangement of the different kinds of memory in a
computer system, organized based on speed, capacity and cost. The memory hierarchy is built to
improve data storage and access efficiency, allowing the computer to efficiently process and
retrieve information at various speeds. It comprises multiple levels, each varying in
characteristics, function, and proximity to the CPU, which are illustrated below:
CPU Registers, are the closest, fastest and lowest capacity memory types found in the
computer system. They are located in the CPU itself and are used during processing cycle.
Cache Memory, or SRAM(Static Random Access Memory) acts as a buffer between the
Registers and Main memory. It holds data currently being used by the CPU, or likely to be
used in the next cycle. It is slower than Registers but faster than Main Memory.
Main Memory, or DRAM(Dynamic Random Access Memory) stores data being used by the
CPU as well. It is slower but higher capacity memory which ranges anywhere from 4GB to
32GB on high-end systems).
Note that Registers, Cache Memory and Main Memory are all volatile, meaning they lose
their contents when power is lost/the system is turned off.
Optical Disk is non-volatile, auxiliary storage which stores data on disks as light and dark
patterns, which can be read with a laser in a disk drive. These disks can be Read-Only,
Rewritable, and Read-Write. Examples include CDs, DVDs, Blu ray, among others. It’s
storage ranges from 700MB(CD) to 4.7GB(DVD) to 50GB(Blu ray)
Magnetic Tape is also non-volatile auxiliary storage which stores data as magnetic patterns
on a piece of magnetic tape or film. These tapes can be played/read in tape readers or drives.
Older tapes have a low storage capacity of 20MB-200MB, but newer, modern versions can
store up to 15TB of storage. But data access is slowest with magnetic tapes.
2. 1KB(Kilobyte) of data is 1024 bytes and not 1000, because of how computers handle
memory storage and access. Computers use binary system/base-2 to handle numbers.
In memory, each byte is assigned a numerical address, which is also written in bits. For a
given number of address bits, n, the computer can store 2n bytes, one for each address. So
with 10 address bits, 210 bytes can be stored.
For convenience, this number 210 or 1024, is taken as a unit of data storage, instead of 103 or
1000. For example, with 16 address bytes, we can cleanly represent 213(8192) bytes as
23 x 210 bytes, which is 23 kilobytes or exactly 8 kilobytes.
As supposed to expressing 213(8192) bytes as 8.192 kilobytes, if 1 kilobyte were 1000 bytes.
For this reason, computer scientists make it a standard to express data storage units in terms
of powers of 2, like 1024, instead of powers of 10, like 1000.
3. 1MB = 1024 KB
so 3MB = 3 x 1024 = 3072 KB
1KB = 1024KB
so 3072KB = 3072 x 1024 = 3145728 B