You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Implementation of signal handling and custom scheduling in xv6. Features include signal delivery (SIGINT, SIGBG, SIGFG, SIGCUSTOM), a new process creation model with custom_fork and scheduler_start, a scheduler profiler for turnaround/waiting/response times, and a dynamic priority boosting scheduler with tunable α, β parameters.
Implementation of signal handling and custom scheduling in xv6. Features include signal delivery (SIGINT, SIGBG, SIGFG, SIGCUSTOM), a new process creation model with custom_fork and scheduler_start, a scheduler profiler for turnaround/waiting/response times, and a dynamic priority boosting scheduler with tunable α, β parameters.
xv6 Signals and Scheduler Project
📌 Overview
This project extends the xv6 operating system to enhanceprocess management through:
Signal handling for keyboard interrupts (Ctrl+C/B/F/G).
Acustom scheduler with new system calls.
Ascheduler profiler to measure performance metrics.
Apriority boosting scheduler with tunable parameters.
It demonstrateslow-level systems programming, OS kernel modification, and performance optimization.
🚀 Features Implemented
🔹 Signal Handling in xv6
Ctrl+C → SIGINT : Kills user processes (pid > 2).
Ctrl+B → SIGBG : Suspends user processes.
Ctrl+F → SIGFG : Resumes suspended processes.
Ctrl+G → SIGCUSTOM : Invokes registered user-space signal handler if available.
🔹 Custom Scheduler Extensions
custom_fork(start_later, exec_time)
Creates a process with deferred execution and limited run-time.
scheduler_start()
Starts execution of all processes created withstart_later = true.
Modified kernel files:proc.c,proc.h,syscall.c,trap.c, etc.
Added system calls for signals and custom scheduling.
Updated keyboard interrupt handler to generate signals.
Integrated profiling counters into process structures.
Implemented dynamic priority evaluation in the scheduler loop.
🧪 Testing
CPU-bound Fibonacci test for signal handling.
Parent-child processes for background/foreground control.
Scheduler profiler validation using controlled workloads.
Priority boosting effects compared for CPU-bound vs I/O-bound tasks.
▶️ How to Run
Clone xv6 repository with this project code.
Build and run inside QEMU:
make cleanmake qemuRuntest programs (test1, test2, test_sched) to validate functionality.Observe kernel logsfor profiler and priority outputs.📊 ResultsVerified correct signal handling (Ctrl+C/B/F/G).Scheduler profiler reports consistent metricsfor TAT, WT, RT,#CS.Priority boosting prevents starvationin I/O-heavy workloads.
About
Implementation of signal handling and custom scheduling in xv6. Features include signal delivery (SIGINT, SIGBG, SIGFG, SIGCUSTOM), a new process creation model with custom_fork and scheduler_start, a scheduler profiler for turnaround/waiting/response times, and a dynamic priority boosting scheduler with tunable α, β parameters.