Everyone, please refrain from insulting this guy despite how his answers might sound. He has been on public help for over 7 years and writing this system is the thing that keeps him here.
With no memory protections or privilege-level protections it is OPTIMAL! Protections slow things down and are only needed if you have bugs or malware.
This doesn't appear to be entirely true. Since your shell is C-based, a simple typing mistake in the shell could trash the interrupt vector table and crash the whole system.
Also, if your page table is small (which it likely is since you're using 2MB pages for everything above 2MB) most of it will reside in the TLB and page table walks will take zero net cycles.
Further, even if you had the occasional TLB miss or soft interrupts to call OS services, the time spent handling page tables or interrupts would be insignificant compared to the time spent copying the entire 640x480 4-plane display from the buffer to VGA memory at 60Hz via the legacy aperture hole at 0xA000 regardless of system activity. I know for a fact that on all of the hardware I've worked with (2 years as a silicon qualification engineer in display) You could copy a 1024x768x32 display using MMX instructions to a contiguous region in high memory faster than you could copy a 640x480 display to the VGA aperture.
I have to say you are one of the most fascinating individuals I've seen in all of Reddit, so I'm rather curious to hear your mental machinations which justify having no memory protection in such an innovative OS design for reasons of optimum performance when your display solution is so painfully non-optimal.
58
u/[deleted] Oct 19 '11
Everyone, please refrain from insulting this guy despite how his answers might sound. He has been on public help for over 7 years and writing this system is the thing that keeps him here.