Classifications of Locality of References Principles Flashcards
(33 cards)
What is principality of locality
Principle of locality or locality of reference is the tendency of a processor to access the same set of memory locations repetively over a short period of time
Types of locality
Temporal locality: Here a resource that is referenced at one point in time is referenced again soon afterwards
Spatial Locality: Here the likelihood of referencing a storage location is greater if a storage location near it has been recently refereence
Sequential Locality: Here storage is accessed sequentially, in descending or ascending order. This leads to memory hierachy
What is memory hierarchy
Memory hierarchy is a structure that uses multiple levels of memories; as the distance from the CPU increases, the size of the memories and the access time both increases.
The faster
Main memory is implemented from?
It is implemented from Dynamic Random Access Memory(DRAM)
The level closer to the processor(caches) uses ?
SRAM
Mention the levels in memory hierachy
CPU Registers
Static Random Access Memory
Main Memory
Local Disk
Remote Secondary Storage
Describe CPU Registers
They are at the top most level of this hierarchy, the hold the most frequently used data.
The are very limited in number and are the fasters
They are often used by the CPU and the ALU for performing arithmetic and logical opertions, for temporary storage of data.
What are registers
A register is a digital circuit with two basic functions: data storage and data movement.
Types of registers
Parallel and serial registers
Different manner:
Serial-in/Serial-out
Parallel-in/serial-out
Serial - in / pararell-out
Universal parallel-in/ parallel out
Describe SRAM
SRAM is a type of RAM that holds data in a static form, that is, as long as the memory has power.
SRAM stores a bit of data on four transistors using tow cross-coupled inverters.
What is Main Memory or DRAM
Dynamic random access is a type of memory that is typically used for data or program code that a computer processor needs to function.
Pro of DRAM
Simple design, speed and low cost in comparison to other types
Con of DRAM
Volatility and high power consumption
Describe Local Disks
A local drive is a computer disk drive that is installed directly within the host or the local computer
Describe Remote Secondary Storage
This includes Distrubuted File System(DFS) and online storage like cloud.
The storage area is vast with low cost but larger access time.
Differences between SRAM and DRAM
SRAM stores data till power is supplied while DRAM stored data only for few miliseconds irrespective of the power supply.
Uses nearly 6 transistors for each memory cell. Uses single transistor and capacitor for each memory cell.
Do not referesh the memory cell. Refereshing circuiting is need
Faster data access. Slower access
Consume more power. Low power consumption.
Cost per bit is high. Comparatively lower cost
How does data transfer between level work
Through blocks
What is block
The minimum unit of information that can be either present or absent
What is a memory unit
It is a collection of semi-conductor storage cells with circuits to access the data stored in them.
The data stored in memory is done with words
Why memory hierarchy
Fast storage techs cost more per byte and have less capacity
Gap betwen CPU and main memory speed is widening
Well written programs tend to exhibit good locality
Elements of memory
Processor Memory: Present inside the CPU for high spped data access. This consist of small set of registers that act as temporary storage.
Primary Memory: Directly accessed by the CPU. All data must be brought inside the main memory before accessing them.
Secondary memory: This is the cheapest, larage and relatively slow memory component. The data from the secondary memory is accessed by the CPU only after it is loaded to main memory.
What trade off among memory
Cost
Capacity
Access time
What is hit
If the requested data is found in the upper levels of memory hierarchy
What is miss
If the requested data is not found in the upper levels of memory hierarchy