-
-
Notifications
You must be signed in to change notification settings - Fork 5
Process Management
Kazah edited this page Jul 5, 2026
·
8 revisions
Preemptive weighted round-robin scheduler. Fixed process table (64 entries).
See also: Architecture, Syscalls, Userspace, SMP, Memory Management, Shell
PROC_RUN → PROC_BLOCKED → PROC_ZOMBIE → PROC_EMPTY
- Each process has
sched_weight(1–64) andsched_quantumcountdown - PIT fires at 1000 Hz; ticks decrement quantum, switch when quantum hits 0
- Compositor gets weight 4 for responsive GUI
-
nice/reniceset job weights from the Shell
Created via create_task(func, stack). Run in ring 0 with kernel PML4.
Ring 3 with own PML4. Lifecycle: spawn → schedule → exit → reap. See Userspace.
-
kwait(pid): block until child exits -
sleep(ms): block withwake_tick, scheduler wakes on timer tick -
cli;hltyield pattern ensures atomic check-then-sleep
preempt_disable/enable guards kmalloc, kfree, EXT2 ops, VFS node pool.
See SMP for multi-core scheduling (future: per-CPU run queues).
NyxOS v6.4.363 · GPL v2 · GitHub · uselessalter on Discord · nyxos@inbox.lv
NyxOS Wiki
Getting started
Kernel
Storage & network
Graphics & apps
Userspace
HOWTO
- HOWTO-Add-a-system-call
- HOWTO-Write-a-userspace-program
- HOWTO-Add-a-shell-command
- HOWTO-Add-a-GUI-application
Reference
- Syscall-Reference
- Command-Reference
- Hardware-Reference
- Format-Reference
- Kernel-Data-Structures
- Source-Tree-Reference
Project