CS370: Operating Systems


red-line
[Schedule] [Assignments] [Grading] [Syllabus] [Infospaces] [Canvas] [Home]

Assignments

All assignments are due at 8:00 PM on the due date. There is a late penalty of 10% per-day for up to a maximum of 2 days. All assignments will be posted at least 2 weeks prior to its due date. We will have a mix of both written and programming assignments. All assignments will be posted on this page.

All assignments should be submitted using Canvas.

Release  Due Date
  HW1 22-Aug 6-Sep

  HW2 30-Aug 20-Sep

  HW3 6-Sep 27-Sep

  HW4 20-Sep 11-Oct

  HW5 11-Oct 8-Nov

  Term Project TP-D1 13-Sep

TP-D2 18-Oct

TP-D3 6-Dec
HW-Extra Credit 16-Oct 1-Nov



Assignment 1: Memory Allocations/deallocations and Avoiding Resource Leaks

The objective of this assignment is a simple refresher on memory allocations and deallocations using C while avoiding resource leaks. This assignment will account for 5 points towards your final course grade. Additional details are available here.


The skeleton files are available here.


Some helpful Infospaces videos for this assignment:

Hello World in C: https://infospaces.cs.colostate.edu/watch.php?id=268
Makefile for C Programs: https://infospaces.cs.colostate.edu/watch.php?id=269
Run Script for C Programs: https://infospaces.cs.colostate.edu/watch.php?id=273
Arrays in C: https://infospaces.cs.colostate.edu/watch.php?id=271
Remote SSH Using VS Code: https://infospaces.cs.colostate.edu/watch.php?id=272












Assignment 2: Fork(), exec(), and wait() System Calls

The objective of this assignment is to get you to use the fork(), exec(), and wait() system calls on Unix. This assignment will account for 5 points towards your final course grade. Additional details are available here.


Some helpful Infospaces videos for this assignment:
https://infospaces.cs.colostate.edu/watch.php?id=277
https://infospaces.cs.colostate.edu/watch.php?id=276













Assignment 3: InterProcess Communications using Shared Memory and Pipes

The objective of this assignment is to get you to be comfortable with Shared Memory and Pipes for Inter Process Communications on Unix. This assignment will account for 5 points towards your final course grade. Additional details are available here. 

Some helpful Infospaces videos for this assignment:
Pipes in C: https://infospaces.cs.colostate.edu/watch.php?id=279.
Shared Memory in C: https://infospaces.cs.colostate.edu/watch.php?id=280













Assignment 4: Concurrency Control Using Threads

This is an assignment on concurreny control using Threads to solve the producer-consumer problem with a bounded buffer. This assignment will account for 10 points towards your final course grade. Additional details are available here. 














Assignment 5: CPU Scheduling Algorithms

The objective of this assignment is to get you comfortable with different CPU scheduling algorithms. You will be implementing multiple scheduling algorithms some with support for preemption while tracking measures of scheduling effectiveness.


Additional details are available here.


C++ Makefile is available here, feel free to remove compile flags or use gcc if you're compiling a C project.

If your project has more than just a Schedule.cc file, you will need to adjust the Makefile to link them together.

Included here is a testing input file of processes.

For this testing file, you should be getting the following output:

--- FCFS ---
Average Turnaround Time: 1098.400
Average Waiting Time: 1075.100
Throughput: 0.043

--- SJFP ---
Average Turnaround Time: 692.190
Average Waiting Time: 668.890
Throughput: 0.043

--- Priority ---
Average Turnaround Time: 1036.090
Average Waiting Time: 1012.790
Throughput: 0.043

Note: Your Priority and SJFP output *might* vary slightly due to how you're breaking ties between equal priorities and remaining burst times respectively.

You should be building a Gantt chart on paper with simple examples (~5 processes), doing the math by hand, then verifying that your code produces the same results before you try to run your code on 100+ process inputs.

 

Here's an easy sample input for FCFS to verify by hand:

1,0,3,5
2,2,4,2
3,3,1,3
4,8,3,4
5,10,4,1

You should be getting this output:

--- FCFS ---
Average Turnaround Time: 4.200
Average Waiting Time: 1.200
Throughput: 0.333

--- SJFP ---
Average Turnaround Time: 3.600
Average Waiting Time: 0.600
Throughput: 0.333

--- Priority ---
Average Turnaround Time: 5.400
Average Waiting Time: 2.400
Throughput: 0.333











Term Project:Experimentations with the Raspberry Pi

The term project component of the course requires you to leverage the Raspberry Pi. The project involves multiple deliverables to ensure that you are making sustained progress on your term project throughout the semester.  The term project will account for 10 points towards your final course grade.  Additional details about this term project are available here.


Due dates:
TP-D1 due 9/13/2023 [1 point]
TP-D2 due 10/18/2023 [2 points]
TP-D3 due 12/6/2023 [7 points]









Extra Credit: Resource & Activity Profiling For a Process

This assignment targets resource and activity profiling for processes. This assignment will contribute 2 points towards your overall course grade. You should attempt this extra credit assignment ONLY after you have successfully wrapped up HW5 (which accounts for 10% of your course grade) and are looking for a challenge. Additional details are available here. The 2-day late submission window is not available for this assignment.

A couple of helpful Infospaces videos have been created for this assignment:

File I/O video:  https://infospaces.cs.colostate.edu/watch.php?id=295

Page Faults video:  https://infospaces.cs.colostate.edu/watch.php?id=298























Department of Computer Science, Colorado State University,
Fort Collins, CO 80523 USA
© 2023 Colorado State University