Re: Describe your dream OS
Posted: Sat Jun 15, 2019 6:29 am
Hi,
Also maintenance is impossible with single binaries. If you install a fix for a shared library (like fixing a buffer overflow in jpeg comments), all programs using that library will benefit from the fix at once. With static linking you would have to recompile and reinstall ALL applications.
The only downside with shared libs is that developers and maintainers are incompetent, and they often can't guarantee backward API compatibility within a main version. This can be solved by allowing different versions of the same library to be installed at the same time (like Gentoo does), or by rejecting libraries from the repo that breaks compatibility (like Debian tries to do things with it's release cycles).
Cheers,
bzt
I have the same experience.eekee wrote:This reminds me of my past. I used to think I wanted lightweight software, thinking disk space was an important part of that, but eventually I had to recognize that I really wanted software which was "light" in terms of time and intrusiveness. Disk and memory space was a much lower priority,
But interestingly I come to exactly the opposite conclusion. For example a game that has to load tons of textures, would load much slower if it were using uncompressed raw pixmaps instead of PNGs (the old Stronghold game pops into my mind which took ages to start). Also a program that's only 1M would load much faster than a 1G one. I'm also convinced that a simple windows ini like parser would finish much faster than any xml parser.eekee wrote:and trying to minimize them often made software worse in more important ways.
And with that, I agree again.eekee wrote:I think most people who use the term "lightweight" haven't realized the distinction.
And I disagree again Consider this: there's a huge shared library to support the GUI (like Qt), let's say for the sake of the argument, it's 256M. There are two applications, A and B, each 1M. With static linking, your OS would need to load 514M into ram. With shared linking, you only load the lib once, when you start A (same speed as with static linking). Now when you start B, you only need to load an additional 1M, because the 256M lib is already in memory. Thus, loading 258M in total is much much faster, and dynamic linking beats static linking in program execution time. The time required by the dynamic linker to patch GOT entries is insignificant compared to accessing and reading sectors. It is more complex than static linking (which has absolutely no run-time requirement at all), but it's still relatively simple (applying some relocation offsets is not a rocket science).eekee wrote:Static linking was the touchstone which made me consider all this. I concluded I'm not opposed to static linking. It makes program execution much simpler and faster.
Also maintenance is impossible with single binaries. If you install a fix for a shared library (like fixing a buffer overflow in jpeg comments), all programs using that library will benefit from the fix at once. With static linking you would have to recompile and reinstall ALL applications.
The only downside with shared libs is that developers and maintainers are incompetent, and they often can't guarantee backward API compatibility within a main version. This can be solved by allowing different versions of the same library to be installed at the same time (like Gentoo does), or by rejecting libraries from the repo that breaks compatibility (like Debian tries to do things with it's release cycles).
I would say in a micro-kernel (or any server-client) architecture you'll need both. A server to accept messages, and a library to send them. Apps are using libs, they don't want to bother with constructing messages. For example, Xserver is the server, Xprotocol describes the messages, and application are using Xlib to send them (or they are using even higher abstraction level libraries, like Motif, GTK, Qt etc.).eekee wrote:Static linking does make GUI programs reveal their true sauropodian scale, showing this is the Jurassic era of software -- unique skeletal structures to accomodate their immense weight. When I was still thinking of developing in C for Plan 9 I wanted to write servers rather than libraries for all this GUI bloat, but I'm not sure I consider it worthwhile any more.
Agreed, just to put emphasis on this, those are not far-fetched dreams. As I've mentioned, OS/2 and BeOS can satisfy all the requirements, and they are not dreams, but real life OSes.eekee wrote:The words "bloat" and "lightweight" are like "lag", they mean so many different things, it's not very helpful to use them. But this is a thread about dreams, and if you can't be vague in dreams, they're not dreams.
Cheers,
bzt