This project has been scrapped, as I realized that my architecture for this is rather silly. The new kernel I'm working on is still in Scratch, but runs atop an actual (emulated) hardware platform, and built with C-like native Scratch language extensions. ========================== RUN IT ON TURBOWARP: https://turbowarp.org/1088839572?hqpen ========================== This is a (fairly inefficient) monolithic kernel in Scratch ========================== It operates fully synchronously, as an actual (single-core) system would, and is somewhat poorly optimized (particularly in memory management -- the next update will focus on improving this) It generally attempts to emulate an actual kernel as closely as possible ========================== What is a (mono)kernel? A kernel is the base of an operating system, such as Windows, MacOS, or BSD; it has 2 jobs: - Effectively manage system resources - Provide hardware abstractions to allow programs to effectively function on a wide variety of hardware; this functionality is commonly split into separate modules known as drivers, and are initialized by and interact with the kernel, but are not part of it A microkernel (such as Windows' NT and MacOS' Darwin) differs from a monolithic kernel (such as Linux and traditional UNIX) in the fact that it's split up into several parts, generally known as servers. While monolithic kernels operate in a single memory region and have one binary, microkernels have many, each being a "server" managed by the process handler. The scope of this project has shifted from a microkernel to a monolithic kernel due to the inability to effectively reuse code between sprites, making a server architecture unnecessarily repetitive ========================== Programs are fully written in Scratch with no emulation, and, as such, this kernel (will) utilize fully cooperative timesharing, due to Scratch's lack of an exposed instruction pointer ========================== The system also utilizes a continuous memory chunk, which (almost) everything is bound to Exceptions are: - Memory get/set code - Macros - The PTE ========================== Block count: 1,399 ==========================
========================== Development time: ~2 weeks ========================== Todo list: [X] Memory allocation [X] Process management [X] Kernel stack [X] Replace Turbowarp extensions (utilized for prototyping) [ ] Proper server splitting - /will/ cause a major performance decline when implemented [ ] Timesharing [ ] Complete API, including I/O [ ] Filesystem (I've already written the spec, I just need to implement it) [ ] Framebuffer ========================== Changelog: 04/11/24 - Initial beta ========================== Credits: - The PSAT for giving me time to initially brainstorm - Linux, BSD, etc, for giving me an outside view of what a kernel does - PTE is HQPTE, by me (and also massively over-designed for this project) - Myself, for all of the code ==========================