Theseus: A modern experimental OS written from scratch in Rust
41–50 of 153 posts
Re: Theseus: A modern experimental OS written from scratch in Rust
#42Earlier quoted context omitted.
Thank you for the link! EDIT: End to end we do not give enough information from the application to OS to the hardware for perfect optimizations. We do not start with enough information and we lose too much down the stack. Especially around concurrency. I think that at the end of the day there is some atomic information needed by hardware and OS to make optimizes about all code running on the system. I see the approac…
I can't recall the details or find them searching online, but I recall reading back in around 2000 about an emulator that was actually faster than bare metal when emulating its own hardware. I think maybe it was a Sun Microsystems project, but I'm not sure. Does anyone else recall this?
Re: Theseus: A modern experimental OS written from scratch in Rust
#43The name alludes to the Ship of Theseus, a thought experiment where, over the course of many repairs, every piece of a ship is eventually replaced. Given that, I found it interesting that this is applied to a novel greenfield OS effort, instead of a project to rewrite an existing OS in Rust piece-by-piece.
The goal appears to be to design an architecture that supports in-place updates of most components due to them having tightly constrained state management and inter-component dependencies.
Maybe that explains the reference.
Re: Theseus: A modern experimental OS written from scratch in Rust
#44Earlier quoted context omitted.
Redox is a unix style operating system with a unix style design and ABI. This operating system shares none of those goals, it seems to focus on a particular challenge related to the abstraction between subsystems of the operating system, following a term they call "state spilling". The goal appears to be to design an architecture that supports in-place updates of most components due to them having tightly constrained…
I wouldn't call micro-kernels a " unix style operating system with a unix style design", quite the opposite. The only thing in common with UNIX from current Redox is the POSIX support.
The way that posix filesystem semantics are a kernel provided abstraction is very "unix style".
Re: Theseus: A modern experimental OS written from scratch in Rust
#45Earlier quoted context omitted.
I wouldn't call micro-kernels a " unix style operating system with a unix style design", quite the opposite. The only thing in common with UNIX from current Redox is the POSIX support.
A microkernel is a valid implementation for a unix like. The way that posix filesystem semantics are a kernel provided abstraction is very "unix style".
Precisely none of them in 3-5 decades has managed to deliver on the promise of microkernels prompting the question:
"Were huge microkernel advantages actually greatly oversold, is posix a massively debilitating factor that prevents microkernel based systems from delivering on their raison d'etre or was every single one of those implementations a poor one? [1]"
[1] including QNX
Re: Theseus: A modern experimental OS written from scratch in Rust
#46Earlier quoted context omitted.
Given how we don't even have ECC memory, we shouldn't hold our breaths...
In what concerns ARM and SPARC platforms, memory tagging is happening and being adopted by Apple/Google platforms, in what concerns Intel, it was yet again another from their screwups.
Re: Theseus: A modern experimental OS written from scratch in Rust
#47Earlier quoted context omitted.
I can't recall the details or find them searching online, but I recall reading back in around 2000 about an emulator that was actually faster than bare metal when emulating its own hardware. I think maybe it was a Sun Microsystems project, but I'm not sure. Does anyone else recall this?
Are you thinking of HP’s Dynamo? http://cseweb.ucsd.edu/classes/sp00/cse231/dynamopldi.pdf
The really nice thing about Dynamo was that it was a relatively simple trace-based JIT compiler from native code to native code (plus a native code interpreter for non-hotspots). This meant that it would automatically inline hotspots across DLLs and through C++ virtual method dispatches (with appropriate guards to jump back to interpreter mode if the virtual method implementation didn't match or the PLT entry got modified). They didn't have to do any special-casing of the interpreter to handle virtual method calls or cross-DLL calls, it's just a natural consequence of a trace-based JIT from native code to native code.
The only downsides of something like Dynamo are (1) a bit of complexity and space usage (2) some startup overhead due to starting in interpretive mode and (3) if your program is abnormal in not having a roughly Zipf distribution of CPU usage, the overhead is going to be higher.
Ever since I read about Michael Franz et al.'s SafeTSA SSA-based JVM bytecode that more quickly generated higher-performing native code, I've had a long-term back-burner idea to write a C compiler that generates native code in a particular way (functions are all compiled to arrays of pointers to strait-line extended basic blocks) that makes tracing easier, and also storing a SafeTSA-like SSA bytecode along with the native code. That way, a Dynamo-like runtime wouldn't use an interpreter, and when it came to generate an optimized trace, it could skip the first step of decompiling native code to an SSA form. (Also, the SSA would be a bit cleaner as input for an optimizer, as the compilation-decompilation round-trip tends to make the SSA a bit harder to optimize, as shown by Franz's modification of Pizza/JikesRVM to run both SafeTSA and JVM bytecode.) Once you have your trace, you don't need on-stack replacement to get code in a tight loop to go into the optimized trace, you just swap one pointer to native code in the function's array of basic blocks. (All basic blocks are strait-line code, so the only way to loop is to jump back to the start of the same basic block via the array of basic block pointers.)
The background for HP Dynamo is that during the Unix wars, there were a bunch of RISC system vendors vying for both the high-end workstation and server markets. Sun had SPARC, SGI had MIPS, DEC had Alpha AXP (and earlier, some MIPS DECStations) and HP had PA-RISC. The HP Dynamo research project wanted to show that emulation via dynamic recompilation could be fast, so to get an apples-to-apples comparison for emulation overhead, they wrote a PA-RISC emulator for PA-RISC.
Re: Theseus: A modern experimental OS written from scratch in Rust
#48I do wonder about single address space, I've seen a few experimental systems follow this strategy lately and it feels reliant on hardware less defective than we presently have in commodity user gui performance systems.
IBM i (OS/400) has had single address space, tagged pointers, and an number of other "novel" things in the loop for eons. Many people interact with it daily, indirectly, in most of your big box retail stores (think stores like Costco, Lowes, etc).
Re: Theseus: A modern experimental OS written from scratch in Rust
#49The name alludes to the Ship of Theseus, a thought experiment where, over the course of many repairs, every piece of a ship is eventually replaced. Given that, I found it interesting that this is applied to a novel greenfield OS effort, instead of a project to rewrite an existing OS in Rust piece-by-piece.
The simple answer is that “identity” is pseudoscience and does not exist; it's a man-made delusion created by the human mind to simplify reality and deal with it more easily.
“identity” does not even apply to truly atomic particles, because there is no way to say that they aren't “different” in a next instance of time.
There are far too many “thought experiments” and “quæstions” that simply arise by trying to treat as rigorous man-made delusions and distinctions such as this one. “Is the glass half full or half empty?” — that is a non-distinction created by men, not by nature.
Re: Theseus: A modern experimental OS written from scratch in Rust
#50Earlier quoted context omitted.
A microkernel is a valid implementation for a unix like. The way that posix filesystem semantics are a kernel provided abstraction is very "unix style".
Yeah totally valid implementation of which there have been a great many attempts, far too many to list here. Precisely none of them in 3-5 decades has managed to deliver on the promise of microkernels prompting the question: "Were huge microkernel advantages actually greatly oversold, is posix a massively debilitating factor that prevents microkernel based systems from delivering on their raison d'etre or was every s…