← Back to Projects
Completed

Barstool Scheduler

A Linux kernel module implementing a bar simulation with waiters, customers, tables, and waiting queues using kthreads and system calls.

Started: March 2023Released: March 2023

About This Project

Barstool Scheduler is a multi-part Linux kernel programming project developed as part of an Operating Systems course. The project demonstrates low-level systems programming concepts including custom system call implementation, kernel module development, and concurrent programming with kernel threads.

The implementation features a bar simulation where customers (categorized as Freshman, Sophomore, Junior, Senior, or Professor) arrive and are seated at tables with 8 seats each. A waiter thread manages table assignments, tracks drink consumption times, cleans tables, and processes a waiting queue using a custom linked list implementation. The project exposes state information through the /proc filesystem.

The project consists of three parts:

  • Part 1 covers system-call tracing with strace,
  • Part 2 implements a timer kernel module using procfs,
  • Part 3 brings together the full barstool scheduler with custom system calls (initialize_bar, customer_arrival, close_bar), mutex synchronization, and kthread management.

Tech Stack

CLinux Kernel APIProcfsKthreadsMutexMake