102 ms·
why is a multi-tasking OS inconsistent with "bare iron"?
by menzoic 5y ago
why is a multi-tasking OS inconsistent with "bare iron"?
- bdamm 5y agoBecause in an OS like Linux or Windows, the kernel is sharing out access to the machine by managing the hardware's lowest levels of controls, which applications do not have access to. That's not even including the fact that processors are actually processor simulators these days. Thus, "bare metal" is actually "resource division among managed processes on a simulated processor" which sure sounds a lot like a VM to me. Modern OSs are in fact a form of virtual machine, and we found it useful to have yet another. Arguably docker type of simulation introduces yet another level so a react app in a docker shell in a VM cluster is really a interpreted application on a simulated operating system, on a resource sharing virtual machine, on a virtualized hardware environment, on a multitasking virtual machine, running on a simulated processor that's implemented on a _real processor_.
- gumby 5y agoThe OS itself runs on the "bare iron" -- hardware without any software running on it. An OS initializes and manages the hardware and doesn't call on something else to do so. If you write a program that is launched by an OS you are by definition not manipulating the hardware directly. Those POSIX calls go somewhere. I write such code from time to time: a boot loader, a small OS, or apps that run with no OS at all.