S333 · SOURCE-BOUND GATE EVIDENCE
S333 · Scheduler-tick production writer guard integration
production acquire → S247 guard modülü → Operations-bound focused test Bu sayfa yalnız S333 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S333Production writer guardOperations id exactsource SHA exacttest target exact
operation: g8l-s333-scheduler-tick-writer-guard-integration-partial
production · S247 guard · focused test · Operations · 4 exact excerpt
sequence-bound=true · implementation-bound=true
01 · Test edilen uygulama/model kodu
Kapının yürüttüğü gerçek kaynak
tam Rust öğesiL4698–L4732
kernel/src/task/scheduler.rs::scheduler_tick
/// Timer IRQ'sundan çağrılır — **M3.4-real**: time slice biterse `yield_now`'u
/// doğrudan çağırır. Bug #3'ün eski endişesi (IRQ handler içinden
/// context_switch korruptionu) aslında geçerli değildi: her task'in kendi
/// kernel stack'i bir geçerli "unwind point" tutar (ya yield_now sonrası,
/// ya da rust_irq_handler sonrası → RESTORE_CONTEXT + eret), dolayısıyla
/// yield_now çağrısı task arasında doğru noktaya döner.
///
/// PSTATE.DAIF.I exception alındığında otomatik maskeli olduğu için
/// yield_now'un irq_lock'ı no-op (zaten maskeli, drop'ta yine maskeli kalır).
/// Trampoline `eret`'i SPSR_EL1'i restore eder → task code IRQ açık dönüş.
pub unsafe fn scheduler_tick() {
if crate::percpu::current_cpu_id() != 0 {
crate::arch::aarch64::timer::disable();
return;
}
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
let s333_writer_access = crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s333_scheduler_tick_writer_guard_integration::acquire_s333_production_scheduler_writer_access()
.unwrap_or_else(|error| panic!("S333 scheduler-tick writer guard failed closed: {:?}", error));
let sched = &mut *core::ptr::addr_of_mut!(SCHEDULER);
if sched.tick() {
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s333_writer_access);
// Time slice bitti → şu an, IRQ handler içinde, gerçek preemption.
yield_now();
} else {
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
drop(s333_writer_access);
}
// M4.4 Phase 1: Timer-driven VSync
// Her tick'te (100 Hz) VSync sayacını ilerletiyoruz.
// Gerçek sistemde bu, display controller VSync IRQ'sundan gelecek.
crate::ui::framebuffer_advance_vsync();
}snippet sha256: 393bc88d6f4b…file sha256: 838dd474448c…
02 · Ortak exclusion üyeliği
S247 production writer guard
tam Rust öğesiL148–L162
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s333_scheduler_tick_writer_guard_integration.rs::acquire_s333_production_scheduler_writer_access
/// Acquire from the exact static gate used by routed readers and prior
/// writers. `scheduler_tick` is a CPU0-only production boundary.
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
pub fn acquire_s333_production_scheduler_writer_access(
) -> Result<G8lS333ProductionSchedulerWriterAccess, G8lS247WholeSchedulerAccessError> {
let caller_cpu =
crate::percpu::try_current_cpu_id().ok_or(G8lS247WholeSchedulerAccessError::InvalidCpu)?;
if caller_cpu != crate::g8l_runtime_contract::CPU0 {
return Err(G8lS247WholeSchedulerAccessError::InvalidCpu);
}
let access = crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s246_whole_scheduler_read_access_guard::S247_PRODUCTION_WHOLE_SCHEDULER_ACCESS_GATE
.try_acquire_exclusive_for_valid_cpu(caller_cpu)?;
Ok(G8lS333ProductionSchedulerWriterAccess { _access: access })
}snippet sha256: 09ee3127b4ab…file sha256: d56cbf76146d…
03 · Doğrulayan test kodu
Operations komutuna bağlı focused test
tam Rust öğesiL203–L215
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s333_scheduler_tick_writer_guard_integration.rs::target_function_contains_one_scheduler_writer_one_guard_and_one_tick
#[test]
fn target_function_contains_one_scheduler_writer_one_guard_and_one_tick() {
let target = scheduler_tick_boundary();
assert_eq!(target.matches("addr_of_mut!(SCHEDULER)").count(), 1);
assert_eq!(
target
.matches("acquire_s333_production_scheduler_writer_access()")
.count(),
1
);
assert_eq!(target.matches("sched.tick()").count(), 1);
}snippet sha256: 3131aa745dff…file sha256: bf9169a69ace…
04 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL14371–L14424
website/src/lib/operations.ts::g8l-s333-scheduler-tick-writer-guard-integration-partial
{
id: "g8l-s333-scheduler-tick-writer-guard-integration-partial",
date: "2026-08-27",
sequence: 333,
status: "passed",
umbrella_status: "partial",
title: "S333 · Scheduler-tick production writer guard integration",
summary:
"S333, scheduler_tick içindeki tek mutable SCHEDULER yolunu CPU0-only timer-IRQ sınırında S332 ve 44 production reader'ın kullandığı aynı S247 state word'e bağlar. CPU0 dışı yol timer'ı disable edip writer membership'ten önce döner. Writer lease yalnız Scheduler::tick çağrısını kapsar ve koşullu yield_now writer'ından önce her iki dalda düşer. Guarded writer 6/69, açık writer 63 ve provider authority 0'dır. S245 request tüketilmez, S244 admission üretilmez.",
evidence: [
"Focused scheduler-tick writer-integration kapısı iki bağımsız koşuda 23/23 PASS: 138 B / SHA-256 f122e9cc07b84f4e0dc68de5a2501f5792124affb931a40c6b30da09f443d0c8.",
"Aynı S247 state word üzerinde CPU0-only writer membership, non-CPU0 pre-commit rejection, reader→writer ve writer→reader exclusion, exact-once commit/error release ve S332→S333 token monotonluğu doğrulandı.",
"Production kaynak sırası CPU kimliği → non-CPU0 timer disable/return → acquire_s333 writer → tek mutable alias → exact if sched.tick() kararı → iki dalda writer drop → yalnız true dalında ayrı yield_now writer'ı olarak kilitlendi. Tarihsel S295 tick semantiği korundu.",
"QEMU, RPi4, RPi5 ve RPi5+SMP AArch64 compile profilleri exit 0 verdi; warning header'ları 292/390/1124/1124, zero-warning iddiası yoktur.",
"Operations komut haritasından türetilen S238–S333 matrisi iki bağımsız koşuda 97 grup / 1417/1417 PASS; süre-normalize çıktılar 12667 B / SHA-256 33cd7c722a11760c5f1034fea9ede98f25664f968918a3520a5b6eee6030bc91 ile byte-eşittir.",
"Exact yedi tarihsel G8h assertion adı dışlanıp kayıtlı --test-threads=1 kabulü kullanıldığında tam workspace iki koşuda 295 sonuç grubu / 3239 PASS / 0 fail / 7 filtered verdi; süre-normalize sonuç özetleri 28201 B / SHA-256 6ab69130aef472ccc24a45b025af5a26906c3398d0338c99ea5a6f4ef01d33be ile byte-eşittir. Filtresiz seri audit yalnız frozen S96 exceptions.S identity kapısında RED kaldığı için global workspace GREEN iddia edilmez.",
"S331'den açık taşınan default-parallel PTY determinism seri S333 kabulüne katılmadı ve kapanmış sayılmadı.",
"make verify-qemu iki bağımsız PASS verdi: strict ELF W^X 31/31 ve aynı 1551 B / SHA-256 527ef12c2bc56140e14e13be445f78c8e38872febc9849afcfacd499238ff966 smoke özeti korundu. Bu ortak regresyon board-rpi5-only S333 scheduler_tick writer invocation kanıtı değildir.",
"Yerel website 512/512 test ile PASS; lint, boş çıktılı TypeScript kontrolü ve 23/23 static route ayrıca geçti. S333 kaydı yereldir ve deployment yapılmadı.",
"S245 request ve S244 admission dokunulmadan kalır; production provider authority=0, whole-scheduler exclusion=false, yield_now ayrı açık writer'dır ve toplam 63 production writer açık kalır.",
"Fiziksel/device işlem yapılmadı: physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S333=NO.",
],
commands: [
"cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s333_scheduler_tick_writer_guard_integration -- --test-threads=1",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5",
"cargo check -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5,smp",
"cargo test --workspace --quiet -- --test-threads=1 [seven exact historical --skip filters]",
],
terminalSessions: [
{
id: "g8l-s333-scheduler-tick-writer-guard-integration",
title: "G8l S333 scheduler-tick writer guard integration",
commandLines: [
"cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s333_scheduler_tick_writer_guard_integration -- --test-threads=1",
],
outputLines: [
"test result: ok; S333 focused 1 group / 23 passed; 0 failed",
"shared S247 gate: 44 guarded readers + 6/69 guarded writers; 63 writers open",
"CPU0-only tick lease released before separate yield_now writer; provider authority=0",
],
exitCode: 0,
outputMode: "complete",
},
],
terminalSessionsNote:
"S333 altıncı production writer'ın kaynak entegrasyonudur; supported RPi5 timer yolu scheduler_tick'i runtime'da çağırmadığı için cihaz gözlemi ve global exclusion oluşmadı.",
limitations: [
"63 production writer aynı shared gate dışında kaldığı için whole-scheduler exclusion ve provider authority açık kalır.",
"yield_now ayrı bir açık writer sınırıdır; S333 lease'i olası context switch'ten önce bilinçli olarak düşer.",
"Default-parallel PTY determinism S331'den açık taşınır; kayıtlı seri kabul geçti.",
"Supported-profile scheduler_tick invocation, Generic SMP ve fiziksel RPi kabulü açık kalır.",
"Yerel web doğrulaması deployment değildir; canlı site bu değişiklikle güncellenmemiştir.",
],
},snippet sha256: 7e75c38369b4…file sha256: 9726dbf00f84…
Focused test komutu
cargo test -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s333_scheduler_tick_writer_guard_integration -- --test-threads=1proof: docs/M8.1-RPi5-G8l-S333-Scheduler-Tick-Writer-Guard-Integration-Proof.md
Registry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 3050638b71a684d8f8f947a8a6faa237a17fa8db5dc0db04fb207b668b462af9