Skip to content

A complete companion for CSE321 Operating Systems. Features hands-on C/Bash labs (IPC, Synchronization) and kernel projects like xv6 Lottery Scheduling and VSFS Journaling. Includes essential academic resources—theory assignments, topic-wise practice sheets, and past exams—to bridge the gap between concepts and code.

Notifications You must be signed in to change notification settings

fah-ayon/Operating-Systems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSE321 - Operating Systems

This repository contains course materials, lab work, assignments, and exam preparation resources for CSE321: Operating Systems.

Repository Structure

Theory Assignments

Contains coursework assignments:

  • Theory Assignment 1 - Research and Explore the CPU allocation fairness issues of Multi-Level Feedback Queue (MLFQ) CPU Scheduling Algorithm by analyzing key areas
  • Theory Assignment 2 - Research and Explore the limitations of standard Unix file permissions and the necessity of Extended Access Control Lists (ACLs) by analyzing key areas

Lab

Comprehensive lab exercises and projects covering core OS concepts:

Lab Work by Session

  • Lab 1 - Process management (fork, exec, file I/O, zombie processes)
  • Lab 2 - Shell scripting (bash scripts, variables, expressions)
  • Lab 3 - Synchronization mechanisms:
    • Semaphores (sem_init, sem_wait, sem_post, sem_destroy)
    • Mutexes (pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock, pthread_mutex_destroy)
    • Counted and binary semaphores
    • Mutual exclusion and coordination
  • Lab 4 - Inter-process communication:
    • Key Generation
    • Message Passing
    • Pipes (Unidirectional & Bidirectional)
    • Shared Memory
    • Practice Problems
  • Lab 5 - xv6 Operating System:
    • xv6-riscv implementation
    • Kernel modifications
    • System call implementation
  • Lab 6 - Online lecture

Lab Assessments

Lab assessment practice questions and materials:

  • Lab Assessment 1 [Practice] - C programming fundamentals:

    • Number comparisons, prime checkers
    • String manipulations (palindrome, password validator)
    • File operations and text processing
  • Lab Assessment 2 [Practice] - Advanced process and thread management:

    • Fork and process creation
    • File operations with processes
    • pthread implementation
    • Mutex and synchronization
    • Multi-threading exercises

Note: This folder contains practice questions for lab assessments.

Lab Assignments

  • Lab Assignment 1 - Multithreading and synchronization problems:
    • Problem 1: Multithreaded Fibonacci computation and search using dynamic memory allocation and thread communication
    • Problem 2: Sandwich Maker synchronization problem using mutex locks and semaphores (supplier-consumer pattern with three makers)
  • Lab Assignment 2 - Lottery Scheduler implementation in xv6
    • Repository: Lottery-Scheduler-xv6
    • Implementation of lottery scheduling algorithm for CPU scheduling in xv6 operating system

Project

Course project - MetaData Journaling in VSFS:

  • Repository: MetaData-Journaling-VSFS
  • File system journaling implementation
  • Metadata journaling for crash consistency
  • VSFS (Very Simple File System) modifications
  • Files: journal.c, mkfs.c, validator.c

Practice Sheet

Topic-wise practice problems organized by key OS concepts:

  1. Process - Process creation, management, and lifecycle
  2. Threads - Multi-threading and thread management
  3. CPU Scheduling - Scheduling algorithms and policies
  4. Process Synchronization - Mutexes, semaphores, deadlocks
  5. File Systems - File management and storage
  6. Memory Management - Virtual memory, paging, segmentation

Previous Questions

Past exam questions organized by semester and exam type:

Midterm (MID)

  • Fall 2024 Midterm
  • Spring 2025 Midterm
  • Summer 2025 Midterm

Final

  • Fall 2024 Final Questions
  • Spring 2025 Final
  • Summer 2024 Final Questions
  • Summer 2025 Final

Quizes

Quiz materials organized by section:

  • NTR - Quiz materials
  • RHD - Quiz materials (MID and FINAL sections)

Technologies & Tools

  • Languages: C, Shell Script (Bash)
  • Systems: xv6-riscv (educational operating system)
  • Concepts: Process management, threading, IPC, memory management, file systems

Key Topics Covered

  • Process creation and management (fork, exec)
  • Inter-process Communication (pipes, message queues, shared memory)
  • Thread programming (pthreads)
  • Synchronization primitives (mutex, semaphores)
  • CPU scheduling algorithms
  • Memory management
  • File systems
  • Operating system design (xv6)

Getting Started

Prerequisites

  • GCC compiler
  • Make build system
  • QEMU (for xv6 emulation)
  • Linux/Unix environment or WSL on Windows

Compiling C Programs

gcc filename.c -o output
./output

Running Shell Scripts

chmod +x script.sh
./script.sh

Working with xv6

You will need the original xv6-riscv source code as a base:

cd Lab/Lab 5/Lab Works/xv6-riscv/
make qemu

Notes

  • Some directories are excluded from version control (see .gitignore)
  • Lab 5 contains the xv6 operating system implementation
  • Practice problems are available for each major topic

Course Information

  • Course Code: CSE321
  • Course Title: Operating Systems
  • Last Updated: January 2026

Author

Abdullah Al Fahad

LinkedIn Email GitHub


This repository serves as a comprehensive resource for learning and practicing operating system concepts.

About

A complete companion for CSE321 Operating Systems. Features hands-on C/Bash labs (IPC, Synchronization) and kernel projects like xv6 Lottery Scheduling and VSFS Journaling. Includes essential academic resources—theory assignments, topic-wise practice sheets, and past exams—to bridge the gap between concepts and code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published