Skip to content

Instantly share code, notes, and snippets.

@jki127
Last active October 17, 2018 21:32
Show Gist options
  • Save jki127/a5d8a4a6bbaa264f63608780f2a2d88f to your computer and use it in GitHub Desktop.
Save jki127/a5d8a4a6bbaa264f63608780f2a2d88f to your computer and use it in GitHub Desktop.

File Systems (cont.) - DistSys Lecture - Oct 16, 2018

Issues with NFS

http://pages.cs.wisc.edu/~remzi/OSTEP/dist-nfs.pdf

Preventing race conditions on files

  • There is a linux system call we use to lock a file:
lockf()
  • In Unix, if a file is deleted while its open, it will only close the file descriptor when it closed
  • In NFS, if a file is deleted while its open, it will create a “garbage file” with an extension .nfs01234 (any number)

Andrew File System (AFS)

http://pages.cs.wisc.edu/~remzi/OSTEP/dist-afs.pdf

  • use Fetch when opening
  • use Store when closing

Types of Failures

Fail-Stop

Computer has died

Fail-Recover

Computer rebooted

Network-partition

Network goes down permanently or temporarily

Arbitrary Failure (to be continued in the future)

Server is sending back garbage data (server hacked or corrupted)

  • Completeness
  • Accuracy

Handling Failures

Ping-ack approach

The client sends a ping some amount of time after recognizing a server failure to check if the server is no longer failing

Heartbeat approach

Client checks the server is alive periodically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment