SchOS/kernel/sys
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz c1af31f75a smp: 64 processors, and say how many there are
NCPU was 16, under what a desktop has today. 64 costs 48 more TSS
I/O bitmaps and scheduler stacks, about 800 KB of BSS. Past 254 the
APIC would need x2APIC mode, which is a separate change.

With more than 16 there were two other ceilings. sched_getaffinity
wrote "CPU 0" and returned 0, and musl clears every byte past the
count returned -- so the mask came back empty and nproc, make -j and
sysconf(_SC_NPROCESSORS_ONLN) all said 1, on any machine. It returns
the mask of processors that started, and its size, now. And /proc
rendered every file into 2 KB, which /proc/cpuinfo ran out of at the
eighteenth processor without a word; /proc/pci, /proc/interrupts and
/proc/mounts were each one bigger machine from the same cut. There is
one 64 KB buffer for it now behind a sleeplock, since there is no
allocator for contiguous pages, and the generators that write raw
are given the real capacity instead of a constant.

Checked under QEMU with -smp 24: nproc 24, /proc/cpuinfo whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
2026-10-23 13:50:08 +02:00
..
linux_abi.c licence: SchOS is GPL-2.0-or-later, no longer Apache-2.0 2026-10-22 08:48:45 +02:00
sys_compat.c fs: inode and open-file tables that grow, with a hash for iget 2026-10-23 13:39:14 +02:00
sys_fs.c fs: inode and open-file tables that grow, with a hash for iget 2026-10-23 13:39:14 +02:00
sys_mem.c exec: Linux's 2 MB of arguments; mmap: merge neighbouring mappings 2026-10-23 13:20:29 +02:00
sys_net.c unix: a bound socket is a file 2026-09-22 10:06:10 +02:00
sys_poll.c kernel: the clock ran 7x slow because the GPU never acknowledged its interrupt 2026-09-12 21:34:36 +02:00
sys_proc.c smp: 64 processors, and say how many there are 2026-10-23 13:50:08 +02:00
sys_sig.c signal: the return trampoline was Linux-only, and a test that proves the rest 2026-09-21 23:56:34 +02:00
sys_time.c kernel: the clock ran 7x slow because the GPU never acknowledged its interrupt 2026-09-12 21:34:36 +02:00
syscall.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
table.inc memfd: a shared memory object you reach by descriptor 2026-09-22 09:47:31 +02:00