The max number of processes is the compile-time configuration knob NPROC in `config/Configuration`. The stock version of the file sets it to 100. Only if you remove that line do you hit the fallback in `include/process.h`:
#ifndef NPROC
#define NPROC 8
#endifThere is also an Operating systems course at Marquette University based around Xinu. That one is for undergrads though and based on a version targeted for an embedded MIPS processor so I don't think it covered paging but I never took that one so I'm not sure.
Edit: Purdue’s CS 503.
A Microcontroller with real process isolation would be really nice, though. It could be used to safely contain whole classes of nasty bugs in the application software.
If this becomes a reality, programmers will become a lot less careful when writing the application software because of the additional level of protection. Google "risk compensation".
https://www.amazon.com/Operating-System-Design-Approach-Seco...
It's not really the 2nd edition, given that there was a LinkSys edition with revisions from the first edition published in 2011.
Edit: downvoters, care to explain...?
Are you sure about this? Xinu Timeline (3-rd paragraph on the site) states:
1988-90 - Xinu ported to 32-bit mode x86 architecture; virtual memory support added.
Disclaimer: I haven't read the code.
I just checked again. Searched for the "CR0" or "CR3" register, which would be used to set up the protected mode and virtual memory for the i386 CPU. Didn't find anything. Searched for "virtual" and found no match. Searched for "paging" and found no match. The process table entry only had the address to the starting function and the stack addresses for context switch; there's no process memory information. The process creation process didn't touch anything memory related, except setting up the stack.
I don't believe virtual memory is supported based on what's in the code.
In 2014 Dr. Comer had taped to his office door a sheet of project ideas for grad students, one of them was adding virtual memory support to Xinu.
* The code is pretty simple and clean, clearly for educational purpose.
* There's no memory protection. All processes share the same memory space, along with the kernel.
* No virtual memory, nor page table.
* No notion of ring protection. The kernel and the processes run in the same ring.
* Max number of processes is 8. The process table is a fixed size array, of 8 entries.
* Context switch can be preemptive, driven by the clock interrupt.
* Process scheduling is round-robin, first in first run.
* Process priority is supported. Each priority has its own ready queue. All processes of the highest priority are run first in round-robin fashion, before running the next priority level.
* "Program" is just a function. All "programs" in the system have their starting functions hardcoded in the shell's cmdtab[], like cat, ping, etc. Executing ping is just creating a process with the address of the ping function.
* Loading a program from disk to run doesn't seem to be supported.
* The local file system is based on RAM block device. Accessing data on actual disk doesn't seem to be supported.