File Systems: Names, Blocks and Metadata · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

Names point at records, records point at blocks

Computing · Computer Systems · ages 20-21
Name ______________________   Date ____________
  1. What is a path name?

    • A copy of a file kept elsewhere
    • A secret code that locks a file
    • A chain of names walking folder by folder to one file
  2. What does a directory actually store?

    • The bytes of every file inside it
    • A table mapping names to records
    • A backup copy of each file
  3. A hard link is a second name pointing at the same record as the first name.

    Circle one:   True   False

  4. Writing a large file is slow, yet deleting it is instant. Why?

    • Deleting compresses the blocks first
    • Deleting skips the permission check
    • Only the small record changes, not every block
  5. You run chmod 600 myfile.txt. What can others do with the file?

    • Nothing at all
    • Read it but not change it
    • Run it but not read it
  6. In -rw-r--r--, what do the three letter groups after the dash mean?

    • Owner, group, and everyone else, each with read, write and run slots
    • Three copies of the file on three disks
    • Past, present and future versions of the file
  7. You need a second path to a file without duplicating its bytes. What should you make?

    • A hard link, which adds a name for the same record
    • A full copy with the copy command
    • A new empty file with the same name
  8. A friend says a directory holds the bytes of its files. What is the best correction?

    • True, folders contain the bytes directly
    • The directory holds a name table, and records point at the blocks
    • The bytes live inside the path string itself
LightMySky · lightmysky.comW1-mt_jN4u3idvF3-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Names point at records, records point at blocks W1-mt_jN4u3idvF3-s1

  1. A chain of names walking folder by folder to one file · A path spells out the walk from the top folder down to the exact file.
  2. A table mapping names to records · A directory maps each name to its record, and the record points at the blocks.
  3. True · Both names map to one record, so both reach the same blocks.
  4. Only the small record changes, not every block · Writing touches every block, while deleting only updates the small record.
  5. Nothing at all · The 600 setting gives the owner read and write, and clears the rest.
  6. Owner, group, and everyone else, each with read, write and run slots · Each group holds read, write and run slots for one class of user.
  7. A hard link, which adds a name for the same record · A copy makes a new record with fresh blocks, while a link reuses the record.
  8. The directory holds a name table, and records point at the blocks · Folders map names to records, and only records point at block locations.
Worksheet · LightMySky