4 ms·
Keep in mind that, in kernel mode, things like garbage collection just won't work!
by gwbas1c 7y ago
Keep in mind that, in kernel mode, things like garbage collection just won't work!
- merb 7y agomaybe it would? maybe somebody could create a co-processor just for that. sadly cpu's won't actually have specific extensions to have a good way of doing garbadge collection. but I guess it would be pretty helpful.
- sametmax 7y agoGood thing rust doesn't have one.
- __s 7y agoFeel like that's a common misconception: https://en.wikipedia.org/wiki/Midori_(operating_system) https://en.wikipedia.org/wiki/Midori_(operating_system) http://programatica.cs.pdx.edu/House http://programatica.cs.pdx.edu/House
- hi41 7y agoCould you please expand on this. When garbage collection works in applications and webservers that handle large number of requests, why wouldn't it work in OS kernel?
- arcticbull 7y agoIt introduces indeterminism into a system that strives to have as little as possible. You could of course, but you probably shouldn’t.
- inlined 7y agoGC can create noticeable pauses in the whole windows UX because windows scales vertically in a machine not horizontally in a DC. And per another comment I made, if your OOM handler needs to JIT it can be catastrophic.
- pjmlp 7y agoXerox PARC, ETHZ, DEC and MSR had other opinion regarding that.
- Matthias247 7y agoI would argue that it actually might not matter too much: 1. In a constraint context (embedded/kernel) you want to preallocate most things anyway, since even normal malloc/free isn't deterministic. Once you preallocate objects, it doesn't matter if those are coming from a long-lived GCed heap or from somewhere else. 2. Kernels like Linux rely on the fact that some small allocations never fail. Plugging in a GC and asserting that it won't fail would have the same effect (with some impact on latencies). What might be most important is that the language supports explicit stack allocations, which avoids the need for any kind of heap when necessary. That is given for languages like C# and Go.