3 ms·
> what's the point of operating systems if they don't provide commonly needed services To abstract over hardware, including to allow running multiple programs
by gpm 6y ago
> what's the point of operating systems if they don't provide commonly needed services
To abstract over hardware, including to allow running multiple programs simultaneously on the same hardware.
I'd argue that there's pretty widespread agreement in how we actually deploy modern systems when given the choice, that this is all we want the operating system to do too. There's all these operating systems that try to do more (e.g. approximately every linux distribution ever), and yet modern software primarily runs in some sort of sandbox who doesn't allow any of that to seep into the environment. On servers that sandbox looks like "containers" or less frequently "jails". On clients that sandbox looks like "a browser" or "electron".
Empirically the idea of shipping commonly used dependencies with the hardware abstraction layer, seems to have been the wrong idea. Even if you disagree with that, certainly it's not the case that it's the only point of shipping the hardware abstraction layer (operating system) in the first place.
- flohofwoe 6y agoThat's a fairly "mainframe era" definition of an operating system though ;) Let me reformulate: If an "operating system" or any other sort of application runtime (like a web browser) needs to handle UNICODE strings anyway in its UI layer, doesn't it make sense to expose an UNICODE API to the applications because all the code and data exists anyway in the OS. This is one of my main gripes with web browsers: They have excellent text rendering, but there are no APIs which expose the text rendering capabilities to APIs like WebGL.
- gpm 6y agoNow you're getting into nuanced answers anyways Does it make sense to expose them. Yes, probably, if there's no cost to doing so (which is approximately what you said when you says "needs to handle unicode strings anyways"). Does it make sense to use the exposed dependency? That depends - What is the cost of including an extra copy (high in wasm, low in server side containers) - [Edit: Added] What is the cost of using the system copy (typically low, but non 0 performance impact) - What set of symbols is more likely to be outdated? - How many times are you going to run into issues where you are missing the dependency in the runtime? - How expensive is it going to be to implement a different solution for every different runtime that exposes it in a different way? - How likely is the runtimes API ever to change in a backwards incompatible way? Most of the time, for things that are not downloaded just when the user tries to run them (i.e. websites), I think it doesn't make sense to use the exposed dependency, even if it exists.
- flohofwoe 6y agoAgreed. As always, the only correct answer is "it depends". But even considering those questions is probably much more effort than most application developers put into selecting their dependencies, unfortunately. There's also the question of scale. Currently, whether your calculator.exe is 50 KB or 5 MB doesn't matter much, trimming down the size towards 50 KB is a nice exercise and deserves praise, but is probably not even noticeable by users. 50 MBytes for a calculator deserves raised eyebrows, something must be wrong which should be investigated. 500 MB would be unacceptable IMHO. Even if users wouldn't complain, I would be deeply ashamed to produce such a turd of a program ;)
- setpatchaddress 6y agoYes, it depends in a very absolute sense, but for most cases, efficient use of memory is a hugely important factor in a large software system for performance. It’s worth doing an abstraction layer. ICU has a stable API, to the best of my knowledge.