From a16530f369a082e345e55a4c3aa410e111fef9d8 Mon Sep 17 00:00:00 2001 From: Haile Lagi <52631736+hailelagi@users.noreply.github.com> Date: Sun, 8 Dec 2024 02:06:49 +0100 Subject: [PATCH] render svg ty claude! Signed-off-by: Haile Lagi <52631736+hailelagi@users.noreply.github.com> --- content/notes/block-layers.md | 18 ++---------- static/sketch_fs.svg | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 static/sketch_fs.svg diff --git a/content/notes/block-layers.md b/content/notes/block-layers.md index 96ea8a9..f9f03fc 100644 --- a/content/notes/block-layers.md +++ b/content/notes/block-layers.md @@ -1,7 +1,7 @@ --- title: "through the looking glass of block layers" date: 2024-12-06T17:38:16+01:00 -draft: true +draft: false --- The modern computing/data infrastructure is [vast and interesting](https://landscape.cncf.io/). @@ -17,21 +17,9 @@ Why a filesystem? It's **a key abstraction** we'll use to go spelunking into the ## Physical Layer At the bottom, there must exist some _physical media_ which will hold these bits and bytes we conveniently call a block. It could be an HDD, SSD, [tape](https://aws.amazon.com/storagegateway/vtl/) or something else, [what interface does this physical media present?](https://pages.cs.wisc.edu/~remzi/OSTEP/file-devices.pdf) It's exposed over many _protocols_. -``` -application/process (read/write) - | -POSIX (open, read, write, close) - | -(filesystem - files and directories) <-- yay! - | -Block Interface(read/write) - | -Device Drivers(specific read/write) - | -Physical Media (HDD/SSD - sector/page r/w) -``` +![simplified sketch of file system layering](/sketch_fs.svg) -This is a roughly sketch made for simplicity. +This is a rough sketch made for simplicity. An HDD exposes a "flat" address space to read or write, the smallest atomic unit is a sector (512-byte block) and flash based SSDs expose a unit called a "page" which we can read or write higher level "chunks" of. [†1] to create a _file system abstraction_ over this **block interface**, what does it look like? diff --git a/static/sketch_fs.svg b/static/sketch_fs.svg new file mode 100644 index 0000000..e039418 --- /dev/null +++ b/static/sketch_fs.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + Application Process + (read/write) + + + POSIX + (open, read, write, close) + + + Filesystem + (files and directories) + + + Block Interface + (read/write) + + + Device Drivers + (specific read/write) + + + Physical Media + (HDD/SSD - sector/page r/w) + + + API Calls + System Calls + File Operations + Block Read/Write + Device Specific + Physical I/O + + + + + + + + + + +