3 ms·
> There's no reason those shouldn't be resident daemons Well, you can blame OS vendors for that. But would it be practical even if implemented? For a system th
by Alupis 12y ago
> There's no reason those shouldn't be resident daemons
Well, you can blame OS vendors for that. But would it be practical even if implemented? For a system that will never execute Java code, why would a JVM daemon be running in the background? Even if it were a daemon, it would still require spool-up time to interpret the first byte-code down to machine code before the built-in jvm optimizing compiler could kick in and compile down to native machine code.
> hypervisor for managing those
We do have similar things now-days, but it's worth considering that your OS does a lot more than just simply execute other code. But again, there's a practicality issue trade-off. Containers aren't exactly easy, and it's unlikely that even today's implementations will be the last attempts that get it 100% right. (BTW, Xen requires a Kernel, and for the sake of argument, your laptop does not require anything but the kernel to boot (actually less, you can boot raw binary machine instructions), the rest is convenience for the user).
> why are we using processes that share mapped memory allocations (i.e. threads) instead of just having processes push information to one-another's inboxes over sockets
Sockets still have overhead. IPC can be achieved in a number of ways, some better than others, and some better in certain circumstances. Why bother opening a socket when my program consists of only a small handful of child processes all running on the same host and only require very small amounts of communication (such as a keypoller subprocess)? Message queues are fine for sending basic messages around, but even a message queue is unnecessary if I can pass the info into the child process as I spawn it. Why over-complicate things if not necessary?
> a 2-4x difference in overhead, minuscule compared to the speedups over the past decades.
That is, of course, relative. I think some large projects would argue a 2-4x improvement in compile-time, for example, is a dramatic time savings. If we snubbed every 2-4x performance improvement, we'd still have performance on the scale of 1984.
- pjmlp 12y agoThe OS/400 mainframes use a JIT in their kernel. All userspace code, including C, compile to bytecode known as TIMI.
- Alupis 12y agoDepends what version you are running and the applications running ontop. The AS/400 box at my company runs a load of RPG language code, which is interpreted at runtime.
- lomnakkus 12y agoIt's very likely that your CPU interprets the machine code at runtime. What's your point? EDIT: "machine" -> "machine code". Doh.
- derefr 12y ago> Even if it were a daemon, it would still require spool-up time to interpret the first byte-code down to machine code before the built-in jvm optimizing compiler could kick in and compile down to native machine code. The first time you loaded that bytecode, sure. Every time after, it should be hashing the byte code it's being told to load, and then taking that hash as a key into a disk cache of already-profiled-and-JITed object code. In fact, the application can ship with those cache files (like a pNaCl binary shipping with its native counterpart), or the developers could dump (signed copies of) those cache files into a DHT which the runtime would look in as an extended cache. Either way, the API is still "load this byte code", but the bytecode is effectively just a really long key that looks up the real code that should be loaded. It's just that in the absolutely-cold path, the JIT (effectively the load-time compiler) can kick in and actually parse the bytecode into the required native code.