Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

License

NotificationsYou must be signed in to change notification settings

RohitPatidar123-hub/xv6-signals-scheduler-os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

🔹 Scheduler Profiler

  • Reports per-process:
    • Turnaround Time (TAT)
    • Waiting Time (WT)
    • Response Time (RT)
    • Context Switches (#CS)

🔹 Priority Boosting Scheduler

  • Dynamic priority model:
    πi(t) = πi(0) − α·Ci(t) + β·Wi(t)

yamlCopyEdit

  • Avoids starvation by boosting waiting processes.
  • Tunable parametersα, β set in Makefile.

⚙️ Implementation Details

  • 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

  1. Clone xv6 repository with this project code.
  2. 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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp