News for hackers. Stuff that matters.
Re:Writing an OS in Rust: Hardware Interrupts by d33 on Monday October 22, 2018 @01:26PM (#18276518)
Just wanted to say that I wish that this was how kernels were made - out of modular, reusable blocks. Would this scale? In other words, could Redox and the OS described in the system share IRQ code from the same crate and ultimately grow into two different systems that are built of mostly the same crates for low-level stuff, just wired differently?
Re:Writing an OS in Rust: Hardware Interrupts by steveklabnik on Monday October 22, 2018 @01:32PM (#18276583)
We’ll see; a lot of hobby OSes are already doing this to some extent, like using the x86 crate to manage the definitions of various data structures needed by the platform. We can’t really tell until more OSes get further along (my own is taking forever due to lack of time...)
Re:Writing an OS in Rust: Hardware Interrupts by DoritoChef on Monday October 22, 2018 @01:50PM (#18276722)
From the historical point of view, this heavy decoupling is associated with microkernels which fell out of favor with the rise of the Linux kernel. I think in this day and age, modern programming languages could make building a microkernel that doesn't fall prey to the shortcomings of MINIX a possibility.
Re:Writing an OS in Rust: Hardware Interrupts by d33 on Monday October 22, 2018 @02:00PM (#18276818)
Microkernels are IPC-heavy, right? What I rather imagine is having modules at source level, not kernel level. So the thing still compiles down to a monolith/hybrid, but modules are abstracted away and reusable.
Re:Writing an OS in Rust: Hardware Interrupts by fooker on Monday October 22, 2018 @02:34PM (#18277071)
Source level modules sound awesome. Would need a high level language though.
Re:Writing an OS in Rust: Hardware Interrupts by nicoburns on Monday October 22, 2018 @03:33PM (#18277621)
Like Rust?
Re:Writing an OS in Rust: Hardware Interrupts by fooker on Tuesday October 23, 2018 @04:14PM (#18287010)
Maybe, I would personally go with C++.
Re:Writing an OS in Rust: Hardware Interrupts by jacquesm on Monday October 22, 2018 @07:31PM (#18279516)
The IPC overhead is very much manageable, microkernels tend to be a lot more responsive than monoliths and with paging for message passing the overhead is reduced even further.
Re:Writing an OS in Rust: Hardware Interrupts by badosu on Monday October 22, 2018 @02:18PM (#18276951)
It would be interesting to see if modern multi-core cpus make the possible overhead of microkernels a non-issue today.
Re:Writing an OS in Rust: Hardware Interrupts by jacquesm on Monday October 22, 2018 @07:32PM (#18279526)
Microkernels are much easier to optimize for multi-core CPUs than monoliths. The ´kernel modules´ from a monolith run as user processes in a microkernel environment so they automatically benefit from more cores.
Re:Writing an OS in Rust: Hardware Interrupts by pjmlp on Monday October 22, 2018 @06:28PM (#18279132)
Except that most kernels for high integrity computing or hard real time deployments are microkernels.
Re:Writing an OS in Rust: Hardware Interrupts by danellis on Monday October 22, 2018 @08:34PM (#18279863)
I don't know what your definition of "reusable" is, but I keep seeing things like, "We used the TCP/IP stack from NetBSD".