-
Notifications
You must be signed in to change notification settings - Fork 1
VMem, sched, race condition #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Caution Review failedThe pull request is closed. WalkthroughThis update refactors core kernel components, focusing on virtual memory management, process scheduling, and panic handling. It introduces stricter address validation, corrects spinlock usage, and enhances error handling in memory operations. The scheduler logic is revised for accurate preemption and process state management. Boolean type definitions are standardized, and CPU halting is enforced on kernel panics. Changes
Sequence Diagram(s)sequenceDiagram
participant Timer as Timer Interrupt
participant Scheduler as FastSchedule
participant Proc as Process
participant Queue as Scheduler Queue
Timer->>Scheduler: Invoke FastSchedule(regs)
Scheduler->>Proc: Check current process state
alt Process dying/zombie/terminated
Scheduler-->>Scheduler: Skip context save, do not re-queue
else Healthy process
Scheduler->>Proc: Save CPU context
Scheduler->>Proc: Decrement quantum
alt Quantum expired or higher-priority process exists
Scheduler->>Queue: Demote priority, mark ready, re-queue
Scheduler->>Queue: Select next process
else
Scheduler-->>Proc: Continue running
end
end
Scheduler->>Proc: Switch to next process (if any)
Scheduler->>Scheduler: Update current_running/current_process
sequenceDiagram
participant Kernel as Kernel
participant Panic as Panic Handler
participant CPU as CPU
Kernel->>Panic: Panic or PanicWithCode invoked
Panic->>Panic: Print error, call handler/reboot
Panic->>CPU: Enter infinite hlt loop
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
Bug Fixes
New Features
bool
,true
, andfalse
macros.Improvements