5 ms·
I want to see this taken to the logical extreme. A real OS with actual drivers (no unikernel, no virtio) for a small set of hardware that only serves static pa
by trh0awayman 4y ago
I want to see this taken to the logical extreme. A real OS with actual drivers (no unikernel, no virtio) for a small set of hardware that only serves static pages. No need for virtual memory. Just hardcode the blog posts right into the OS and use the most minimal TCP stack you can make.
- shrubble 4y agoI think you could do that with redbean, or very nearly so.
- filleokus 4y agoI guess Unikraft is that, kinda? https://github.com/unikraft/app-nginx https://github.com/unikraft/app-nginx
- staticassertion 4y agoSeems like a case for a unikernel running on bare metal. No copying bytes across kernel/user, no context switching at all.
- xena 4y agoI almost wonder if I should try to get Shrine/TempleOS to do that. That could be a very interesting post.
- trh0awayman 4y agoI guess I didn't realize unikernels could run on bare metal. I've only seen them running on a hypervisor.
- staticassertion 4y agoI think they typically target hypervisors because it's far more likely that that's what people will want to run on, but there's nothing fundamental stopping a unikernel from running on bare metal.
- vardump 4y agoJust like on most low end embedded systems. Bare metal rules there.
- im_down_w_otp 4y agoWith a bit of dedication you could probably get that put together with https://github.com/auxoncorp/ferros https://github.com/auxoncorp/ferros using Rust & seL4.
- f_devd 4y agoI think that should be possible with Cosmopolitan Rust (https://ahgamut.github.io/2022/07/27/ape-rust-example/ https://ahgamut.github.io/2022/07/27/ape-rust-example/). It would create a Baremetal runnable ELF binary with just cosmopolitan libc statically linked, not sure about driver support though.
- cbm-vic-20 4y agoKeep on going down that rabbit hole: burn it into an FPGA.
- bhedgeoser 4y agoOne approach is to run some kind of optimizer on a docker image that throws away everything that does not contribute to the end goal of yeeting text at http clients.
- erk__ 4y agoI am actually not sure if a more minimal TCP stack would be the best, especially if you would need to handle packet loss because of congestion for example. For example recent work such as RACK-TLP gives certain workloads better performance, but it is not something you would have in a minimal TCP stack
- allan_s 4y agoIt already exists in the embedded device word I remember working in 2008 on a project for some geothermal devices that were spitting some IoT data on a "hardcoded" html page directly in the C code of the program, the device was using a chinese 8051-like CPU so you had no OS-per se
- KptMarchewa 4y agoWhy stop there? Bake your blog to hardware.
- toast0 4y ago> No need for virtual memory. If it's amd64, long mode requires a page table. Otherwise, a page table is handy so you can get page faults for null pointer dereferencing. Of course, you could do that only for development, and let production run without a page table. My hobby OS can almost fill your needs though, but the TCP stack isn't really good enough yet (I'm pretty sure I haven't fixed retransmits after I broke them, no selective ack, probably icmp path mtu discovery is broken, certainly no path mtu blackhole detection, ipv4 only, etc), and I only support one realtek nic, cause it's what I could put in my test machine. Performance probably isn't great, but it's not far enough along to make a fair test.