Worksheet 8

Video Lecture

There is no video lecture this week.

Readings

  1. Cache & Buffering
  2. How does cat work?
  3. Optional reading (補充資料): Libc buffering

Learning Objectives

After working on this worksheet’s material, you should be able to say:

  • I understand that caching exists at multiple levels: CPU, memory, OS, and disk
  • I understand that libc buffering in user space reduces system calls but is not coherent between processes.
  • I understand how direct I/O bypasses the buffer cache to avoid cache pollution, and why 4 KB alignment is required.
  • I understand how memory mapping (mmap) allows zero-copy I/O by mapping file pages directly into a process’s address space.
  • I understand the difference between write-through and write-back caching and what dirty and clean pages mean.
  • I understand what write coalescing means.
  • I understand the difference between latency and throughput, and how queue depth affects SSD performance.
  • I understand that SSDs use an internal cache to speed up writes
Back to top