Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
153 views
35 pages
Unit - 5 DPCO
Unit -5 DPCO
Uploaded by
Gopika Siva
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Unit -5 DPCO For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
153 views
35 pages
Unit - 5 DPCO
Unit -5 DPCO
Uploaded by
Gopika Siva
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Unit -5 DPCO For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Unit -5 DPCO For Later
You are on page 1
/ 35
Search
Fullscreen
Unit 5 - Memory and I/Oeee . 2th os oes Y © 4 Cache Memory O = Sw _L Cache Memory is a special very Gich-apes} memory. Itis used to speed up and synchronizing with high-speed CPU Cache memory is costlier than main memory or disk memory but economical than CPU registers. Cache memory is an extremely fast memory type that acts as a butfer between RAM and the cPpuY ae Itholds frequently requested data and instructions so that they are immediately available to the CPU when needed.Simple Cache ro % x © Processor requests are each one word ua Be and the blocks also Xan2 Xn-2 consist of a single word Kans % % 4. Bofore the relerence to X,, _b. After the reference to X,, FIGURE 6.7 The cache just before and just after a reference to a word X, that is not Initially in the cache. This reference causes a miss that forces the cache to fetch X, from memory and {insert it into the cache.Swe S Xn Simple Cache’ — Bsvots Bem tw X wi X% word Xyoe Xan Xoo Ken % % X % @btore te rteronce 1X, '. After the reference to X,, its ee FIGURE 5.7 The cache Just before and just after a reference to a word {ttiaty tn the cane. Tis reference cane amis that fore the cache toch Xo memory eat {insert it into the cache, Processor request: are each one word and the blocks also consist of a single wordWeds —> Cade El Cache Mapping- Direct Mapping Eg. 22- Apple.26- Orange, 22,26,16- Guava.18-Mango i = j modulo m where iscache line number j= main memory block number menumber of lines in the cache slolalalolnWeds —> Cade El aret Cache Mapping- Direct Mapping aa cearnaind a “ ee = r us = yy @ where ee te. apple %6- orange QQ2810- 3 oe ng nD arcusber of lines ia the cache Guava,18-Mango ) ~ Caceres D 22 —peacke hit 0 1G 4)26 encke RIF ; 5) IGA O @s 2e © [978 =2 3Weds —> Cade EE) diet Cache Mapping- Direct Mapping wher Me oY iscache line number ehumtome@hed © yes eee, Guava.1&-Mango a) 2674.2 2 Cacke =8 D 22 —pcache hit 0 1G 24,23 10,16 az ceed 21 —_—— 2 eas oe A> 213 © [ere =27 3 24 5 >e a2y 7Momory 01205) c. After handling a miss of address (21010,.,) 4. Aftor handling @ miss of address (10000...)c. After handling @ miss of address (11010...) one 19M? aanaze frst 267k ‘Memory (10110), 4. After handing @ miss of BdGr08S (10000)Need of Tag bits and Valid bits 1. Thetags contain the address information required to identify whether a word in the cache corresponds to the requested word. 2. Valid bit used to indicate whether an entry contains a valid address. If the bit is not set. there cannot be a match for this block.Key points of Direct Mapping “ oe In Direct mapping, assign each memory block to pectic ine)h the cache. Ifa line is previously taken up by a memory block when a new block needs to be loaded, the old block is yashed. ‘An address space is split into two parts index field and a tag field. The cache is used to store the tag field whereas the rest is stored in the main memory. Direct mapping's performance is directly proportional to the Hit ratio.”Cache cs Aso bye ge ——_ wen my Handling Cache Miss a . Send the original PC value (current PC - 4) to the memory. Y Eat . Instruct main memory to perform a read and wait for the memory to complete its access. . Write the cache entry, putting the data from memory in the data portion of the entry, writing the upper bits of the address (from the ALU) into the tag field, and turning the valid bit on. . Restart the instruction execution at the first step, which will refetch the instruction, this time finding it in the cache.Cocke present (HD vv x KX cut ee 24,18, 19, 64 552 Aik ohio av Cache Performance Q. The performance of the cache is in terms of ahi ratio) AT Q The CPU searches the data in the hen it ting or read any data from the In cs the daa in thea} when it equtes writing or read any dat from the main meme this case, two cases may occur as follows © ithe CPU finds that datain the Gob aGache hid)pecurs and it reads the data from the cache. © On the other hand, if it does not find that data in the cache, che mi urs. Furthermore, during cache miss, the cache allows the entry of data and then reads from the main memory © Therefore, we can define the hit ratio as th{ number of hits givided by the sum of hits and misses.Measuring and Improving Cache Performance CPU time = (CPU execution clock cycles + Memory-stall clock cycles) X Clock cycle time Memory-stall clock cycles = (Read-stall cycles + Write-stall cycles) Reads Read-stall cycles = X Read miss rate X Read miss penalty Program Write-stall cycles = Waites Write miss rate X Write miss penalty Program + Write buffer stallsMemory-stall clock cycles = Gemory access, Miss rate X Miss penalty aes Program Hit ratio = hit / (hit + miss) = no. of hits/total accesses AMAT = Time for a hit + Miss rate X Miss penaltyCalculating Average Memory Access Time Find the AMAT for a processor with a 1 ns clock cycle time, a miss penalty of 20 clock cycles, a miss rate of 0.05 misses per instruction, and a cache access time (including hit detection) of 1 clock cycle. Assume that the read and write miss penalties are the same and ignore other write stalls. AMAT = Time for a hit + Miss rate X Miss penaltyCalculating Average Memory co Time Gis the AMAT for a eae) with al Cns cocycle time, dais penalty yf Qoklock cycles, amiss rat isses per instruction, and a cache access time (including hit detection) of co lock cycle. Assume that the read and write miss penalties are the same and ignore other write stalls. AMAT = Time for a hit + Miss rate X Miss penalty = A. 4 0105 X2D = 2 Ak eyches =Qxte 2MAssovakve —> ontree gue erouah ve Reducing Cache Misses 1. Reducing Cache Misses by More Flexible Placement of Blocks shag > aos te @ sens. _ Seto Y ey“ [| block can map to [| Set-22. Reducing the Miss Penalty) ising Multilevel Caches —___—— 1. L1 cache, or primary cache, is extremely fast but relatively small, and is usually embedded in the processor —— chip as CPU cache. 2. L2 cache, or secondary cache, is often more capacious than L1. L2 cache may be embedded on the CPU, or it can be on a separate chip or coprocessor and have a high-speed alternative system bus connecting the cache and CPU. That way it doesn't get slowed by traffic on the main system bus. 3. Level 3 (L3) cache is specialized memory developed to improve the performance of L1 and L2. L1 or L2 can be significantly faster than L3, though L3 is usually double the speed of DRAM.Cache Replacement Algorithms Aone Least Recently Used Random Replacement FIFO > Most Recently used hac, 2 amie Cade / — ho spaceX,Random Replacement k ged Qo y|& Be meeeNB.erD/ErF GH ©o0@ FIFOY Fst a Sout onl a 7 e © ® £ F ] @ € F G © e€ +f G tig yp VPAB 53 EpFfe BC #35860 A 3 ce D € we c D c D Least Recently Used i1235 6 - a och@s F Life. at Most Recently Used be Be A A A A BEww oP nH HEMHow this happens? o > Move — Laptop Thuppaki las RAM C848) Appl rnerie/ Gnme > RAM _Virtual Memory ° ' 2 3 a leb>5 yo ece 4 cse 1 cece 5 sed ° OC 6] ey ( | alan [4 | > CNVirtual Memory oO or 7, Lab Exar ees Lab=>5 eyo dees ecé 4 coe 1 ece 5 eseVirtual Memory ° ' 2 3 & CY Lab Exon oe Gdos Mom mly => SO ego eses ecé 4 cse 1 ece 5 ese dl 9 Ov Ov @vv2. outveaah adi odds u Gana Sym Caan eo) Address Translation 48 14191211 100 @f--9 240 Physical page number Page offsetKey Points 1. Virtual Memory is a storage scheme that provides user an illusion of having a very big main memory. This is done by treating a part of secondary memory as the main memory. 2. In this scheme, User can load the bigger size processes than the available main memory by having the illusion that the memory is available to load the process. 3. Instead of loading one big process in the main memory, the Operating System loads the different parts of more than one process in the main memory. 4. By doing this, the degree of multiprogramming will be increased and therefore, the CPU utilization will also be increased.- swury? ep
You might also like
Cache Memory Presentation Slides
PDF
No ratings yet
Cache Memory Presentation Slides
25 pages
UNIT2 Cahe-Opt
PDF
No ratings yet
UNIT2 Cahe-Opt
134 pages
9 - Cache
PDF
No ratings yet
9 - Cache
58 pages
Unit V
PDF
No ratings yet
Unit V
44 pages
Cache Memory: A Safe Place For Hiding or Storing Things
PDF
No ratings yet
Cache Memory: A Safe Place For Hiding or Storing Things
34 pages
Lec8 - Caches
PDF
No ratings yet
Lec8 - Caches
55 pages
Cache and Virtual Memory
PDF
No ratings yet
Cache and Virtual Memory
19 pages
Computer Org and Arch: R.Magesh
PDF
No ratings yet
Computer Org and Arch: R.Magesh
48 pages
Cache Memory
PDF
No ratings yet
Cache Memory
39 pages
CO & OS Unit-3 (Only Imp Concepts)
PDF
No ratings yet
CO & OS Unit-3 (Only Imp Concepts)
26 pages
Characteristics Location Capacity Unit of Transfer Access Method Performance Physical Type Physical Characteristics Organisation
PDF
No ratings yet
Characteristics Location Capacity Unit of Transfer Access Method Performance Physical Type Physical Characteristics Organisation
53 pages
William Stallings Computer Organization and Architecture 7th Edition Cache Memory
PDF
No ratings yet
William Stallings Computer Organization and Architecture 7th Edition Cache Memory
51 pages
Memory System
PDF
No ratings yet
Memory System
34 pages
Lec2 PDF
PDF
No ratings yet
Lec2 PDF
21 pages
Unit-6 Cache Memory Organization
PDF
No ratings yet
Unit-6 Cache Memory Organization
36 pages
CPU Cache: Details of Operation
PDF
No ratings yet
CPU Cache: Details of Operation
18 pages
Cache Memory: A Safe Place For Hiding or Storing Things
PDF
100% (1)
Cache Memory: A Safe Place For Hiding or Storing Things
34 pages
פרק ט - גדול ומהיר - ניצול היררכיות זיכרון
PDF
No ratings yet
פרק ט - גדול ומהיר - ניצול היררכיות זיכרון
77 pages
Cache1 2
PDF
No ratings yet
Cache1 2
30 pages
Computer Architecture: Memory Hierarchy Design
PDF
No ratings yet
Computer Architecture: Memory Hierarchy Design
60 pages
Memory Cache
PDF
No ratings yet
Memory Cache
18 pages
Chap 6
PDF
No ratings yet
Chap 6
48 pages
Memory Organization: Dr. Bernard Chen PH.D
PDF
No ratings yet
Memory Organization: Dr. Bernard Chen PH.D
77 pages
Sampriya Chandra Cache Memory
PDF
No ratings yet
Sampriya Chandra Cache Memory
36 pages
24-Cache Memory Mapping Techniques-14!03!2024
PDF
No ratings yet
24-Cache Memory Mapping Techniques-14!03!2024
36 pages
Chapter 7
PDF
No ratings yet
Chapter 7
39 pages
Cache Memory in Computer Organizatin
PDF
No ratings yet
Cache Memory in Computer Organizatin
12 pages
Cache Entries
PDF
100% (1)
Cache Entries
13 pages
L10 Cache Memory
PDF
No ratings yet
L10 Cache Memory
52 pages
Chapter5-The Memory System
PDF
No ratings yet
Chapter5-The Memory System
36 pages
MCA Computer Organisation and Architecture 05
PDF
No ratings yet
MCA Computer Organisation and Architecture 05
16 pages
Cse 410 Computer Systems: Hal Perkins Spring 2010 L T 13 C Hwit DPF Lecture 13 - Cache Writes and Performance
PDF
No ratings yet
Cse 410 Computer Systems: Hal Perkins Spring 2010 L T 13 C Hwit DPF Lecture 13 - Cache Writes and Performance
20 pages
Cache + Associations Ch-4
PDF
No ratings yet
Cache + Associations Ch-4
52 pages
Understand CPU Caching Concepts
PDF
No ratings yet
Understand CPU Caching Concepts
14 pages
Memory Organization Assignment
PDF
No ratings yet
Memory Organization Assignment
61 pages
Unit 5 Dpco
PDF
No ratings yet
Unit 5 Dpco
20 pages
DECO - Module 4.3 - Cache
PDF
No ratings yet
DECO - Module 4.3 - Cache
20 pages
CAO - Lecutre7 Cache Memory
PDF
100% (1)
CAO - Lecutre7 Cache Memory
39 pages
Coa PPT
PDF
No ratings yet
Coa PPT
158 pages
6.cache Memory - BVK
PDF
No ratings yet
6.cache Memory - BVK
47 pages
Unit Iv
PDF
No ratings yet
Unit Iv
61 pages
Unit-2 CDA DrManojY
PDF
No ratings yet
Unit-2 CDA DrManojY
81 pages
Unit3 Coa
PDF
No ratings yet
Unit3 Coa
30 pages
Chapter 6 Cache Memory
PDF
No ratings yet
Chapter 6 Cache Memory
22 pages
Cache Memory, Virtual Memory and Auxiliary Memory Notes
PDF
No ratings yet
Cache Memory, Virtual Memory and Auxiliary Memory Notes
42 pages
Memory Cache
PDF
No ratings yet
Memory Cache
21 pages
Cache Memory, Virtual Memory and Auxiliary Memory Ppts Lecture
PDF
No ratings yet
Cache Memory, Virtual Memory and Auxiliary Memory Ppts Lecture
42 pages
Chapter 2z
PDF
No ratings yet
Chapter 2z
54 pages
Input Output Organization (2.3)
PDF
No ratings yet
Input Output Organization (2.3)
151 pages
4.2 Cachememory
PDF
No ratings yet
4.2 Cachememory
12 pages
13 - Large and Fast Exploiting Memory Hierarchy Final
PDF
No ratings yet
13 - Large and Fast Exploiting Memory Hierarchy Final
118 pages
Unit 4
PDF
No ratings yet
Unit 4
36 pages
Memory Originated
PDF
No ratings yet
Memory Originated
28 pages
Week 11
PDF
No ratings yet
Week 11
45 pages
Lec 23 CAOCache Memory
PDF
No ratings yet
Lec 23 CAOCache Memory
11 pages
Cache Memory
PDF
No ratings yet
Cache Memory
51 pages
6.module 2 - Part 2
PDF
No ratings yet
6.module 2 - Part 2
39 pages
Cache Mapping
PDF
No ratings yet
Cache Mapping
23 pages