Skip to content

P18 sched#28

Open
Amber-Agarwal wants to merge 74 commits intocodenet:p4-trapsfrom
Amber-Agarwal:p18-sched
Open

P18 sched#28
Amber-Agarwal wants to merge 74 commits intocodenet:p4-trapsfrom
Amber-Agarwal:p18-sched

Conversation

@Amber-Agarwal
Copy link
Copy Markdown

Implements p18-sched on top of p17-free-space by adding timer-driven round-robin scheduling and two-way context switching.

Changes

  • Re-enabled LAPIC timer interrupts.
  • Updated swtch to swtch(old, new) and implemented save/restore of callee-saved registers.
  • Scheduler now switches with swtch(&c.scheduler, p.context) so control can return back to scheduler.
  • Added sched() and yield():
    • yield() marks current process RUNNABLE
    • sched() switches from process context back to scheduler context
  • Trap path now calls yield() on timer ticks when current process is RUNNING.
  • Trap default case now panics only for kernel-mode unexpected traps.

Validation

  • cargo build --target targets/i686.json succeeds.

Dependency / credit

  • Built on top of branch p17-free-space.
  • Reuses prior p16-tss process/TSS setup as the scheduling foundation.

ahilaan and others added 30 commits February 14, 2026 07:52
- Added src/mkfs.rs: pure Rust mkfs tool (based on sudoheckbeluga's
  work in PR codenet#5), adapted with FSSIZE=1000 and LOGSIZE=0 to match
  the C repo's p9-name-layer branch. No more ../col331/ dependency.
- Updated Makefile: mkfs now compiled with rustc from src/mkfs.rs
- Added name layer functions in src/fs.rs: irelse, namecmp,
  dirlookup, skipelem, namex, namei, nameiparent
- Updated welcome() in src/lib.rs to use namei("/welcome.txt")
- Added src/mkfs.rs: pure Rust mkfs tool (based on sudoheckbeluga's
  work in PR codenet#5), adapted with FSSIZE=1000 and LOGSIZE=0 to match
  the C repo's p9-name-layer branch. No more ../col331/ dependency.
- Updated Makefile: mkfs now compiled with rustc from src/mkfs.rs
- Added name layer functions in src/fs.rs: irelse, namecmp,
  dirlookup, skipelem, namex, namei, nameiparent
- Updated welcome() in src/lib.rs to use namei("/welcome.txt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants