Edinboro University

CSCI 380 Operating Systems
Spring 2021



Introduction to the course

Start Chapter 1 - Chapter 1 Notes

Look at the Practice Exercises


Chapter 1 & 2

Continue with Chapter 1

Look at some Questions

Chapter 2 Notes

Dowloand and instal Virtual Box and the VirtualBox Appliance OSC10e.ova. This will give us a linux machine to play with. For now and rest of the semester. This can be found at:
https://codex.cs.yale.edu/avi/os-book/OS10/index.html The books web site.

Look at Introduction to Linux Kernal Modules near end of Chapter 2

Parts I & II

  • Look at the directory structure of included programs, go to chapter 2
  • Compile simple.c
  • Add it to the kernel modules running on the operating system
  • Look to see that it ran
  • Remove it from the set of modules running on the operating system
  • Install an editor, I used JOE
  • Modify it to print out the GOLDEN_RATIO_PRIME when it gets loaded
  • Modify it to print the Greatest Common Factor of 3300 and 24 when it is removed from the set of kernel modules.



Chapter 2 & 3

Chapter 2 Notes

  • Continue with in-class programming OS module examples
    • Print out jiffies and Hz
    • Print out jiffies
  • Discuss some of the Practice Exercises in class



Chapter 3

Chapter 3 Notes

Do some fork() programming to see exactly what the OS is doing when it forks.



Review & Test

Review for Exam

Chapters 1 thru 3



Chapter 3 Coding

Try something different, lets work on problems 3.21 & 3.22 in class



Chapter 4

Chapter 4 Notes

Code for figure 4.9

  • compile with gcc -pthread
  • to run: ./a.out 5 should give you "sum = 15"
Zoom Recording of March 8th (working on chapter 3 stuff)
Zoom Recording of March 17th (Finish the pthread example & talk about Signals)

Chapter 5

Chapter 5 Notes

Solution to 4.22 for use in 5.39 -> compile with gcc -lpthread parallel.c -lm


Chapter 5 & Review

Finish Chapter 5


  • Chapter 4 Practice Exercises
  • Chapter 4 Homework Exercises
  • Chapter 5 Practice Exercises
  • 3 requirements for critical-section problem
  • pseudo code for a monitor -> 5.32
  • busy-waiting
  • tools for process synchronization - spinlock, semaphore, monitors, mutex locks, reader-writer, condition variables
  • 5.21
  • Read, really read the chapter while being able to Google.

Exam 2 & Chapter 6

Exam 2

Chapter 6 Notes


Chapter 7


Chapter 8 & 9

Chapter 8 Notes

Chapter 9 Notes


Chapter 10

Chapter 10 Notes


Chapter 11

Chapter 11 Notes


  Final Exam is Wednesday May 4th at 12:30 - 2:30 pm

Subject to change Assignments
How to submit:

To turn in the assignments, one option is to use FileZilla:

  1. Make sure portforwarding is turned on in your VirualBox
    1. Select Settings on the Virtual Box Manager window
    2. Select Network in the menu on the left
    3. Open the advanced drop down in the Adapter 1 tab on the right
    4. Click the Port Forwarding button
    5. It should have a rule for ssh
  2. Open up Filezlla
  3. Use:
    1. Host: sftp://
    2. Username: osc
    3. Password: osc
    4. Port:2222
  4. Then connect
  5. Select the directorys you want to copy from and copy to.
  6. Drag and drop files over, or double click
  7. Put your .c file in the proper assignment folder in D2L

You could also use the command line in windows and use SFTP

  1. Open a CMD window
  2. run the sftp command: sftp -P 2222 osc@
  3. enter password: osc
  4. drill over to the file you want to download
  5. run get, for example sftp>get simple.c
  6. this will put it in the directory you were sitting in when you started, probably your Users directory.

Due Date Description

HW-1 Due 2/5

Chapter 1 - 1.12, 1.14, 1.16, 1.17, 1.19, 1.20, 1.24, 1.25

HW-2 Due 2/15

Chapter 2 - Finish the last part of Introduction to Linux Kernal Modules where you get the timer rate. (for extra credit must be done by Thursday)

IV. Assignment in the Programming Projects section at the end of Chapter 2.

From the book:

This assignment will involve designing two kernel modules:

1. Design a kernel module that creates a /proc file named /proc/jiffies that reports the current value of jiffies when the /proc/jiffies file is read, such as with the command

cat /proc/jiffies

Be sure to remove /proc/jiffies when the module is removed.

2. Design a kernel module that creates a proc file named /proc/seconds that reports the number of elapsed seconds since the kernel module was loaded. This will involve using the value of jiffies as well as the HZ rate. When a user enters the command

cat /proc/seconds

your kernel module will report the number of seconds that have elapsed since the kernel module was first loaded. Be sure to remove /proc/seconds when the module is removed.

HW-3 Due 2/25

Chapter 3

Project 3 - Linux Kernel Module for Listing Tasks

This seems to be straight forward compared to the others and we discussed most of what you need already.


Chapters 4 & 5

Homework Quiz in D2L


Chapter 6, 7, 8

Homework Quiz in D2L


Chapter 9, 10, 11

Homework Quiz in D2L


Programming Problem 11.27
Program it in C, C++, or JavaScript
If JavaScript you'll just send me the URL
If C or C++ I have a drop box for it.