classnotes RTX 4070 Ti SUPER · faster-whisper · DeepSeek

5102 - Foundations of Comp Sys

← 5102 - Foundations of Comp Sys

FCS_22 Nov

Date 2026-11-22 Words 13,420 Segments 2,256
⤓ Download transcript (.txt with timestamps) ⤓ Plain transcript (.txt) ⤓ Transcript (.md)

Summary


session: "5102-foundations-of-comp-sys/2026-11-22 0000 FCS 22 Nov"

title: "FCS 22 Nov"

date: "2026-11-22 00:00"

duration: "--"

language: "en"

model: "deepseek-ai/DeepSeek-V3.2"

parts: 3

transcript_chars: 71459

generated: "2026-11-23T01:41:31+05:30"


FCS 22 Nov

Overview

This class covered the memory hierarchy and its management, focusing on the hardware/software contract for caches and virtual memory. It began with the motivation for studying memory hierarchy due to the disparity between processor speed and data access latency. The lecture detailed cache organization, policies (write-through/write-back, replacement), and miss classification. It then transitioned to virtual memory concepts, including address translation via page tables and the TLB, page faults, and the distinction between virtual memory and virtual machines. The session concluded with a demonstration of cache and virtual memory simulation and logistics for the upcoming quiz and final exam.

Learning outcomes

Core concepts

Memory Hierarchy

A layered structure of memory storage (registers, caches, RAM, storage) that trades off access speed, capacity, cost per bit, and persistence. Higher levels (e.g., L1 cache) are faster, smaller, and more expensive per bit. Lower levels (e.g., HDD) are slower, larger, cheaper, and often persistent. This is a practical implementation strategy to approximate fast, large, cheap memory.

Locality

A statistical tendency in program behavior, not an architectural promise. Temporal Locality: The likelihood of reusing the same memory location soon. Spatial Locality: The likelihood of accessing nearby memory locations soon. Caches are designed to exploit these properties.

Cache Organization and Operation

A cache is a small, fast memory that holds copies of data from a larger, slower memory. The cache line is the unit of transfer and allocation. An address is split into tag (identifies the block), index (selects the set), and byte offset (selects the byte within the line). A cache hit means the data is present at that level; a cache miss requires fetching from a lower level.

Cache Write Policies

Define how writes are handled. Write-through: Data is written to both the cache and the lower-level memory immediately. Write-back: Data is written only to the cache; the line is marked dirty and written back to memory only upon eviction. Write allocate is commonly used, fetching a line into the cache on a write miss.

Cache Miss Classification

Categorizes the cause of a miss. Compulsory miss: First access to a block. Capacity miss: Working set exceeds cache size. Conflict miss: Blocks compete for the same set in a set-associative or direct-mapped cache, despite cache capacity not being full.

Virtual Memory

A memory management technique that provides each process with a private virtual address space, separate from physical RAM. It uses address translation to map Virtual Page Numbers (VPN) to physical frame numbers via a page table. The offset within a page remains unchanged.

TLB (Translation Lookaside Buffer)

A special cache inside the CPU for recent page table entries. A TLB hit provides a fast translation. A TLB miss requires a slower page table walk in memory but is not a page fault.

Page Fault

An exception (trap) raised by the hardware when a process accesses a valid virtual page that is not resident in physical memory. The operating system handles it, potentially loading the page from disk (demand paging), zero-filling it, or performing copy-on-write.

Formulas and maths

Worked examples

Questions asked in class

Key takeaways

Exam-style questions

1. Question: A 2-way set-associative cache has a total size of 64 bytes and a line size of 16 bytes. For a memory address 0x2C (44 in decimal), calculate the tag, index, and offset. Assume byte-addressable memory.

2. Question: Classify the following cache miss scenarios: (a) The first access to an array element. (b) Repeatedly accessing a dataset larger than the cache. (c) Two different memory blocks mapping to the same cache set in a direct-mapped cache.

3. Question: Given a system with a page size of 4 KB, a virtual address 0x8014, and a page table entry indicating VPN 8 maps to frame 12, calculate the physical address.

4. Question: Explain the difference between a TLB miss and a page fault. Can one occur without the other?

Glossary

Follow-ups

Transcript

One line per segment, [hh:mm:ss] timestamp first.

loading…