Skip to content

Commit

Permalink
Added CS 162 lec 21 part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
hrushikeshrv committed Apr 19, 2024
1 parent b5fb42f commit ead8486
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CS162/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ Taught by Prof. John Kubiatowicz at UC Berkeley in Fall, 2020
13. [Lecture 14 - Memory 2: Virtual Memory, Caching and TLBs]({% link CS162/lec14.md %})
14. [Lecture 15 - Memory 3: Caching & TLBs, Demand Paging]({% link CS162/lec15.md %})
15. [Lecture 16 - Memory 4: Demand Paging Policies]({% link CS162/lec16.md %})
16. [Lecture 17 - Demand Paging, General I/O, Storage Devices]({% link CS162/lec17.md %})
16. [Lecture 17 - Demand Paging, General I/O, Storage Devices]({% link CS162/lec17.md %})
17. [Lecture 18 - General I/O, Storage Devices, Performance]({% link CS162/lec18.md %})
18. [Lecture 19 - Filesystems 1: Performance, Queueing Theory, Filesystem Design]({% link CS162/lec19.md %})
19. [Lecture 20 - Filesystems 2: Filesystem Design, Case Studies]({% link CS162/lec20.md %})
20. [Lecture 21 - Filesystems 3: Case Studies, Buffering, Reliability, Transactions]({% link CS162/lec21.md %})
16 changes: 16 additions & 0 deletions CS162/lec21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
layout: default
title: "Lecture 20 - Filesystems 3: Case Studies, Buffering, Reliability, Transactions"
parent: UCB CS 162 - Operating Systems and Systems Programming
nav_order: 20
---

# Filesystems 3: Case Studies, Buffering, Reliability, Transactions

In previous lectures, we saw that a directory is just a file mapping file names to file numbers. There are two such types of mappings -

1. Hard links - Maps a file name to a file number. The fist hard link is created when the file is created. There can be multiple hard links, and hard links can be created and removed using syscalls like `link()` and `unlink()`. When all hard links to a file are removed, the file is deleted.
2. Soft links - These are also called symbolic links (symlinks). They map a file name to a different file name.

## Memory Mapped Files
Traditional I/O involves reading and writing to regions of memory on disk, usually with buffers and caches in between. Memory mapping of files is a technique in which we "map" the file into RAM by giving it a virtual address, and then we can use the RAM as a cache without needing buffers, and the RAM is backed by the file in memory. This technique is often used to set up inter process communication.

0 comments on commit ead8486

Please sign in to comment.