Difference between revisions of "Kernel"

From 3dbrew
Jump to navigation Jump to search
(Start the page to connect some relevant wiki pages with each other.)
 
(Pathetic start of documenting the kernel scheduler, but somebody's gotta do it. Feel free to confirm and improve!)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The kernel is the core of the operating system(s) running on the ARM9 and ARM11 CPUs. Among other things, It is responsible for memory management, access control, and process scheduling. It furthermore provides userland applications with fundamental functionality like memory allocation, multithreading, and interprocess communication.
+
The kernel is the core of the operating system(s) running on the ARM9 and ARM11 CPUs. Among other things, it is responsible for memory management, access control, and process scheduling. It furthermore provides userland applications with fundamental functionality like [[Memory_Allocation|memory allocation]], [[Multi-threading|multithreading]], and [[IPC|interprocess communication]].
  
 
The kernel is part of the [[FIRM|system firmware]] and as such is initialized during the [[Bootloader|boot procedure]].
 
The kernel is part of the [[FIRM|system firmware]] and as such is initialized during the [[Bootloader|boot procedure]].
  
The functionality provided by the kernel to userland applications is exposed via [[SVC|supervisor calls]]. Internally, the implementation of this ABI uses an object-oriented hierarchy of [[Category:Kernel_objects|objects]].
+
The functionality provided by the kernel to userland applications is exposed via [[SVC|supervisor calls]]. Internally, the implementation of this ABI uses an object-oriented hierarchy of [[:Category:Kernel_objects|objects]].
 +
 
 +
Low-level system information is exposed by the kernel via mapping the [[Configuration Memory]] page in all processes.
 +
 
 +
= Scheduler =
 +
 
 +
Little is known about the scheduler behavior of the 3DS kernel.
 +
 
 +
Threads on the [[Glossary#appcore|ARM11 appcore]] seem to use cooperative multithreading, i.e. the only way for a CPU to be assigned to another thread is by invoking a system call. Most system calls trigger the scheduler, although some of them only conditionally do.
 +
 
 +
Threads on the [[Glossary#syscore|ARM11 syscore]] have been hypothesized to use preemptive multithreading, but this is unconfirmed so far.
 +
 
 +
It is unknown how the ARM9 CPU core and the two remaining New3DS ARM11 cores are scheduled.

Latest revision as of 00:39, 8 August 2016

The kernel is the core of the operating system(s) running on the ARM9 and ARM11 CPUs. Among other things, it is responsible for memory management, access control, and process scheduling. It furthermore provides userland applications with fundamental functionality like memory allocation, multithreading, and interprocess communication.

The kernel is part of the system firmware and as such is initialized during the boot procedure.

The functionality provided by the kernel to userland applications is exposed via supervisor calls. Internally, the implementation of this ABI uses an object-oriented hierarchy of objects.

Low-level system information is exposed by the kernel via mapping the Configuration Memory page in all processes.

Scheduler[edit]

Little is known about the scheduler behavior of the 3DS kernel.

Threads on the ARM11 appcore seem to use cooperative multithreading, i.e. the only way for a CPU to be assigned to another thread is by invoking a system call. Most system calls trigger the scheduler, although some of them only conditionally do.

Threads on the ARM11 syscore have been hypothesized to use preemptive multithreading, but this is unconfirmed so far.

It is unknown how the ARM9 CPU core and the two remaining New3DS ARM11 cores are scheduled.