NeuroOS Kernel
A bespoke 64-bit operating system kernel from scratch.
NeuroOS reimagines the operating system kernel as a biological substrate. Inspired by the human brain's requirement for active neural firing to retain information, often summarized as use it or lose it, NeuroOS implements a biomimetic memory persistence model.
Unlike traditional OSs where memory is static until overwritten, pages in NeuroOS obey a decay function. The kernel's scheduler acts as a synaptic reinforcement agent, actively refreshing (firing) memory regions based on usage frequency, effectively creating long-term potentiation for frequently accessed code paths.
Biomimetic Architecture
- Hebbian Allocation:
h_malloc()creates memory blocks with synaptic strength (1.0). - Synaptic Pruning: A background kernel task decays the signal strength of all memory blocks. Usage resets strength.
- Forgetting: Unused memory fades away. If strength hits 0, the kernel automatically frees (prunes) the block.
void k_synaptic_pruning() {
// Mimic sleep cycle / pruning
for (int i = 0; i < MAX_SYNAPSES; i++) {
if (memory_cortex[i].active) {
// Natural decay
memory_cortex[i].strength -= DECAY_RATE;
// Forget weak memories
if (memory_cortex[i].strength <= 0.0f) {
memory_cortex[i].active = 0; // Lost
k_print("[PRUNE] Synapse faded.\n", VGA_RED);
}
}
}References
[1] Hebb, D. O. (1949). The Organization of Behavior: A Neuropsychological Theory. Wiley.
[2] Tanenbaum, A. S., & Bos, H. (2014). Modern Operating Systems (4th ed.). Pearson.
[3] Love, R. (2010). Linux Kernel Development (3rd ed.). Addison-Wesley.
[4] Bi, G., & Poo, M. (1998). "Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type." Journal of Neuroscience, 18(24), 10464-10472.
[5] OSDev Wiki. (2024). "Getting Started." wiki.osdev.org