Edinboro University

CSCI 380 Operating Systems
Spring 2023


Week
Starting

 
1/16

Introduction to the course

Start Chapter 1 - Chapter 1 Notes

Look at the Practice Exercises

1/23

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.

 

1/30

Chapter 2 & 3

Chapter 2 Notes

 

2/6

Chapter 3

Finish Chapter 2, look at some problems

Bill of Rights sample text(for the filecopy example)

Chapter 3 Notes

Looks at some Practice Exercises

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

 

2/13

Review & Test

Review for Exam

Chapters 1 thru 3

 

2/20

Chapter 3 Coding

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

 


2/27

Chapter 3

More Coding and discussion
2/27

Spring Break

3/13

Chapter 4


Chapter 4 Notes
Chapter 5 Notes

Program to calculate simple stats without threads
Program to calculate simple stats using threads
Calculate PI with threads

Code for figure 4.9

  • compile with gcc -pthread
  • to run: ./a.out 5 should give you "sum = 15"
Old Class Video-> working on chapter 3 stuff
Old Class Video-> pthread example & talk about Signals
3/20

Chapter 5 & Review

Finish Chapter 5

Review

  • Chapter 4 Practice Exercises & Exercises (from on-line book)
  • Chapter 5 Practice Exercises & Exercises (from on-line book)
  • Read, really read the chapter while being able to Google.
3/27

Exam 2

Exam 2

  • Chapter 4 - Review
  • Chapter 5 - Review
  • Review Notes from class 1
  • Review Notes from class 2
  • Review Notes from class 3
  • Review Notes from class 4
  • For the homework problem with the round robin with quantum of 10 for part b. I got:
    P1 = 75
    P2 = 45
    P3 = 20
    P4 = 70
    P5 = 10
    P6 = 70

    If you got these answers you probably got the 1st part correct.
    4/3

    Chapter 6 & Chapter 7

    • Go over exam
    • Synchronization Tools: Chapter 6 Notes
    • Deadlocks: Chapter 7 Notes
    • Do some scheduling problems
    • 3 requirements for critical-section problem
    • busy-waiting
    • tools for process synchronization - spinlock, semaphore, monitors, mutex locks, reader-writer, condition variables
    4/10

    Chapter 8 & 9

    Chapter 8 Notes

    Chapter 9 Notes

    4/17

    Chapter 10

    Chapter 10 Notes

    Video from Thursday, we did some homework Problems
    4/24

    Chapter 11

    Chapter 11 Notes

    Video from Tuesday, we did some homework Problems
    Video from Thursday, we did the Homework Quiz Problems

    Review

      Final Exam is Tuesday May 4th at 10:00 - 11:50 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://127.0.0.1
      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@127.0.0.1
    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/3

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

    HW-2 Due 2/14

    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/23

    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.

    HW-4 Due 3/30

    Chapters 4 & 5

    Homework Quiz in D2L - Short answer questions

    HW-5

    Chapter 6, 7, 8

    Homework Quiz in D2L - Short answer questions

    HW-6

    Chapter 9, 10, 11

    Homework Quiz in D2L - Short answer questions

    Programming Project

    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.