SlideShare a Scribd company logo
1 of 12
Download to read offline
EC6020 – ARSITEKTUR KOMPUTER LANJUT
TUGAS – 4
CHAPTER 5
BUS, CACHE AND SHARED MEMORY
SOAL-SOAL TENTANG ORGANISASI-ORGANISASI CACHE MEMORY
(CACHE MEMORY ORGANIZATIONS)
ARWIN
NIM. 232 06 008
MAGISTER TEKNIK ELEKTRO
SEKOLAH TINGGI ELEKTRONIKA DAN INFORMATIKA
INSTITUT TEKNOLOGI BANDUNG
2006
Arwin – 23206008@2006
1
Problem 5.8 – The main memory of a computer is organized as 64 blocks with a block size of eight
(8) words. The cache has eight (8) block frames. In parts (a) through (d), show the mapping from the
numbered blocks in main memory to the block frames in the cache. Draw all lines showing the
mappings as clearly as possible.
a. Show the direct mapping and the address bits that identify the tag field, the block
number, and the word number.
b. Show the fully associative mapping and the address bits that identify the tag field and the
word number.
c. Show the two-way set-associativity mapping and the address bits that identify the tag
field, the set number, and the word number.
d. Show the sector mapping with four blocks per sector and the address bits that identify
the sector number, the block number, and the word number
Answer :
From the above statement, we get the memory and cache configuration information to calculate the
identification bits and the addressing scheme. They are :
Main memory has 64 blocks → 64 6n s= ↔ = because 2s
n =
Cache memory has 8 block frames 8 3m r→ = ↔ = because 2r
m =
Block size is 8 words 8 3b w→ = ↔ = because 2w
b =
a. Direct mapping cache
Tag field = 6 3 3s r− = − = bit
Block field = 3r = bit
Word field = 3w = bit
Arwin – 23206008@2006
2
The addressing and mapping scheme are as followed :
Arwin – 23206008@2006
3
b. 8-way Fully associativity cache
Tag field = 6s = bit
Word field = 3w = bit
The addressing and mapping scheme are as followed :
Arwin – 23206008@2006
4
c. 2-way Set associativity cache
Set = 4 2v d= ↔ = because 2d
v =
Tag field = 6 2 4s d− = − = bit
Set field = 2d =
Word field = 3w = bit
For 2-way associativity cache implementation, there will be 4 sets where each set consists of 2
block frames (subsets) and each subset will cover 2 main memory blocks. The 4-bit tag
determines which 2 main memory’s blocks have right access to a particular set at a time (see
the table below).
Set Number
(2 bits)
Block Frame
Number
Memory Block Number
(2-way associativity)
0 (00) 0 1B dan B 0, 16 and 32, 48
1 (01) 2 3B dan B 1, 17 and 33, 49
2 (10) 4 5B dan B 2, 18 and 34, 50
3 (11) 6 7B dan B 3, 19 and 35, 51
0 (00) 0 1B dan B 4, 20 and 36, 52
1 (01) 2 3B dan B 5, 21 and 37, 53
2 (10) 4 5B dan B 6, 22 and 38, 54
3 (11) 6 7B dan B 7, 23 and 39, 55
0 (00) 0 1B dan B 8, 24 and 40, 56
1 (01) 2 3B dan B 9, 25 and 41, 57
2 (10) 4 5B dan B 10, 26 and 42, 58
3 (11) 6 7B dan B 11, 27 and 43, 59
0 (00) 0 1B dan B 12, 28 and 44, 60
1 (01) 2 3B dan B 13, 29 and 45, 61
2 (10) 4 5B dan B 14, 30 and 46, 62
3 (11) 6 7B dan B 15, 31 and 47, 63
Arwin – 23206008@2006
5
The addressing and mapping scheme are as followed :
Arwin – 23206008@2006
6
d. 4-block Sector cache
64 memory’s blocks are divided into 16 sectors which each sector contains 4 blocks.
8 cache’s block frames are divided into 2 sectors which each sector contains 4 block
frames.
Block field = 4 bits to cover 16 sectors of the main memory.
Tag field = 3 bits which is divided into 2 functions, selection bit and sector bit.
Sector Number
(1 bit)
Block Frame
Number
Sector Number
MemoryBlock
Number
0 0 3B dan B
1 4 7B dan B
0,1,.......,15 0 1 63, ,...........,B B B
0 0 3B dan B
1 4 7B dan B
0,1,.......,15 0 1 63, ,...........,B B B
The addressing and mapping scheme are as followed :
Arwin – 23206008@2006
7
This 4-block sector mapping scheme allows each memory’s sector placed in any of the
available cache’s block frames in fully associative mode.
Arwin – 23206008@2006
8
Problem 5.9 – Consider a cache ( )1M and memory ( )2M hierarchy with the following
characteristics :
1 :M 16 Kwords, 50 ns access time.
2 :M 1 Mwords, 400 ns access time.
Assume eight-word cache blocks and a set size of 256 words with set-associative mapping.
a. Show the mapping between 2M and 1M .
b. Calculate the effective memory access time with a cache hit ratio of 0.95h = .
Answers :
a. Mapping between 2M and 1M . From the above statement we collect some
information such that :
1 block = 8 word 3
2 3b w→ = ↔ = .
16 Kwords cache 14
2m m= ↔ = words = 14 3 11
2 2−
= block frames or
2,048 block frames starting from 0 2,047B B− . So that 11r = bits.
1 Mwords memory 20
2n n= ↔ = words = 20 3 17
2 2−
= memory blocks or
131,072 blocks starting from 0 131,071B B− . So that 17s = bits.
Set size, 8
256 2k = = words or 8 3 5
2 2k −
= = blocks. There will be 32-way
associativity. Then, number of sets,
11
6
5
2
2
2
m
v
k
= = = or 64 sets starting from
0 63S S− . Hence, each set will consist of 32 block frames. The bit set number,
2log 6d v= = bits.
Word field = 3 bits.
Set field = 6 bits to cover 64 sets of the cache memory.
Tag field = 17 6 11s d− = − = bits.
Arwin – 23206008@2006
9
Mapping Table
Set Number
(6 bits)
Block Frame Number Memory Block Number
(32-way associativity)
0 (000000) 0 1 32, ,.......,B B B
0, 64, 128, ……, 131008
1 (000001) 33 34 63, ,.......,B B B 1, 65, 129, ……, 131009
2 (000010) 64 65 95, ,.......,B B B 2, 66, 130, ……, 131010
3 (000011) 96 65 127, ,.......,B B B 3, 67, 131, ……, 131011
………….. …………. ……………….
36 (100100) 1152 65 1183, ,.......,B B B 36, 100, 167, ……, 131047
………….. …………. ……………….
63 (111111) 2016 65 2047, ,.......,B B B 63, 127, 191, ……, 131071
Arwin – 23206008@2006
10
The mapping scheme is as followed :
Arwin – 23206008@2006
11
b. The effective memory-access time can be derived as followed :
The general formula for effective memory-access time is :
1
.
n
eff i i
i
T f t
=
= ∑ where n is th
n -memory hierarchy.
Because ( )( ) ( )1 2 11 1 ........ 1i i if h h h h−= − − − , the above formula can be rewritten as
( ) ( ) ( )1 1 1 2 2 1 2 2 11 ............ 1 ....... 1eff n nT h t h h t h h t h t−= + − + + − −
What we’ve got are :
Cache ( )1M access time, 1 50t = ns
Memory ( )2M access time, 2 400t = ns
Cache hit ratio, 1 0.95h = and the access to the outermost memory, 2M , is always
hit or 2 1h =
So, the effective memory-access time is :
( )
( )( ) ( )( )( )
1 1 1 2 21
0.95 50 1 0.95 1 400
47.5 20
67.5
effT h t h h t
ns
= + −
= + −
= +
=

More Related Content

What's hot

Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSUnited International University
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386yash sawarkar
 
Chapter 2 Operating System Structures.ppt
Chapter 2 Operating System Structures.pptChapter 2 Operating System Structures.ppt
Chapter 2 Operating System Structures.pptErenJeager20
 
Concurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationConcurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationAnas Ebrahim
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1Amir Payberah
 
Cache performance considerations
Cache performance considerationsCache performance considerations
Cache performance considerationsSlideshare
 
Modes of 80386
Modes of 80386Modes of 80386
Modes of 80386aviban
 
80386 microprocessor system instruction
80386 microprocessor system instruction80386 microprocessor system instruction
80386 microprocessor system instructionUmesh Talware
 
80486 microprocessor
80486 microprocessor80486 microprocessor
80486 microprocessorMihika Shah
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OSC.U
 
Unit 6 interprocessor arbitration
Unit 6 interprocessor arbitrationUnit 6 interprocessor arbitration
Unit 6 interprocessor arbitrationDipesh Vaya
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memorysgpraju
 
Dynamic storage allocation techniques
Dynamic storage allocation techniquesDynamic storage allocation techniques
Dynamic storage allocation techniquesShashwat Shriparv
 

What's hot (20)

Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFS
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
 
Chapter 2 Operating System Structures.ppt
Chapter 2 Operating System Structures.pptChapter 2 Operating System Structures.ppt
Chapter 2 Operating System Structures.ppt
 
Concurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and SynchronizationConcurrency: Mutual Exclusion and Synchronization
Concurrency: Mutual Exclusion and Synchronization
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
 
80386 Architecture
80386 Architecture80386 Architecture
80386 Architecture
 
Sorting network
Sorting networkSorting network
Sorting network
 
Cache performance considerations
Cache performance considerationsCache performance considerations
Cache performance considerations
 
Addressing mode
Addressing modeAddressing mode
Addressing mode
 
Modes of 80386
Modes of 80386Modes of 80386
Modes of 80386
 
Memory mapping
Memory mappingMemory mapping
Memory mapping
 
80386 microprocessor system instruction
80386 microprocessor system instruction80386 microprocessor system instruction
80386 microprocessor system instruction
 
80486 microprocessor
80486 microprocessor80486 microprocessor
80486 microprocessor
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
 
Unit 6 interprocessor arbitration
Unit 6 interprocessor arbitrationUnit 6 interprocessor arbitration
Unit 6 interprocessor arbitration
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
Pipeline
PipelinePipeline
Pipeline
 
Dynamic storage allocation techniques
Dynamic storage allocation techniquesDynamic storage allocation techniques
Dynamic storage allocation techniques
 
Fragmentaton
Fragmentaton Fragmentaton
Fragmentaton
 

Similar to EC6020 – ARSITEKTUR KOMPUTER LANJUT TUGAS – 4 CHAPTER 5 BUS, CACHE AND SHARED MEMORY

Memory caching
Memory cachingMemory caching
Memory cachingFraboni Ec
 
Memory caching
Memory cachingMemory caching
Memory cachingJames Wong
 
Cmp.pptx
Cmp.pptxCmp.pptx
Cmp.pptxfoff3
 
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptxwaserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptxabcxyz19691969
 
Decoding of the extended Golay code by the simplified successive-cancellation...
Decoding of the extended Golay code by the simplified successive-cancellation...Decoding of the extended Golay code by the simplified successive-cancellation...
Decoding of the extended Golay code by the simplified successive-cancellation...TELKOMNIKA JOURNAL
 
Chapter 8 1 Digital Design and Computer Architecture, 2n.docx
Chapter 8 1 Digital Design and Computer Architecture, 2n.docxChapter 8 1 Digital Design and Computer Architecture, 2n.docx
Chapter 8 1 Digital Design and Computer Architecture, 2n.docxchristinemaritza
 
Mcs 012 computer organisation and assemly language programming- ignou assignm...
Mcs 012 computer organisation and assemly language programming- ignou assignm...Mcs 012 computer organisation and assemly language programming- ignou assignm...
Mcs 012 computer organisation and assemly language programming- ignou assignm...Dr. Loganathan R
 

Similar to EC6020 – ARSITEKTUR KOMPUTER LANJUT TUGAS – 4 CHAPTER 5 BUS, CACHE AND SHARED MEMORY (20)

Memory caching
Memory cachingMemory caching
Memory caching
 
Memory caching
Memory cachingMemory caching
Memory caching
 
Memory caching
Memory cachingMemory caching
Memory caching
 
Memory caching
Memory cachingMemory caching
Memory caching
 
Memory caching
Memory cachingMemory caching
Memory caching
 
Memory caching
Memory cachingMemory caching
Memory caching
 
Cmp.pptx
Cmp.pptxCmp.pptx
Cmp.pptx
 
2. Cache Mapping.pptx
2. Cache Mapping.pptx2. Cache Mapping.pptx
2. Cache Mapping.pptx
 
Cache memory
Cache  memoryCache  memory
Cache memory
 
OS
OSOS
OS
 
SHA512.pptx
SHA512.pptxSHA512.pptx
SHA512.pptx
 
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptxwaserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
 
Cache memory
Cache memoryCache memory
Cache memory
 
2013-June: 3rd Semester E & C Question Papers
2013-June: 3rd Semester E & C Question Papers2013-June: 3rd Semester E & C Question Papers
2013-June: 3rd Semester E & C Question Papers
 
3rd Semester Electronic and Communication Engineering (2013-June) Question P...
3rd  Semester Electronic and Communication Engineering (2013-June) Question P...3rd  Semester Electronic and Communication Engineering (2013-June) Question P...
3rd Semester Electronic and Communication Engineering (2013-June) Question P...
 
Decoding of the extended Golay code by the simplified successive-cancellation...
Decoding of the extended Golay code by the simplified successive-cancellation...Decoding of the extended Golay code by the simplified successive-cancellation...
Decoding of the extended Golay code by the simplified successive-cancellation...
 
Chapter 8 1 Digital Design and Computer Architecture, 2n.docx
Chapter 8 1 Digital Design and Computer Architecture, 2n.docxChapter 8 1 Digital Design and Computer Architecture, 2n.docx
Chapter 8 1 Digital Design and Computer Architecture, 2n.docx
 
Coa
Coa Coa
Coa
 
12 memory hierarchy
12 memory hierarchy12 memory hierarchy
12 memory hierarchy
 
Mcs 012 computer organisation and assemly language programming- ignou assignm...
Mcs 012 computer organisation and assemly language programming- ignou assignm...Mcs 012 computer organisation and assemly language programming- ignou assignm...
Mcs 012 computer organisation and assemly language programming- ignou assignm...
 

More from Joe Christensen (20)

Live a life_that_matters
Live a life_that_mattersLive a life_that_matters
Live a life_that_matters
 
Advanced Computer Architecture Chapter 123 Problems Solution
Advanced Computer Architecture Chapter 123 Problems SolutionAdvanced Computer Architecture Chapter 123 Problems Solution
Advanced Computer Architecture Chapter 123 Problems Solution
 
Two Choices
Two ChoicesTwo Choices
Two Choices
 
IEEE 12207
IEEE 12207IEEE 12207
IEEE 12207
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Lecture 8 9
Lecture 8 9Lecture 8 9
Lecture 8 9
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Lecture 7n
Lecture 7nLecture 7n
Lecture 7n
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Moble Communication
Moble CommunicationMoble Communication
Moble Communication
 
Ch20
Ch20Ch20
Ch20
 
Ch18
Ch18Ch18
Ch18
 
Ch19
Ch19Ch19
Ch19
 
Ch17
Ch17Ch17
Ch17
 

Recently uploaded

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 

Recently uploaded (20)

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 

EC6020 – ARSITEKTUR KOMPUTER LANJUT TUGAS – 4 CHAPTER 5 BUS, CACHE AND SHARED MEMORY

  • 1. EC6020 – ARSITEKTUR KOMPUTER LANJUT TUGAS – 4 CHAPTER 5 BUS, CACHE AND SHARED MEMORY SOAL-SOAL TENTANG ORGANISASI-ORGANISASI CACHE MEMORY (CACHE MEMORY ORGANIZATIONS) ARWIN NIM. 232 06 008 MAGISTER TEKNIK ELEKTRO SEKOLAH TINGGI ELEKTRONIKA DAN INFORMATIKA INSTITUT TEKNOLOGI BANDUNG 2006
  • 2. Arwin – 23206008@2006 1 Problem 5.8 – The main memory of a computer is organized as 64 blocks with a block size of eight (8) words. The cache has eight (8) block frames. In parts (a) through (d), show the mapping from the numbered blocks in main memory to the block frames in the cache. Draw all lines showing the mappings as clearly as possible. a. Show the direct mapping and the address bits that identify the tag field, the block number, and the word number. b. Show the fully associative mapping and the address bits that identify the tag field and the word number. c. Show the two-way set-associativity mapping and the address bits that identify the tag field, the set number, and the word number. d. Show the sector mapping with four blocks per sector and the address bits that identify the sector number, the block number, and the word number Answer : From the above statement, we get the memory and cache configuration information to calculate the identification bits and the addressing scheme. They are : Main memory has 64 blocks → 64 6n s= ↔ = because 2s n = Cache memory has 8 block frames 8 3m r→ = ↔ = because 2r m = Block size is 8 words 8 3b w→ = ↔ = because 2w b = a. Direct mapping cache Tag field = 6 3 3s r− = − = bit Block field = 3r = bit Word field = 3w = bit
  • 3. Arwin – 23206008@2006 2 The addressing and mapping scheme are as followed :
  • 4. Arwin – 23206008@2006 3 b. 8-way Fully associativity cache Tag field = 6s = bit Word field = 3w = bit The addressing and mapping scheme are as followed :
  • 5. Arwin – 23206008@2006 4 c. 2-way Set associativity cache Set = 4 2v d= ↔ = because 2d v = Tag field = 6 2 4s d− = − = bit Set field = 2d = Word field = 3w = bit For 2-way associativity cache implementation, there will be 4 sets where each set consists of 2 block frames (subsets) and each subset will cover 2 main memory blocks. The 4-bit tag determines which 2 main memory’s blocks have right access to a particular set at a time (see the table below). Set Number (2 bits) Block Frame Number Memory Block Number (2-way associativity) 0 (00) 0 1B dan B 0, 16 and 32, 48 1 (01) 2 3B dan B 1, 17 and 33, 49 2 (10) 4 5B dan B 2, 18 and 34, 50 3 (11) 6 7B dan B 3, 19 and 35, 51 0 (00) 0 1B dan B 4, 20 and 36, 52 1 (01) 2 3B dan B 5, 21 and 37, 53 2 (10) 4 5B dan B 6, 22 and 38, 54 3 (11) 6 7B dan B 7, 23 and 39, 55 0 (00) 0 1B dan B 8, 24 and 40, 56 1 (01) 2 3B dan B 9, 25 and 41, 57 2 (10) 4 5B dan B 10, 26 and 42, 58 3 (11) 6 7B dan B 11, 27 and 43, 59 0 (00) 0 1B dan B 12, 28 and 44, 60 1 (01) 2 3B dan B 13, 29 and 45, 61 2 (10) 4 5B dan B 14, 30 and 46, 62 3 (11) 6 7B dan B 15, 31 and 47, 63
  • 6. Arwin – 23206008@2006 5 The addressing and mapping scheme are as followed :
  • 7. Arwin – 23206008@2006 6 d. 4-block Sector cache 64 memory’s blocks are divided into 16 sectors which each sector contains 4 blocks. 8 cache’s block frames are divided into 2 sectors which each sector contains 4 block frames. Block field = 4 bits to cover 16 sectors of the main memory. Tag field = 3 bits which is divided into 2 functions, selection bit and sector bit. Sector Number (1 bit) Block Frame Number Sector Number MemoryBlock Number 0 0 3B dan B 1 4 7B dan B 0,1,.......,15 0 1 63, ,...........,B B B 0 0 3B dan B 1 4 7B dan B 0,1,.......,15 0 1 63, ,...........,B B B The addressing and mapping scheme are as followed :
  • 8. Arwin – 23206008@2006 7 This 4-block sector mapping scheme allows each memory’s sector placed in any of the available cache’s block frames in fully associative mode.
  • 9. Arwin – 23206008@2006 8 Problem 5.9 – Consider a cache ( )1M and memory ( )2M hierarchy with the following characteristics : 1 :M 16 Kwords, 50 ns access time. 2 :M 1 Mwords, 400 ns access time. Assume eight-word cache blocks and a set size of 256 words with set-associative mapping. a. Show the mapping between 2M and 1M . b. Calculate the effective memory access time with a cache hit ratio of 0.95h = . Answers : a. Mapping between 2M and 1M . From the above statement we collect some information such that : 1 block = 8 word 3 2 3b w→ = ↔ = . 16 Kwords cache 14 2m m= ↔ = words = 14 3 11 2 2− = block frames or 2,048 block frames starting from 0 2,047B B− . So that 11r = bits. 1 Mwords memory 20 2n n= ↔ = words = 20 3 17 2 2− = memory blocks or 131,072 blocks starting from 0 131,071B B− . So that 17s = bits. Set size, 8 256 2k = = words or 8 3 5 2 2k − = = blocks. There will be 32-way associativity. Then, number of sets, 11 6 5 2 2 2 m v k = = = or 64 sets starting from 0 63S S− . Hence, each set will consist of 32 block frames. The bit set number, 2log 6d v= = bits. Word field = 3 bits. Set field = 6 bits to cover 64 sets of the cache memory. Tag field = 17 6 11s d− = − = bits.
  • 10. Arwin – 23206008@2006 9 Mapping Table Set Number (6 bits) Block Frame Number Memory Block Number (32-way associativity) 0 (000000) 0 1 32, ,.......,B B B 0, 64, 128, ……, 131008 1 (000001) 33 34 63, ,.......,B B B 1, 65, 129, ……, 131009 2 (000010) 64 65 95, ,.......,B B B 2, 66, 130, ……, 131010 3 (000011) 96 65 127, ,.......,B B B 3, 67, 131, ……, 131011 ………….. …………. ………………. 36 (100100) 1152 65 1183, ,.......,B B B 36, 100, 167, ……, 131047 ………….. …………. ………………. 63 (111111) 2016 65 2047, ,.......,B B B 63, 127, 191, ……, 131071
  • 11. Arwin – 23206008@2006 10 The mapping scheme is as followed :
  • 12. Arwin – 23206008@2006 11 b. The effective memory-access time can be derived as followed : The general formula for effective memory-access time is : 1 . n eff i i i T f t = = ∑ where n is th n -memory hierarchy. Because ( )( ) ( )1 2 11 1 ........ 1i i if h h h h−= − − − , the above formula can be rewritten as ( ) ( ) ( )1 1 1 2 2 1 2 2 11 ............ 1 ....... 1eff n nT h t h h t h h t h t−= + − + + − − What we’ve got are : Cache ( )1M access time, 1 50t = ns Memory ( )2M access time, 2 400t = ns Cache hit ratio, 1 0.95h = and the access to the outermost memory, 2M , is always hit or 2 1h = So, the effective memory-access time is : ( ) ( )( ) ( )( )( ) 1 1 1 2 21 0.95 50 1 0.95 1 400 47.5 20 67.5 effT h t h h t ns = + − = + − = + =