This homework assignment is about managing system expectations, processes, and scheduling! You are going to be programming the heart of an operating system: the scheduler!
The sections below give you direct and indirect help with organizing your thoughts about scheduling, batch systems, interactive systems, and real-time systems.
In "The Rust Language Book" read:
These chapters will help with familiarizing yourself with the type of data structures you will be working with in the programming assignment.
Read Chapter 3: Scheduling (Page 45-92) from our course textbook. Its provides a great overiew of the concerns, concepts, and algorithms for scheduling in operating systems. Whilst it specifies thread scheduling, the concepts are applicable to process scheduling as well.
Operating Systems and Middleware: Supporting Controlled Interaction
This programming assignment is about implementing a scheduler for pizza orders in Rust!
Your repository will contain the following files:
CMSI-3510-HW3/
āāā .gitignore
āāā hot_pie_tato/
ā āāā Cargo.toml
ā āāā Cargo.lock
ā āāā src/
ā āāā edf.rs
ā āāā fcfs.rs
ā āāā lib.rs
ā āāā lottery.rs
ā āāā main.rs
ā āāā order.rs
ā āāā round_robin.rs
ā āāā scheduler.rs
ā āāā sjf.rs
ā āāā visualization.rs
āāā README.md
Need a refresher on how to interact with the HW for this course? Watch the helper video posted to Zoom via the link below!
You can find the GitHub Classroom assignment link and the Brightspace turn in link using the buttons at the top of this section.
In this optional section you'll take what you learned about scheduling in HW3 and apply it somewhere new! "Scheduling" doesn't only show up in operating systems ā the priority queues, event loops, and fairness questions you wrestled with for hot_pie_tato show up in elevator dispatchers, build systems, container orchestrators, ride-share apps, and beyond.
Pick one of the project ideas below (or pitch your own!), follow its starter article to get oriented, and then build it out in your own empty repo.
Discrete-event simulator for a new domain. Reuse the priority-queue / event-loop muscle from HW3 to model something other than a kitchen ā an elevator dispatcher serving a multi-floor building, a hospital triage queue, a ride-share dispatcher matching drivers to riders. Implement at least two scheduling policies and compare.
cron-style job runner. Build a CLI that reads a list of jobs (each with a schedule and a shell command), parses cron-style expressions, and runs them at the right times. A small but very real systems tool.
Toy Kubernetes-style pod scheduler. Given a list of "pods" (each with CPU and memory requests) and a list of "nodes" (with capacities), implement a scheduler that places pods onto nodes. Try at least two strategies (e.g., first-fit vs. best-fit) and a constraint like anti-affinity.
Add new algorithms to your HW3 framework. Implement Multi-Level Feedback Queue (MLFQ) and/or the Completely Fair Scheduler (CFS) on top of hot_pie_tato's scheduler trait. Run them against the same workloads as the built-in algorithms and write up the differences.
Bring your own. Anything where the central interesting question is "in what order should we do these things, and why?" works. Pitch it in your README.
Whichever idea you pick, your repo must include:
cargo test. At least one of those tests should compare the behavior of two different scheduling policies on the same workload.README.md explaining what you built, which starter article you used, and a brief write-up (a few paragraphs) of what you observed when comparing policies.I have made an empty Github assignment for you to pull and create your Rust project from scratch (This is out of convenience so that I can use Github classroom to collate all your projects rather than go through being added to all the repos). Feel free to architect your project as you choose.
Since the repository is private, feel free after you are done to copy it over into a public repository to show off on your Github!
Earning points in this optional is not as rigid since you may pick your own project. With that said, to earn full points you must:
README.md that names your starter article, describes what you built, and includes a short write-up comparing the policies you implemented.cargo test.Below is the button that links to the Github Optional Assignment repository. The Brightspace submission link is at the top of this section.