Brendan wrote:
You're conflating 2 very different things: security/isolation (e.g. protecting against potentially intentional/deliberate unauthorised access), and correctness (e.g. protecting against accidental programmer mistakes). The first is something OSs need to care about
We are talking about a managed OS. Such OS is supposed to use (very extensively) some managed code. Then we have a system with many of it's characteristics defined by the managed code. Such OS can avoid some problems just because of managed code nature, then it's developer can write less code and achieve a greater development speed. It again leads to the managed code influence, but now in form of more features an OS can have. All it means there is very tight bunch of things under the one name - managed OS.
And in particular - improved code correctness leads to improved security/isolation an OS can have. So, can we disjoin such things?
Brendan wrote:
Ideally, you want to be able to detect as many problems as possible before the software gets anywhere near the end user; but it's impossible to detect all of them and penalising correct software with pointless/unavoidable overhead won't help.
The "pointless/unavoidable overhead" can be reduced in case of managed code. But unmanaged code just insists on one wrong thing - it supposes that human can make it better. And it's just not true for many problems. The trivial example here is how much errors every compiler catches in a human provided code. So, all such problems just must be handled to the computer. And a managed solution (and a managed OS as it's paramount) shows us a really efficient way of freeing a developer from those boring small problems. Some extra overhead here will pay for it with a lot more stable, secure and reliable solutions. The Java server side success just demonstrates it in a very obvious form.
Here again we should return to the definition of performance. In case of managed code (managed OS) the performance is about human's achievements while in case of unmanaged code the performance is about human's involvement in some boring details. And while being able to cope with boring details can be viewed as an achievement, but the time spent on such "achievement" leaves no possibility for the achiever to extend his achievements much wider.
Brendan wrote:
embryo wrote:
in context of manageable code vs hardware delivered isolation we have a one to billions probability of a bit better outcome in case of hardware protection. But does it have any sense to count on one to billions level probability?
There are no benefits that a managed solution can deliver, and it would be quite foolish to trade anything for the disadvantages that managed solutions cause.
Trading an extra small probability of a better isolation for all those efforts saved by the managed solutions looks like trading a sand grain for the whole universe.
Brendan wrote:
It's impossible to JIT an application during its installation, because as soon as you do that it's "AOT" (Ahead Of Time compilation) and not JIT at all.
Ok, let's use your term, let it be AOT. But what the name changes in the discussed subject?
Brendan wrote:
Note that the problem with managed code is that there are problems that are impossible to detect at compile time that force you to do run-time checking, and that run-time checking adds overhead.
Yes, there is an overhead. But it's impact is being decreased all the time. And managed solution advantages just make such impact practically invisible.
So, I see it is your devotion to the unmanaged code low level capabilities that prevents you from looking at managed solutions without some animosity. And then I want to point out a simple fact - a managed solution is not an enemy and if a developer provides it with some suitable hints it will produce a much better code. And such hints can be elaborated up to the same level the unmanaged code can provide in case of low level features. But unlike the unmanaged code a managed solution just do not require me to think about such low level detail every time and it just frees my time, that is a very nice outcome.