Systems Architecture

Table of Contents

Mapping functions

consider (with 16-bit addressable memory): cache — 128 blocks of 16 words each = 2048 words (2K) main memory — 4096 blocks of 16 words each = 64K words

valid bit — 0 when power first turned on. set to 1 when a memory block is loaded into a location. the processor only fetches data from a cache block if the valid bit is 1.

cache flushing — forcing all dirty blocks to be written back to memory

Direct mapping:

Associative mapping:

Set-associative mapping

Replacement algorithms

LRU replacement algorithm

Random algorithm — quite effective in practice