Skip to content

[ISSUE] Phase 4: Extended Memory Management, Process Control, Credentials, and POSIX Timers #282

Todo
0 of 3 issues completed

Description

@marcobuschini

Parent Epic

#265

Blocked By / Dependencies

#279 (Phase 1 — thread-group / SharedProcessState and signal foundations)

Problem Statement & Context

Allocators (glibc malloc, jemalloc, mimalloc), language runtimes, shells, and system utilities expect extended virtual memory control (mremap, madvise, msync, mincore, mlock*), richer process/scheduler/credential inspection (waitid, prctl, get/setpriority, sched_*, get/setresuid, get/setresgid, get/setgroups, capget/capset), and POSIX high-resolution clocks and interval/per-process timers (clock_getres, clock_nanosleep, get/setitimer, timer_create/settime/gettime/delete).

Scope & Technical Touchpoints

In Scope

  • Virtual memory: mremap (216), msync (227), mlock (228), munlock (229), mlockall (230), munlockall (231), mincore (232), madvise (233)
  • Process control, scheduling & credentials: capget (90), capset (91), waitid (95), sched_setparam (118), sched_setscheduler (119), sched_getscheduler (120), sched_getparam (121), sched_setaffinity (122), sched_getaffinity (123), setpriority (140), getpriority (141), setresuid (147), getresuid (148), setresgid (149), getresgid (150), getgroups (158), setgroups (159), prctl (167)
  • Clocks & timers: getitimer (102), setitimer (103), timer_create (107), timer_gettime (108), timer_getoverrun (109), timer_settime (110), timer_delete (111), clock_getres (114), clock_nanosleep (115)

Technical Touchpoints

  • kernel/mm/AddressSpace.hpp, kernel/mm/AddressSpace.cpp, kernel/syscalls/MemorySyscalls.cpp
  • kernel/process/Process.hpp, kernel/process/Process.cpp, kernel/syscalls/ProcessSyscalls.cpp
  • kernel/uapi/time.hpp, kernel/uapi/sys.hpp, kernel/syscalls/TimeSyscalls.cpp
  • kernel/syscalls/SyscallInternal.hpp, kernel/syscalls/SyscallDispatcher.cpp
  • tests/host/, kernel/shell/tests/

Out of Scope

  • gettimeofday (169, already implemented)
  • SMP multi-core migration (single-CPU affinity mask 0x1 suffices for QEMU uniprocessor baseline)

Split Verdict: SPLIT

Rationale: Memory management (kernel/mm/ + MemorySyscalls.cpp), process/credentials (kernel/process/ + ProcessSyscalls.cpp), and POSIX clocks/timers (kernel/time/ + TimeSyscalls.cpp) are cleanly orthogonal subsystems that should land as 3 independent subissues.

Subissues

Acceptance Criteria

  • mremap / madvise(MADV_DONTNEED) maintain strict VMA, PTE, and PFA refcount invariants with zero frame leaks
  • Process metadata, credentials, affinity, prctl, and waitid match Linux AArch64 LP64 ABI
  • clock_nanosleep, setitimer, and POSIX timer_* deliver accurate monotonic/realtime timing and signals
  • make format && make clean-tests && make -j"$(nproc)" all && make -j"$(nproc)" quality passes with zero warnings

Sub-issues

Sub-issues

0 of 3 Issues completed
Loading 3 sub-issues

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions