[FEATURE] Support full configurable preemption for Alpha 1 #129

Open
opened 2026-11-12 22:27:53 +01:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Kernel and userspace execution must be involuntarily reschedulable while cooperative operation remains supported.

Proposed behavior and scope

Implement the Alpha 1 scope in kernel, IPC and process services. Follow the published Phase 6 requirements. Later-phase extensions remain separate.

Authority, security and reliability

Preserve explicit authority, original identity and resource custody across failure, cancellation and revocation. Apply security, reliability, then performance; names and observations must not create authority.

Acceptance criteria

  • With sched_preempt enabled, timer interrupts reschedule CPU-bound userspace and kernel execution outside explicitly protected critical sections.
  • Defer preemption safely inside critical sections and service pending rescheduling promptly afterward; audit bounded interrupt-disabled and non-preemptible work.
  • Preserve complete architectural state, TLS, CPU ownership and resource lifetimes; never execute one thread on two CPUs.
  • Document quantum/policy and demonstrate a dispatch-delay bound, ordinary-thread progress and cross-core wakeups under controlled load.
  • With sched_preempt disabled, cooperative operation retains the same authority/isolation guarantees.
  • Pass both configurations on actual x86-64 QEMU/OVMF release images with 1, 2 and 4 vCPUs, including fault injection and repeated contention.

Alternatives and tradeoffs

Extend existing mechanisms where possible. Models and authored tests support the work but do not replace required original release-image evidence.

Tracking and rollout

Required by the Alpha 1 microkernel gate alongside the complete self-hosting gate. Link implementation PRs and dependencies here as they are established.

## Problem and motivation Kernel and userspace execution must be involuntarily reschedulable while cooperative operation remains supported. ## Proposed behavior and scope Implement the Alpha 1 scope in kernel, IPC and process services. Follow the [published Phase 6 requirements](https://git.erikinkinen.fi/erix/docs/src/branch/main/phases/6.md). Later-phase extensions remain separate. ## Authority, security and reliability Preserve explicit authority, original identity and resource custody across failure, cancellation and revocation. Apply security, reliability, then performance; names and observations must not create authority. ## Acceptance criteria - [ ] With sched_preempt enabled, timer interrupts reschedule CPU-bound userspace and kernel execution outside explicitly protected critical sections. - [ ] Defer preemption safely inside critical sections and service pending rescheduling promptly afterward; audit bounded interrupt-disabled and non-preemptible work. - [ ] Preserve complete architectural state, TLS, CPU ownership and resource lifetimes; never execute one thread on two CPUs. - [ ] Document quantum/policy and demonstrate a dispatch-delay bound, ordinary-thread progress and cross-core wakeups under controlled load. - [ ] With sched_preempt disabled, cooperative operation retains the same authority/isolation guarantees. - [ ] Pass both configurations on actual x86-64 QEMU/OVMF release images with 1, 2 and 4 vCPUs, including fault injection and repeated contention. ## Alternatives and tradeoffs Extend existing mechanisms where possible. Models and authored tests support the work but do not replace required original release-image evidence. ## Tracking and rollout Required by the [Alpha 1 microkernel gate](https://git.erikinkinen.fi/erix/integration/issues/207) alongside the [complete self-hosting gate](https://git.erikinkinen.fi/erix/integration/issues/65). Link implementation PRs and dependencies here as they are established.
erikinkinen added this to the Alpha 1 milestone 2026-11-12 22:27:53 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/kernel#129
No description provided.