CSCI2510 Computer OrganizationTutorial 09:Associative mappingin MASMYuhong LIANGyhliang@cse.cuhk.edu.hk
Outline LRU Algorithm First-In-First-Out AlgorithmCSCI2510 Tut09: Associative mapping implementation2
LRU AlgorithmCSCI2510 Tut09: Associative mapping in MASM3
LRU AlgorithmCSCI2510 Tut09: Associative mapping in MASM4
LRU AlgorithmLRU Algorithm: Replace the CB that has not been used for the longestperiod of time (in the 22222221111666610 10 12 12 12 12 12 12 18 18 1822255777711 11 11 11 11 16 16 16 19 193333388888844444999913 13 15 15 15 15 15 1514 14 14 17 17 17 20The cache block has not been used for the longest period of time!CSCI2510 Tut09: Associative mapping in MASM5
LRU AlgorithmInput cachesize or the command oraddressThe inputnumber isequel to -1yesExitnoCheck the cacheCache hit?yesnoReplacement using LRUAlgorithm(update cache and time table)Update the time tableprint the cache and time table statusCSCI2510 Tut09: Associative mapping in MASM6
LRU Algorithm.data:cacheBlocks dd 32 dup(-1); hold the addresstime dd 32 dup(-1); hold the countcacheSize dd 32, 0; the size of cacheCPUAccess dd "%d", 0; the address that cpu accesscount dd 0, 0; the current timeCSCI2510 Tut09: Associative mapping in MASM7
LRU AlgorithmInput cachesize or the command oraddressThe inputnumber isequel to -1yesExitnoCheck the cacheCache hit?noReplacement using LRUAlgorithm(update cache and time table)yesPart 1: check the cachesizeStart: mov ECX, cacheSizecmp ECX, -1je exitprogramjmp inputPart 2: check the CPUAccessInput: mov ECX, CPUAccesscmp ECX, -1je exitprogrammov EAX, 0jmp checkUpdate the time tableprint the cache and time table statusCSCI2510 Tut09: Associative mapping in MASM8
LRU AlgorithmInput cachesize or the command oraddressThe inputnumber isequel to -1Input:yes mov EAX, 0 Exitcheck:nocmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCheck the cacheCache hit?yesnoReplacement using LRUAlgorithm(update cache and time table)Update the time tableprint the cache and time table statusCSCI2510 Tut09: Associative mapping in MASM9
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 2)43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASM2EBP EAX*4110
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 2)43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASM2EAX1ECX ! 111
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 2)43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASMEAX2112
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 2)43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASMEAX21EAX! 413
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 2)43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASMEAX2114
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 2)43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASMEAX21ECX 215
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 2)43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASMEAX21Jump to hit16
LRU AlgorithmIf CPU access(ECX) 5Input: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 5)EAX43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASM21ECX ! 417
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 5)EAX43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASM2118
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 5)EAX43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp check21EAX 4CSCI2510 Tut09: Associative mapping in MASM19
LRU AlgorithmInput: mov EAX, 0 cacheBlocks(cachesize 4,cpu access(ECX) 5)EAX43check:cmp ECX, [EBP EAX*4]je hitadd EAX,1cmp EAX, cacheSizeje replacejmp checkCSCI2510 Tut09: Associative mapping in MASM21Jump to replace20
LRU AlgorithmInput cachesize or the command oraddressThe inputnumber isequel to -1yesExitnoCheck the cacheCache hit?hit:mov EBX ,countmov [ESI EAX*4], EBXjmp printcachestatusyesnoReplacement using LRUAlgorithm(update cache and time table)Update the time tableprint the cache and time table statusCSCI2510 Tut09: Associative mapping in MASM21
LRU Algorithmreplace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatusInput cachesize or the command oraddressThe inputnumber isequel to -1yesExitfindLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretnoCheck the cacheCache hit?noReplacement using LRUAlgorithm(update cache and time table)yesrecordLRU:Update the time tablemov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretprint the cache and time table statusCSCI2510 Tut09: Associative mapping in MASM22
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus432EBP EAX*41EBP EDI*4findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454553ESI EAX*4recordLRU:63ESI EDI*4mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASM23
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus432EAX1EDIfindLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454553EAXrecordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASM63EDIEBX 6324
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus43EAX21EDIfindLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX363recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEDIEBX 6325
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus432EAX1EDIfindLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX363recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEDIEBX 63EBX 326
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus43EAX21EDIfindLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX363recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEDIJump to record LRU27
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus43EAX2EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX3EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASM28
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus43EAX2EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX3EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 429
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus43EAX2EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX3EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 330
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus43EAX2EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX3EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 3EAX 1EBX ! 131
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus43EAX2EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX3EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMJump to findLRU32
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus43EAX2EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 645455EAX3EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 333
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus4EAX32EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 334
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus4EAX32EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 3 THEN EBX 55Not jmp35
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus4EAX32EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 436
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus4EAX32EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 337
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus4EAX32EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 3 EAX 2 SOEBX ! EAX38
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatus4EAX32EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 339
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatusEAX432EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 340
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatusEAX432EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 3 THEN EBX 54Not jmp41
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatusEAX432EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 6454EAX553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 442
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatusEAX432EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 64EAX54553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 343
LRU AlgorithmcacheBlocks, count 64,cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatusEAX432EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 64EAX54553EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 3 EAX 3 SORET44
LRU AlgorithmcacheBlocks, count 64, cpu access 5replace:mov EAX, 0mov EDI, 0call findLRUmov EBX, CPUAccessmov [EBP EDI*4], EBXmov EBX ,countmov [ESI EDI*4], EBXjmp printcachestatusEAX435EDI1findLRU:mov EBX, [ESI EDI*4]add EAX, 1cmp EBX, [ESI EAX*4]jg recordLRUmov EBX, cacheSizesub EBX, 1cmp EAX, EBXjne findLRUretTime table, count 64EAX545564EDI63recordLRU:mov EDI, EAXmov EBX, cacheSizedec EBXcmp EAX, EBXjne findLRUretCSCI2510 Tut09: Associative mapping in MASMEBX 5EBX 6445
LRU AlgorithmInput cachesize or the command oraddressThe inputnumber isequel to -1yesExitprintcachestatus:mov EDI, 0invoke crt printf, addr stateFormatcall printstateinvoke crt printf, addr countFormatmov EDI, 0call printcountinvoke crt printf, addr endFormatjmp inputprintstate:nomov EAX, [EBP EDI*4]invoke crt printf, addr outputFormat, EAXadd EDI, 1cmp EDI, cacheSizejne printstateretCheck the cacheCache hit?yesprintcount:noReplacement using LRUAlgorithm(update cache and time table)Update the time tablemov EAX, [ESI EDI*4]invoke crt printf, addr outputFormat, EAXadd EDI, 1cmp EDI, cacheSizejne printcountretprint the cache and time table statusCSCI2510 Tut09: Associative mapping in MASM46
Associative mapping implementationCSCI2510 Tut09: Associative mapping in MASM47
First-In-First-Out AlgorithmFirst-In-First-Out Algorithm: Replace the CB that has arrived for the longest periodof time (in the 111111111166666666615 15 15 15 15 15222222888888883333333311 11 11 11 11 11 11 11 11 1144444444448818 18 1814 14 14 14 14 14 14The cache block has arrived for the longest period of time!CSCI2510 Tut09: Associative mapping in MASM48
First-In-First-Out AlgorithmInput cachesize or the command oraddressThe inputnumber isequel to -1yesExitnoCheck the cacheCache hit?noReplacement using FIFOAlgorithm(update cache and time table)yesprint the cache and time table statusCSCI2510 Tut09: Associative mapping in MASM49
First-In-First-Out AlgorithmCSCI2510 Tut09: Associative mapping in MASM50
Assignment3 Implement the FIFO Algorithm Fill the five code segments:check, hit, replace, find first,recordfirst Don’t change the start, input andOutput(printstate/printcachestatus/printcount) code segments!!!CSCI2510 Tut09: Associative mapping in MASM51
Summary LRU Algorithm First-In-First-Out AlgorithmCSCI2510 Tut09: Associative mapping in MASM52
Tutorial 09:Associative mapping in MASM Yuhong LIANG yhliang@cse.cuhk.edu.hk. Outline LRU Algorithm First-In-First-Out Algorithm CSCI2510 Tut09: Associative mapping implementation 2. LRU Algorithm . jmp check. LRU Algorithm CSCI2510 Tut09: Associative mapping in MASM 10 4 3 2 1
option casemap:none include windows.inc include kernel32.inc include msvcrt.inc includelib msvcrt.lib .data APrompt db "CSCI2510 Tutorial 2", 10, 0 .code start: invoke crt_printf, addr APrompt invoke ExitProcess, NULL end start; press Ctrl F5 to prevent instant quit after program execution CSCI2510 Tut
Tutorial Process The AVID tutorial process has been divided into three partsÑ before the tutorial, during the tutorial and after the tutorial. These three parts provide a framework for the 10 steps that need to take place to create effective, rigorous and collaborative tutorials. Read and note the key components of each step of the tutorial .
Tutorial Process The AVID tutorial process has been divided into three partsÑ before the tutorial, during the tutorial and after the tutorial. These three parts provide a framework for the 10 steps that need to take place to create effective, rigorous and collaborative tutorials. Read and note the key components of each step of the tutorial .
Tutorial 1: Basic Concepts 10 Tutorial 1: Basic Concepts The goal of this tutorial is to provide you with a quick but successful experience creating and streaming a presentation using Wirecast. This tutorial requires that you open the tutorial document in Wirecast. To do this, select Create Document for Tutorial from the Help menu in Wirecast.
Tutorial 16: Urban Planning In this tutorial Introduction Urban Planning tools Zoning Masterplanning Download items Tutorial data Tutorial pdf This tutorial describes how CityEngine can be used for typical urban planning tasks. Introduction This tutorial describes how CityEngine can be used to work for typical urban .
Tutorial 1: Basic Concepts 10 Tutorial 1: Basic Concepts The goal of this tutorial is to provide you with a quick but successful experience creating and streaming a presentation using Wirecast. This tutorial requires that you open the tutorial document in Wirecast. To do this, select Create Document for Tutorial from the Help menu in Wirecast.
CSC418: Computer Graphics Tutorial 1 MichaelTao September20,2012 Michael Tao CSC418: Computer Graphics Tutorial 1 September 20, 2012 1 / 31. Plan for Today (and next Week) Event-DrivenProgramming . OpenGL 4.3 Programmable Pipeline Diagram Michael Tao CSC418: Computer Graphics Tutorial 1 September 20, 2012 19 / 31.
Pile designers therefore looked at calculation based on theoretical soil mechanics. 16 Geotechnical Design to EC7 13 January 2017 Layer 1 Layer 2 Layer 3 L 1 L 2 L 3 Q s1 Q s2 Q s3 Q b Ultimate pile resistance Q u Q s Q b Traditional Pile Design to BS 8004. 17 Geotechnical Design to EC7 13 January 2017 Traditional Pile Design to BS 8004 The usual approach is to divide the ground into .