Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jazan University, Jazan KSA

Similar presentations


Presentation on theme: "Jazan University, Jazan KSA"— Presentation transcript:

1 Jazan University, Jazan KSA
Chapter 4 Lecture 09 Faheem Ahmad Lecturer, CNET Dept., Jazan University, Jazan KSA Cache Memory

2 Topics of this chapter Computer memory system Cache Memory Principles
Elements of cache design Replacement algorithms

3 Computer memory system
The topic computer memory system can be understood by the study of Key Characteristics of Computer Memory Systems. Location, Capacity, Unit of Transfer, Access Method, Performance, Physical Type, Physical Characteristics and Organization Book Page No 112

4 Characteristics of Memory
Location Internal , External Capacity Number of words, Number of bytes Unit of Transfer Word, Block Access Method Sequential, Direct, Random, Associative Performance Access time, Cycle time, Transfer rate Physical Type Semiconductor, Magnetic, Optical, Magneto-optical Physical Characteristics Volatile/nonvolatile, Erasable/non erasable Organization Memory modules Book Page No 112

5 KEY CHARACTERISTICS OF MEMORY
LOCATION 1.Internal: Registers, main memory, cache 2.External:Disk,Tape, flash drive CAPACITY Expressed in bytes or words. UNIT OF TRANSFER Is number of bits read out or written into memory. Expressed in word or block of data

6 CONT….. ACCESS METHODS 1.Sequential Access: In this access method data is retrieved in same order in which thy have been stored. 2.Direct Access: Data is read directly from location 3.Random Access: Data is searched randomly used a technique called hashing.

7 Sequential and random

8 Direct access

9 performance 1. Access time : Time it takes to perform a read or write operation. 2.Memory cycle time: Access time + additional time to required before second access 3.transfer Rate: is the rate at which data can be transferred in or out of memory. NOTE: for RANDOM ACCESS MEMORY Tr= 1/cycle time For NON-RANDOM Tn=Ta+n/r

10 Memory Hierarchy As one goes down the hierarchy, the following occur:
Decreasing cost per bit Increasing capacity Increasing access time Decreasing frequency of access of the memory by the processor

11 Characteristics of memory hierarchy
RULES OF HIERARCHY Faster access time, greater cost Greater capacity, smaller cost Greater capacity, slow access time As we go down of memory hierarchy we see following Decreasing cost Increasing capacity Increasing access time Decreasing frequency

12 Cache Memory A small amount of fast memory that stays between normal main memory and CPU. May be located on CPU chip or module. Intended to allow access speed approaching register speed. Used to hold frequently used data Book Page No 118

13 Single cache Book Page No 118

14 Three-level cache In the figure below shows the use of multiple levels of cache. The L2 cache is slower and typically larger than the L1 cache, and the L3 cache is slower and typically larger than the L2 cache. Book Page No 118

15 Size of Cache Memory Book Page No 124

16 Cache Memory working When CPU attempts to read a word of data from memory , a check is made in cache , if present deliver to CPU. If not present, block of memory is read into cache and delivered to CPU. Book Page No 118

17 Elements of cache design
Elements of cache design depends upon the following things: Logical cache address or Physical cache address, Size of cache design and Replacement Algorithm. A logical cache, also known as a virtual cache, stores data using virtual addresses. The processor accesses the cache directly, without going through the MMU. A physical cache stores data using main memory physical addresses. Book Page No 121

18 Addresses (Logical & Physical)
Logical Address Book Page No 123 Physical Address

19 Thank you!!!


Download ppt "Jazan University, Jazan KSA"

Similar presentations


Ads by Google