|
|
Subscribe / Log in / New account

Pulling slabs out of struct page

Pulling slabs out of struct page

Posted Oct 11, 2021 6:47 UTC (Mon) by dvdeug (guest, #10998)
In reply to: Pulling slabs out of struct page by Wol
Parent article: Pulling slabs out of struct page

It depends on what we call successful and operating system, doesn't it. Windows and most forms of Un*x have kernels written primarily in C. (Windows 3.0 apparently rewrote a bunch of stuff from C into assembly.) MacOS X and Windows NT kernels have some C++, especially at the edges. It's hard to tell for many, but C and C++ seem to dominate, with other programming languages now for one-offs or research.

MacOS seems to have drifted through assembly, Pascal, and then C. Multics was PL/I. PRIMOS was originally Fortran IV, then a PL/1 dialect and Modula-2.

I tend to agree with mpr22 that Unix and C's success were mutual. If nothing else, the Lions book offered a good example of what could be done, and how to do it in C, and Ada and ALGOL-68 were complex, Modula-2 and LISP too academic and not specifically designed for it, PASCAL way too academic and not designed for it, except in a horde of dialects, and BLISS, JOVIAL and PL/S too proprietary and ill-documented. Unix could have won and eventually been rewritten in Modula-2 or something else, had C not been at least good enough.


to post comments

Pulling slabs out of struct page

Posted Oct 11, 2021 12:36 UTC (Mon) by pizza (subscriber, #46) [Link]

>It depends on what we call successful and operating system, doesn't it.

Don't forget various RTOSes and other embedded stuff -- C (and to a lesser extent, C++) overwhelmingly dominate.

Rust has some promise to supplant things there, but the amount of unsafe boilerplate needed to drive a modern MCU is staggering. Some of that can be automated away but it results in a much steeper curve to being productive.

Pulling slabs out of struct page

Posted Oct 13, 2021 19:36 UTC (Wed) by NYKevin (subscriber, #129325) [Link]

> Windows and most forms of Un*x have kernels written primarily in C. (Windows 3.0 apparently rewrote a bunch of stuff from C into assembly.)

This is true, but Microsoft historically has not made a very strong effort to distinguish between "the kernel" and "the rest of Windows." To some extent, this is an arbitrary line-drawing exercise. For example, you could take the position that every process which runs as SYSTEM is the Windows equivalent of a kernel thread, and therefore large chunks of the Windows kernel are actually written in managed languages like C#, but I imagine some people would violently disagree with that characterization.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds