Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I took an OS class but wonder nonetheless: If you aim for 0 compatibility, perhaps even can design your cpu, could an OS be much simpler? Could some standard components (paging etc.) be avoided altogether? Or is what we have a minimal set already?


Check out some microkernel systems (eg. Hurd). They have their problems, but the core OS is very minimal.

The microkernel idea is to move everything that can be moved, out to user-space. The minimal OS services is typically thread management, address space management, and some kind of IPC. And if you choose not to provide virtual memory or memory protection, you have a very tiny core OS.

Everything else, all the "normal" OS services can be provided by application level programs - device handlers, file systems, network stacks, time services, graphics,... almost everything.


> If you aim for 0 compatibility, perhaps even can design your cpu, could an OS be much simpler?

Yes, but a lot (possibly most) of the benefit is likely to be from dropping bug-for-bug compatibility with defects of preexisting operating systems and instruction set architectures individually. (Like x86 segmentation or unix tcsetattr/termios, for a pair of very obvious examples.)

For paging specifically, you'll have something functionally equivalent unless your system is deficient in the same ways a 6502 is (no virtual memory or memory protection). You might come up with something functionally equivalent but better, but if so that would be a novel discovery (either in the scientific sense, or in the sense of "I discovered a research paper from 1960 that solves this problem trivially as long as you have larger than 6-bit bytes and more than 64K[0] of RAM.").

0: Something like four rooms of vacuum tubes in 1960 money, which is why it never caught on. (/not-even-all-that-s)


The last part of this comment is brilliant. There may be large swathes of outstanding old research that had requirements that back then were out of reach but are now entirely mundane and easily achievable (even if they still wouldn't have a hope of reaching mainstream because of compatibility).


IMO a lot of the complexity of what an OS comes from:

* the illusion of multi-tasking! (context switching) (when you have one CPU-core)

* the bridge to your hardware! (e.g. ignoring the basics like your CPU/RAM/motherboard/IO devices, network interfaces themselves are an endless, unreliable torrent of data!)

* security! (unless you are literally God and make everything yourself, you have to trust ~something~ external)

* and more....

and complexity for CPUs (even ignoring legacy cruft) comes from :

* Branch prediction

* Register renaming

* Optimizing dat IPC

* More hacks for performance!

* Performance!!!

* and more....

Because at the end of the day, no matter how "simple" things are, creating the universe from scratch is never simple


Yeah, you can make an OS incredibly simply. Virtual memory is usually supported in hardware, but files, forking, IPC aren't necessary at all to make a functional OS. The most minimal useful system you could get would probably be something like a bare-metal forth.


Minimal set to do what, though?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: