3 ms·
I don't really get why this is a problem for a kernel programmer: > lack of any intrinsic support for concurrency An important part of an OS is that it implem
by asveikau 13y ago
I don't really get why this is a problem for a kernel programmer:
> lack of any intrinsic support for concurrency
An important part of an OS is that it implements support for concurrency - it builds processes and threads out of the raw materials such as page tables and timer interrupts. A kernel also builds its own spinlocks and higher-level waiting primitives. If you are relying on some high level language runtime to do the heavy lifting, is that really learning about how an operating system works?
For a kernel I actually see a lack of language support for concurrency as a plus. You need something to sit below the higher level stuff.
- pcwalton 13y agoRust doesn't have any built-in concurrency in the usual sense either (well, except for thread-locals and atomic intrinsics). What it provides is a few simple features (uniqueness and safe references) that allow programs like kernels to create their own safe, race-free abstractions. Instead of providing features directly ("scenario solving"), Rust's concurrency features are more like building blocks to help libraries build the features they need.