Everyone:
Welcome to CSE 30341 Operating System Principles, which (as the syllabus states) is a course that "introduces all aspects of modern operating systems", including topics such as "process structure and synchronization, interprocess communication, memory management, file systems, security, I/O, and distributed files systems". What this means is that we will be exploring the key ideas behind operating systems such as Linux, Windows, and macOS and studying the underlying abstractions these systems provide to user applications.
For this week, you need to setup your GitHub repository, read about basic hardware and operating system concepts, and submit your responses to the Reading 01 Quiz.
Last semester, most of you took the CSE 20289 Systems Programming course where you learned about how to use a Unix system and how to program applications in that environment. Throughout the course, you experienced and practiced the Unix Philosophy:
Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams, because that is a universal interface.
You did this by writing shell scripts, Python applications, and utilities in C. You even wrote a webserver that took advantage of multiple processes!
In this class, we will take the next step and explore what data structures, algorithms, and mechanisms are necessary at the operating system level to support such applications. That is, we will discuss how the operating system kernel provides different abstractions that allow us to safely and efficiently execute multiple programs that communicate with each other while accessing different hardware resources. In short, we will uncover the magic that powers the Unix Philosophy.
For this course, we will focus on three main ideas:
Virtualization: How does the operating system represent the underlying hardware resources?
Concurrency: How does the operating system coordinate multiple streams of execution?
Persistence: How does the operating system organize data?
To explore these topics and apply the concepts learned in class, you will implement four programming projects throughout the semester: implement a scheduling process queue, implement a message bus, implement malloc, and implement a filesystem. These projects will require some design work, extensive testing, and utilization of the skills you learned in both CSE 20289 Systems Programming and CSE 20312 Data Structures.
Additionally, you will have weekly reading assignments (the first one is below). These will automatically be graded by the continuous integration system provided by GitHub.
Of course, there will be two exams: a Exam 01 and Exam 02. Each will be taken online and only cover the material since the last exam.
For communication outside of our meeting time, we will be using Slack,
specifically the #cse-30341-fa20
channel:
There is a class mailing list, but most day-to-day communication (including office hours and homework help) should take place on Slack.
Be aware of the following:
All of your work will be submitted to GitHub using git. Your third task is to setup your GitHub repository by doing the following:
Sign-in or create a GitHub account if you do not already have one.
You probably used GitLab last semester. We are now switching to GitHub, which is:
More popular.
Faster (responsive UI/UX).
Finally has free unlimited private repositories.
Has fancy classroom features.
Fork the class assignments repository from the following template:
This will create a private cse-30341-fa20-assignments-$USERNAME
repository under your own account and linked to the nd-cse-30341-fa20
organization.
Once this is done, you can clone your git repository to your local machine (or the student machines):
$ git clone https://github.com/nd-cse-30341-fa20/cse-30341-fa20-assignments-$USERNAME.git
README.md
file to include your name and
NetID so it is straightforward to identify your account.
You are responsible for ensuring that your GitHub assignments repository is in proper order, which means you have the correct settings and permissions set. Failure to properly configure your repository will adversely impact your grade.
The readings for Tuesday, August 11 are
A Basic Guide to Linux Boot Process
Optional: 6 Stages of Linux Boot Process (Startup Sequence), An introduction to the Linux boot and startup processes, and Systemd Boot Process a Close Look in Linux.
Note: Don't worry if you don't get the readings done by Tuesday, as this is the first week of class.
Once you have done the readings, answer the following Reading 01 Quiz questions:
In addition to a dredd quiz, each reading will also have a short C
program associated with each assignment. For this week, you are to modify program.c
in reading01
to print out True
or False
for each of the following statements:
Note: Simply print True
or False
for each question (each answer on its own line with no trailing space).
To test your program.c
, you should be able to use make
:
$ make test-program
gcc -Wall -g -std=gnu99 -o program program.c
curl -sLO https://raw.githubusercontent.com/nd-cse-30341-fa20/cse-30341-fa20-assignments/master/reading01/test_program.sh
chmod +x test_program.sh
./test_program.sh
Testing reading01 program ... Success
Score 3.00
To submit your quiz answers, you will need create a answers.json
or
answers.yaml
file in the reading01
folder of your assignments
repository:
For this class, you must use a separate git branch for each assignment. This means that the work for each reading and challenge must be done in a separate branch. To create and checkout a new branch, you can do the following:
$ git checkout master # Make sure we are in master branch
$ git pull --rebase # Make sure we are up-to-date with GitLab repository
$ git checkout -b reading01 # Create reading01 branch and check it out
Once you do the above, you should see the following output for the git-branch command:
$ git branch
master
* reading01
The *
indicates that we are currently on the reading01
branch.
You can either hand-write the answers
file using your favorite text
editor or you can use the online form to generate the JSON data.
A hand-written answers.yaml
may look like the following:
q1: [telemetry]
q2:
- scalability
- processor
- mouse
- keyboard
q3:
- functions
- call
- awesome
- lame
q4: toomanythreads
q5:
- iOS
- monitoring
- iphones
- NSA
q6: [init, bios, kernel, bootloader, mbr]
The equivalent answers.json
generated using the online form may look
like the following:
{
"q1": "telemetry",
"q2": [
"scalability",
"processor",
"mouse",
"keyboard"
],
"q3": [
"functions",
"call",
"awesome",
"lame"
],
"q4": "toomanythreads",
"q5": [
"iOS",
"monitoring",
"iphones",
"NSA"
],
"q6": [
"init",
"bios",
"kernel",
"bootloader",
"mbr"
]
}
You may use either format. To determine which symbols correspond to which response, take a look at the Reading 01 Quiz file.
To check your answers, you can use the provided .scripts/submit.py
script:
$ cd reading01 # Go into reading01 folder
$ $EDITOR answers.json # Edit your answers.json file
$ ../.scripts/submit.py # Submit reading01
Submitting reading01 assignment ...
Submitting reading01 quiz ...
Q1 0.00
Q2 0.12
Q3 0.00
Q4 0.00
Q5 0.00
Q6 0.10
Score 0.23
This script will submit your reading01/answers.json
file to dredd,
which is the automated grading system. dredd will take your answers
and return to you a score as shown above. Each reading is worth
3.0 points.
To test both the quiz and the program.c
, you can simply type in make
:
$ make
Submitting reading01 assignment ...
Submitting reading01 quiz ...
Q1 0.50
Q2 0.50
Q3 0.50
Q4 0.50
Q5 0.50
Q6 0.50
Score 3.00
Testing reading01 program ... Success
Score 3.00
Once you have your answers file and your program.c
, you need to add
and commit each file, and push your commits to [GitLab]:
$ git add answers.json # Add answers.json to staging area
$ git commit -m "Reading 01: Quiz" # Commit quiz
$ git add program.c # Add program.c to staging area
$ git commit -m "Reading 01: Program" # Commit program
$ git push -u origin reading01 # Push branch to GitLab
git push
when you are done.
When you are ready for your final submission, you need to create a pull request via the GitHub interface:
First, go to your repository's Branches page and then press the New pull request button for the appropriate branch:
Next, edit the pull request title to "Reading 01", write a comment if necessary and then press the "Create pull request" button.
Finally, assign the pull request to the teaching assistant assigned to you for the given week and make sure all the checks have passed.
Every commit on GitHub will automatically submit your quiz or code to dredd and the results of each run is displayed in the Checks tab of each commit as shown below:
Please refer to the Reading 01 TA List to determine who your grader is for this week.
Once you have made the pull request, the instructor or teaching assistant can verify your work and provide feedback via the discussion form inside the pull request. If necessary, you can update your submission by simply committing and pushing to the appropriate branch; the pull request will automatically be updated to match your latest work.
When all work is graded, the grader will merge your branch and close the pull request.
Note: Please do not merge your own pull request. This makes it more difficult for the graders to keep track of what needs to be graded.