SGG 11 (01)

Ok, here’s a little portion of chapter 10, really, 3 pages kind of TINY!

10.1.1 Magnetic Disks

  • We need to understand what causes disks to have long access delays: seek time,  rotational latency, and transfer rate.
  • We need to understand the physical structure of multi-surface magnetic disks and how the media is partitioned into sectors, tracks, and cylinders.
  • Disks have a controller built into the drive. The operating system communicates with this controller via a well-established API to make requests and transfer data.

10.1.2 Solid-State Disks

  • Why is it that SDDs are so much faster than magnetic disks? What are the components of access delay that determine how long an I/O operation will take?

10.1.3 Magnetic Tapes

  • It’s only an interesting fossil, but these are two paragraphs. What is important to think about is what kind of access model is more natural to this type of device: random or sequential. 
  • Can we have random access on tapes?

All right, now, finally, onto chapter 11.

11.1 File Concept

  • How do we define a file, in the most abstract, possible manner?
  • What distinguishes the following file types: text file, source file, executable file, library file?
  • Files have attributes (some people will call them meta-data). Understand what the most common attributes are and think of what impact they have for the common user.
  • As users, we all know several common operations on files. What we need to learn from this section is how the operating system supports and implements these operations. For instance, how does a seek or delete operation work? What are the data structures affected by them? (Don’t limit yourself to studying only these two!)
  • There are several pieces of information associated with an open file. We need to know what they are and how they are stored (that is, where: disk, memory, both?)
  • What happens if two different processes try to write to the same file in Unix? Does the operating system provide mutual exclusion on files by default, so that they processes operations are serialized? You should write a little test program to see what happens.
  • How are file types known in Unix? Part of the name? In an extension? Something entirely different? How does the file(1) Unix command know the type of a file?

11.2 Access Methods

  • Files can contain multiple instances of a structured data type. How can one know where one structure ends and another begin? That is, if you are going to work with a file to read or write structured data (aka. records), how can you tell one record apart from the previous and the next?
  • Files can be accessed sequentially or randomly. Beware that random doesn’t mean by chance in this context! If your system only gives you sequential access, can you build an API to simulate random access? Or vice-versa?

11.3 Directory and Disk Structure

  • How can one subdivide a physical disk into multiple logical disks? Where is the information stored about logical disks stored? 
  •  What are the typical operations that users will perform on directories? These are use cases that drive the design and the implementation of the file system.
  • Contrast the following types of directory structures, identifying their pros and cons, as well as scenarios when each one is the best option to implement: single-level, two-level, tree-structured, acyclic-graph, general graph.
  • It important that we are able to explain the concept of link and that we are able to distinguish between soft link (symbolic) and  hard link. What happens when I have multiple links to one file object and remove the actual file? Does the same thing happen regardless of the type of links to the file? What happens if I have only one hard link to a file and I remove that link?

11.4 File-System Mounting

  • What does file-system mounting accomplish for a user? What impact does this type of functionality  have on the usage of an operating system?

11.6 Protection

  • How does Unix implement protection for files and directories?
  • If I issue command chmod 0644 myfile.txt, what are the permissions for user, group, and other?
  • Say a file called otherfile.txt has permission bits 0111 (in octal). What are the permission bits (in octal), after I issue command chmod a+rw otherfile.txt?
  • Explain the concept of access control list for a file and describe a scenario to illustrate how useful it might be for a user to be able to specify the contents of this list.
Print Friendly