Everyone:

This week, we will review system calls, which are the interfaces through which user applications can request services from the operating system kernel. Instead of manipulating data directly on a hard drive or directly controlling a CPU, we use the abstractions of a file and process to perform our desired actions. The OS virtualizes the physical resources of a hard drive and a CPU and allows us to access these virtual objects through system calls such as open and fork. These abstractions make it easier for us to program large applications by hiding the low-level details of interacting with hardware and by allowing our programs to be portable to different machines. Of course, with any layer of abstraction there is some trade-off, and we will be exploring the design decisions that deal with these costs in the future.

TL;DR

For this reading assignment, you are to review basic system calls related to files, directories, processes, and signals, and submit your responses to the Reading 01 Quiz.

Reading

The readings for this week are:

  1. Operating Systems: Three Easy Pieces

    1. Process API
    2. Files and Directories

  2. Beej's Guide to Unix IPC

    1. A fork() Primer
    2. Signals

Optional References

These are from Reading 10 of CSE.20289.SP19.

  1. System Programming Wiki

    1. Processes
    2. Filesystems
    3. Signals

  2. Linux Programming Interface

    1. File I/O: The Universal I/O Model
    2. Process Creation

Quiz

Once you have done the readings, answer the following Reading 01 Quiz questions:

Submission

To submit you work, follow the same process outlined in Reading 00:

$ git checkout master                 # Make sure we are in master branch

$ git pull --rebase                   # Make sure we are up-to-date with GitLab

$ git checkout -b reading01           # Create reading01 branch and check it out

$ cd reading01                        # Go into reading01 folder
$ $EDITOR answers.json                # Edit your answers.json file

$ ../.scripts/submit.py               # Check reading01 quiz
Submitting reading01 assignment ...
Submitting reading01 quiz ...
      Q1 0.50
      Q2 0.25
      Q3 0.50
      Q4 0.25
      Q5 1.25
      Q6 0.25
   Score 3.00

$ git add answers.json                # Add answers.json to staging area
$ git commit -m "Reading 01: Done"    # Commit work

$ git push -u origin reading01        # Push branch to GitLab

Remember to create a merge request and assign the appropriate TA from the Reading 01 TA List.