5 ms·
Unfortunately, this (really nice) PDF isn't complete. For me an Operating System means processes in userland, sadly it comes short of that. I'm now pushing my
by Dzugaru 5y ago
Unfortunately, this (really nice) PDF isn't complete.
For me an Operating System means processes in userland, sadly it comes short of that.
I'm now pushing my own x86 32bit OS in Rust using [0][1]:
There is definitely a shortage of information on this stuff (for example writing a USB driver is really hard and I couldn't find easily available tutorials - you have to resort to raw *HCI and USB specs to get things done).
[0] https://wiki.osdev.org/Expanded_Main_Page https://wiki.osdev.org/Expanded_Main_Page
[1] https://os.phil-opp.com/ https://os.phil-opp.com/
- progbits 5y agoSlightly off-topic: Anyone knows when the new edition of [1] is supposed to come out? It's been so long and the articles are so well written, I'm eagerly waiting for their UEFI rewrite to be released...
- capableweb 5y ago> For me an Operating System means processes in userland, sadly it comes short of that. I'm no OS expert, besides using multiple of them daily, but isn't there different categories of Operating Systems? The ones you say are "A Real OS" are specifically multitasking OSes, while there also exists a section of OSes that only runs single tasks. Aren't those also real Operating Systems?
- Dzugaru 5y agoSure, there is a gradient of complexity here, first you can just do your stuff in kernel in a single thread, then you'll probably want to load programs and execute them in userspace [0], then you'll want multitasking and task scheduling, memory isolation and process syncronization etc. You can call any of those steps an OS of course, its just I personally find earlier steps not that interesting. Another one great resource (that actually inspired me to tinker with all this awesome stuff) is this book [1] [0] https://wiki.osdev.org/Getting_to_Ring_3 https://wiki.osdev.org/Getting_to_Ring_3 [1] https://pages.cs.wisc.edu/~remzi/OSTEP/ https://pages.cs.wisc.edu/~remzi/OSTEP/
- bregma 5y agoI would argue a single program that runs on bare metal to performs a specific purpose is not an "operating system". An "operating system" is a program that runs on bare metal (operates the system) and runs other programs. Those other programs are "userspace" regardless of the security or IPC model involved in communicating with the actual operating system.
- l33t2328 5y ago> runs other programs This is a lot weaker of a statement than >processes in userland Even if you take a very broad definition of userland.
- matt_heimer 5y agoUserspace typically makes people assume a security model, Ring 0/3, etc. I think of an Operating System as something that provides a Hardware Abstraction Layer (HAL) and system calls to take advantage of that hardware. Drawing on the screen without knowing the details of the video card, file io without caring about IDE/SCSI, etc. If it runs other programs but those programs still need to take direct control of the hardware then the OS is just a glorified boot loader.
- skissane 5y agoPick R83 is an (8086 real mode) operating system for the IBM PC. It runs a byte code virtual machine, and has a compiler for a dialect of BASIC which generates that byte code as output. Most programs were written in BASIC, although the system also had a byte code assembler and some system-level software was written in that instead. Its filesystem is rather primitive in some ways (it only has single-level directories, a directory cannot contain subdirectories), but at the same time supports key-indexed files, which was essential for the business database applications it was used to run. There was never (as far as I know) a C compiler, although in principle someone could have compiled C to the same bytecode that BASIC was compiled to. It is multi-tasking and multi-user, albeit its security is rather primitive by today's standards (as one might expect for a real mode 8086 operating system). Does that count as "running other programs"? If it does, just make your "single program" be an interpreter (Tcl, Lua, whatever you wish) and now you have a "real operating system". (The byte code for R83's VM, called Pick assembly, came from Pick's earlier non-PC hardware systems, in which it was actually the hardware machine language, implemented by microcode; I believe the parts of the system which ran on top of the VM were a pretty direct port from those earlier platforms. R83 was succeeded by Advanced Pick, which supported both running as a standalone OS – AP/Native – or as a process on top of a host OS – AP/Unix and AP/DOS. AP/DOS was later succeeded by AP/NT for Windows NT, and Advanced Pick eventually evolved into D3, which is still around – now sold by Rocket Software. D3's virtual machine environment, VME, is a direct descendant of the same byte code VM, although it now supports much deeper integration with the AIX/Linux/Windows host platform than the original hosted AP versions did. Early MUMPS systems were similar in being hosted directly on the hardware, but Pick as an operating system arguably lasted a decade or more longer than MUMPS as an operating system did.)
- msla 5y agoIf it doesn't run any other programs, it's more like firmware than an OS.
- jhgb 5y agoI'm sure that there's plenty of operating systems where there isn't "userland" in the common sense.
- terracatta 5y agoTempleOS comes to mind.
- paskozdilar 5y agoPhantomOS too. Although there's still "userland" in Phantom, it's just that it uses type safety for memory protection, instead of MMU.
- gjadi 5y agoTo understand the USB stack, I've used the following resources: - the spec itself (obviously) - USB Complete by Jan Axelson (quickly go through this one before reading the spec) - USB The Universal Serial Bus by Benjamin Lunt (https://www.fysnet.net/the_universal_serial_bus.htm https://www.fysnet.net/the_universal_serial_bus.htm) If you're writing your operating system, checkout other books by Benjamin Lunt: - https://www.fysnet.net/osdesign_book_series.htm https://www.fysnet.net/osdesign_book_series.htm
- wrycoder 5y agoIt appears that Chuck Moore gave up on a Colorforth implementation of usb - he was probably disgusted with the complexity.
- pdonis 5y ago> this (really nice) PDF isn't complete. It is for the author's definition of "complete", which he gives explicitly early on in the paper. > For me an Operating System means processes in userland As the reference to the author's late professor in the introduction to the paper will show you, it hasn't always been so. Once upon a time, an "operating system" just meant "the code you have to write before you can do anything at all with this computer". That code could be anything from a special-purpose system for one particular task, to something like MS-DOS, which could run other programs but had no notion of "processes in userland" (because there wasn't any "userland", every byte of code ran on the bare metal), to the kind of multi-tasking system we now generally think of when we think "operating system", like Linux or Windows or Mac OS X.