|
|
Log in / Subscribe / Register

Pulling slabs out of struct page

Pulling slabs out of struct page

Posted Oct 10, 2021 18:20 UTC (Sun) by Wol (subscriber, #4433)
In reply to: Pulling slabs out of struct page by dvdeug
Parent article: Pulling slabs out of struct page

> with "only widely successful" coming off as a weaselly way of saying "most widely successful".

How many successful operating systems have been written in C? Two? Unix of course, I don't know what language Windows was written in, but I suspect most of it is C nowadays if it wasn't to start with?

To my knowledge Multics predates C - Fortran? Pr1mos was a multics-derivative - that was Fortran, then they ADDED PL/? (is that PL/1, PL/P, SPL, ... a whole bundle of variants/dialects/whatever). Then they TRIED to port the whole shebang to C and the result was a disaster.

How many other OS ports to C have been a disaster? I strongly suspect C owes its success to Unix, NOT the other way round.

Cheers,
Wol


to post comments

Pulling slabs out of struct page

Posted Oct 10, 2021 19:58 UTC (Sun) by mpr22 (subscriber, #60784) [Link]

C and Unix's success is mutualistic.

The 1973 rewrite of Unix from PDP-11 assembly to C would eventually allow it to proliferate off of DEC hardware (the first such port being to the Interdata 8/32 in 1978); Unix succeeding, in turn, allowed C to proliferate off of Unix.

Pulling slabs out of struct page

Posted Oct 11, 2021 6:47 UTC (Mon) by dvdeug (subscriber, #10998) [Link] (2 responses)

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.

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.

Pulling slabs out of struct page

Posted Jan 20, 2022 22:17 UTC (Thu) by yodaiken (guest, #156253) [Link]

Pulling slabs out of struct page

Posted Jan 20, 2022 23:05 UTC (Thu) by anselm (subscriber, #2796) [Link]

To my knowledge Multics predates C - Fortran?

According to multicians.org, PL/1, or specifically a subset thereof called EPL.


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