TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The wild world of non-C operating systems

332 点作者 dharmatech大约 3 年前

32 条评论

skissane大约 3 年前
Also z&#x2F;OS (formerly known as MVS) -large chunks of it are written in an IBM-internal-use-only PL&#x2F;I dialect called PL&#x2F;X.<p>The core of the AS&#x2F;400 operating system, OS&#x2F;400, the Licensed Internal Code (LIC), used to be written in another IBM-only PL&#x2F;I dialect, PL&#x2F;MP. In, the 1990s, while porting the AS&#x2F;400 from CISC to RISC, they rewrote all the PL&#x2F;MP code into C++. But IBM has another private dialect of PL&#x2F;I called PL&#x2F;MI, which was used to write the higher level part of OS&#x2F;400, the XPF - basically PL&#x2F;MI compiled to the virtual machine bytecode but PL&#x2F;MP compiled to the machine code of the physical hardware. From what I understand, parts of the XPF are still written in PL&#x2F;MP even in the latest versions of OS&#x2F;400 (now called IBM i OS), although newer components tend to be developed in C&#x2F;C++ instead. Other parts of the XPF were written in Modula 2, and I believe there is still some Modula 2 code surviving in the most recent versions as well.<p>IBM has had even more secret proprietary PL&#x2F;I variants. The long defunct IBM 8100 line’s DPPX operating system was a written in PL&#x2F;DS. Another dialect, PL.8, used to be used to write IBM’s compilers (although I believe it has now been replaced by C++) and also some of the firmware for the mainframes. IBM even wrote a GCC front-end for PL.8, although it appears they never released it.
评论 #30867361 未加载
评论 #30869535 未加载
评论 #30866810 未加载
评论 #30867761 未加载
评论 #30873629 未加载
ChuckMcM大约 3 年前
And Smalltalk. But this was a great article which highlighted some of the creativity that got me interested in computers in the first place. Building an operating system isn&#x27;t &quot;hard&quot; but it is a lot of work the more you do. That is time consuming (but in a fun way, like reading books is time consuming)<p>Off and on I&#x27;ve experimented with a small event driven real time OS for my robots that started as a Forth kernel, switched over to a C kernel, and then to a Rust kernel. The experimental part has been looking at &quot;infinite asynchronous threading&quot; and it was hugely influenced by Rodney Brook&#x27;s subsumption architecture. My thesis being that organisms aren&#x27;t driven by a single scheduler and a bunch of processes, why should an OS be. (there are arguments pro and con on that one :-)).<p>Anyway, not everyone is an &#x27;OS&#x27; type. At Sun we used to joke you were either an &#x27;OS&#x27; type, &#x27;Language&#x27; type, or a &#x27;GUI&#x27; type. Those were the core areas of investigation in the software organization. I tend to be an &#x27;OS&#x27; type with a bit of &#x27;language&#x27; thrown in :-)
评论 #30874269 未加载
评论 #30871579 未加载
评论 #30877069 未加载
评论 #30873665 未加载
pyinstallwoes大约 3 年前
DSP is a language and operating system (forth-like) made in the Soviet Union. I believe it was originally crafted upon ternary computation hardware but eventually transitioned to whatever was being used throughout the Union.<p><a href="http:&#x2F;&#x2F;www.euroforth.org&#x2F;ef00&#x2F;lyakina00.pdf" rel="nofollow">http:&#x2F;&#x2F;www.euroforth.org&#x2F;ef00&#x2F;lyakina00.pdf</a><p>Apparently they came to the syntax independently of Forth. However my research shows that some material about Forth may have showed up in a journal around the same time DSP was made. Either way the resemblance is uncanny. There is an interesting quote about the interface of the design requirements that manifested as the language: “DSP wasn’t invented, it was discovered” - I probably butchered it. But I’m pretty sure Chuck may have said it too or at least agrees.<p>The point is, you reach this interface following a method of reaching for something akin to “irreducible computational language that makes sense between humans and machines.”
trashburger大约 3 年前
Hmm, they didn&#x27;t list SerenityOS[0] under the C++-based operating systems for some reason... maybe it&#x27;s still too under the radar?<p>[0]: <a href="https:&#x2F;&#x2F;serenityos.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;serenityos.org&#x2F;</a>
评论 #30873541 未加载
评论 #30865936 未加载
评论 #30872598 未加载
评论 #30872880 未加载
greenyoda大约 3 年前
The article notably omits Multics, which was written in PL&#x2F;I: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Multics" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Multics</a><p>Multics, first released in 1969, was a major influence on Unix. From the Wikipedia article:<p>&gt; <i>Multics was the first operating system to provide a hierarchical file system, and file names could be of almost arbitrary length and syntax. A given file or directory could have multiple names (typically a long and short form), and symbolic links between directories were also supported. ... It was also the first to have a command processor implemented as ordinary user code – an idea later used in the Unix shell. It was also one of the first written in a high-level language (Multics PL&#x2F;I), after the Burroughs MCP system written in ALGOL.</i>
qubex大约 3 年前
I’m delighted they mentioned TAOS and (following through) the amazing Transputer architecture of the 1980s. Being a teen ‘interested’ in computers in the early 1990s I was fascinated by massively parallel architectures (Connection Machine 1&#x2F;2 and Connection Machine 5, IBM’s SP&#x2F;2 “scalable parallel” RS&#x2F;6000 based machines, and the Transputer concept) and I’m still figuring out whether GPUs are true embodiments of that concept or not.
评论 #30866943 未加载
评论 #30877149 未加载
评论 #30867230 未加载
abnercoimbre大约 3 年前
We asked Walter Bright at Handmade Seattle [0] what he thinks of a future with non-C ABIs. He makes the case we must all accept: C is deeply entrenched and all-encompassing.<p>That&#x27;s not to discourage creative efforts -- it&#x27;s more like &quot;be aware this is 10x bigger than Mt. Everest&quot;<p>[0] <a href="https:&#x2F;&#x2F;vimeo.com&#x2F;652821195#t=10m52s" rel="nofollow">https:&#x2F;&#x2F;vimeo.com&#x2F;652821195#t=10m52s</a>
评论 #30875138 未加载
bitwize大约 3 年前
MCP (as in the Burroughs OS) stood for Master Control Program. The villain in <i>Tron</i> was named for the OS. The technical consultant for <i>Tron</i> was none other than Alan Kay — himself a huge Burroughs fan.
评论 #30866513 未加载
评论 #30877247 未加载
评论 #30866559 未加载
weare138大约 3 年前
This article misses a ton. In addition to all the ones mentioned already what about all the early operating systems written in assembly like Apple DOS or Commodore DOS and the Pascal family of OSs like Mac OS Classic and Toro Kernel.
评论 #30868441 未加载
评论 #30877163 未加载
jleyank大约 3 年前
If they&#x27;re discussing historical OS&#x27;s, which I think they were, I thought VMS was written in BLISS. That one was sorta important, and I recall &quot;Ignorance is BLISS, BLISS is ignorance&quot; T-shirts.
评论 #30848607 未加载
mike_hearn大约 3 年前
The article didn&#x27;t list JNode, but it&#x27;s also a pure Java OS.<p>I noticed in another thread that a few people seem to think you can&#x27;t implement an entire operating system in a GCd language like Java or C#, but that isn&#x27;t true. You can do it like this:<p>1. Use an ahead of time compiler to compile the base runtime&#x2F;kernel image to static machine code. In managed language operating systems like JNode or Singularity there isn&#x27;t a strong distinction between kernel and language runtime, so this is the same thing. This base needs to contain at least a GC and probably a JITC, as well as some basic support services. This can itself be written in the managed language.<p>2. Write a very short bootstrap loader in assembly like every OS has, which sets things up enough to jump into the entry point of that runtime.<p>3. Writing a compiler in a managed language is easy enough but what about a GC? To do this you teach the compiler that some methods are &#x27;magic&#x27; and shouldn&#x27;t be treated as normal method calls. Instead they become either compiler intrinsics that are translated to pure assembly e.g. to read&#x2F;write raw memory locations, or they are compiled in special ways for example to remove GC safe points.<p>The current best example of this in action is the GC in SubstrateVM, which is the &quot;VM&quot; compiled into any program AOT compiled with the GraalVM native image tool:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;oracle&#x2F;graal&#x2F;tree&#x2F;master&#x2F;substratevm&#x2F;src&#x2F;com.oracle.svm.core.genscavenge&#x2F;src&#x2F;com&#x2F;oracle&#x2F;svm&#x2F;core&#x2F;genscavenge" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oracle&#x2F;graal&#x2F;tree&#x2F;master&#x2F;substratevm&#x2F;src&#x2F;...</a><p>If you flick through it you&#x27;ll see various annotations and types you wouldn&#x27;t normally see in Java, like `Pointer` and `@Uninterruptible`. These are recognized by the compiler and affects how the machine code is generated. The language is the same, so all existing tools continue to work - it&#x27;s not a dialect or subset of Java, it&#x27;s the full thing, just with slightly modified rules for how the final generated code behaves.<p>SubstrateVM has one more trick up its sleeve to break the circularity: some objects can be initialized and persisted to an &quot;image heap&quot; at build time. In other words, the GC code can use Java classes to structure itself, despite being unable to allocate.<p>And that&#x27;s all it needs.<p>There have been efforts to do things like this in the past for full operating systems. They have nice properties: for example you can sandbox drivers, IPC overheads goes away because it&#x27;s all in a single address space, capabilities actually work and are pervasive, and it&#x27;s quite easy to keep ABIs stable. There are usually a few sticking points that prevent them taking off:<p>1. Historically, GCs have either been good at latency <i>or</i> throughput but not both simultaneously. Some of them also had trouble with large heaps. That&#x27;s a problem because virtually all reasonable computing requires a mix of programs with wildly different sensitivity, most obviously, developers want latency to be prioritized for editing in their IDE but throughput to be prioritized for their build system. If you have one GCd heap for the entire computer then you have two options:<p>1a. Pick one algorithm to manage it.<p>1b. Do what Singularity did and come up with a quasi-process notion in which each unit has its own GCd heap. Singularity had a nice concept called an &#x27;exchange heap&#x27; which allowed objects to be passed between these quasi-processes very fast and cheaply, whilst ensuring that object graph could only be pointed to by one unit at once. This made IPC tremendously cheap, allowed one unit to be paused for GC whilst other units ran, and let them use IPC all over the place. However it did reduce the benefits of using managed languages somewhat as it reintroduced complex data ownership rules.<p>NB: This is changing now with tech like HotSpot ZGC and Shenandoah (which are written in C++ though). They drive latencies through the floor, it&#x27;s basically pauseless, and the new not yet released fully generational variants have very good throughput too. Also, G1 GC has monstrous throughput even with low pause times, they just aren&#x27;t quite as low as ZGC&#x2F;Shenandoah.<p>2. Overheads of managed languages are higher. The successor at MS Research to Singularity was codenamed Midori and not much was ever published about it publicly, but from what was written (by Joe Duffy) it seemed apparent that they went down a rabbithole of trying to make Midori have the same raw efficiency and overhead as C++ based Windows. They got a long way but ended up not having any interesting enough new features to justify the investment and the project was eventually canned.<p>3. All the same problems new operating systems always have: no apps, drivers etc.<p>4. Spectre attacks make single address space operating systems more complex. The new support for memory protection keys in Intel CPUs could re-awaken this area of OS research however because MPKs let you block speculation attacks within a single address space.
评论 #30866910 未加载
评论 #30867583 未加载
评论 #30867898 未加载
评论 #30867951 未加载
评论 #30866807 未加载
评论 #30877172 未加载
评论 #30866670 未加载
评论 #30868174 未加载
评论 #30867510 未加载
rbanffy大约 3 年前
Fun to think Clearpath is the oldest operating system in production, since 1962, and that’s still fully supported.<p>Comes close to another one that also predates C, IBM’s z&#x2F;OS, which has parts written in their own assembly dialect, as well as PL&#x2F;1 and others.<p>Next week we’ll probably see a new version of it with support for the new z16 (based on the Telus chip they’ve shown at the last Hot Chips).
p_l大约 3 年前
Porting a mention from the other submission of this article:<p>It misses the big name of Multics, written in PL&#x2F;I, and direct inspiration (both positive and negative) for Unix
评论 #30877185 未加载
mal10c大约 3 年前
This took me down memory lane but in a weird way. One of the first languages I really took to was vb6. I was absolutely convinced I could write an OS with that language... I tried and tried - really not knowing what I was doing and finally realized its limitations. Such a good lesson on using the right tool for the job.
butlerm大约 3 年前
&gt; C fans tend to regard BCPL as an unimportant transitional step, but it was used in two celebrated OSes. One was the TRIPOS operating system, later used as the original basis of AmigaOS.<p>The latter is a bit of an exaggeration. Tripos related code written in BCPL was used for &quot;AmigaDOS&quot; - meaning the filesystem driver, the command line shell, a few bits of process control, and a variety of generic command line utilities. It was not used for the kernel (Exec), or graphics support, or the gui library (Intuition), or the graphical shell (Workbench), or lower level device drivers, which were all written in C or 68K assembly.<p>The Tripos derived parts were nice though, generally nicer than the MSDOS equivalent and somewhat friendlier than the Unix command line, if the filesystem was a little slow, comparatively speaking.
评论 #30877201 未加载
OnlyMortal大约 3 年前
I remember the original MacOS been a mix of 68K and Pascal.<p>I tended to use MPW C and 68K in those days and recall the stack sizes been different between C and Pascal.
评论 #30877209 未加载
Decabytes大约 3 年前
It would be fun to try and make a scheme based Kernel&#x2F;OS. My reasoning is that older revised reports document a much smaller Scheme language than r6rs and r7rs so would be easier to implement in asm. Then once you have a working Scheme you can build on top of it
评论 #30867806 未加载
ncmncm大约 3 年前
The article falsely claims, &quot;Rust is eclipsing C++&quot;. &quot;Rust is desperately chasing after C++&quot; would be accurate.<p>It also fails to mention Apollo Aegis, coded in Apollo&#x27;s extended Pascal, and both at introduction and retirement was more advanced than Unix. Some key features still are not seen in Linux or most BSDs.<p>And, it fails to mention SerenityOS, in C++.
评论 #30866694 未加载
评论 #30870225 未加载
评论 #30868364 未加载
评论 #30871391 未加载
评论 #30877216 未加载
ngcc_hk大约 3 年前
Strange and I think other expressed it :<p>- IBM PC and apple pc are assembler if not basic<p>- So is the Ibm 360 which even to this day you have to use assembler macro etc<p>- mac is Pascal.<p>And one can say Mac OS is on c but objective c is not just c. It is c based but really not c all the way down.<p>- many embedded system …<p>Outside this … Application wise …<p>- Java and even javascript is not c, so is html and css plus well cobol and fortran !<p>In fact one can do a lot without touching let alone learning c in his &#x2F;her professional jobs. I suspect if just know c … cf just know x where x = ? Would be an interesting question.
Tozen大约 3 年前
Article forgot to mention that Niklaus Wirth was a consultant for the team at Apple that created Object Pascal. Apple had used variations of Pascal and Object Pascal for early Macs. This was in addition to companies using Wirth&#x27;s Modula-2 and Oberon.<p>Part of the reason why C became so prevalent is it being created within and backed by AT&amp;T (one of the largest companies in the world back then). They pushed C and Unix everywhere, it took hold, and here we are today.
评论 #30876608 未加载
评论 #30859044 未加载
mmphosis大约 3 年前
Written in Zig.<p><a href="https:&#x2F;&#x2F;boksos.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;boksos.com&#x2F;</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;AndreaOrru&#x2F;zen" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;AndreaOrru&#x2F;zen</a> <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21967668" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21967668</a>
spindle大约 3 年前
CDC mainframes and minis in the late 1980s (some or all of them) had a lovely OS written in Algol 68. I don&#x27;t remember what it was called.
评论 #30876638 未加载
stevefan1999大约 3 年前
BeOS&#x2F;Haiku and Redox comes to mind
评论 #30869024 未加载
jliptzin大约 3 年前
Was this written by a machine?
评论 #30877255 未加载
jnxx大约 3 年前
I think Modula-2 was also quite influential in one of the main programming languages for modern industrial PLCs, called Structured Text. One of its features are lightning fast compile times compared to C++.
namdnay大约 3 年前
I wouldn&#x27;t say Symbian was C++ - I remember it being a sort of intermediate step between C and C++. There were no exceptions, no STL, and many other weird quirks
评论 #30872258 未加载
Ericson2314大约 3 年前
&gt; There are still stranger things out there, such as House, implemented in the purely functional Haskell.<p>Yay, shout-out to a deep cut that once had me very excited :).
ok123456大约 3 年前
Very big omission of TempleOS. It was written in HolyC.
评论 #30877263 未加载
评论 #30876520 未加载
评论 #30874650 未加载
hulitu大约 3 年前
As far as i know MS windows was written in C++. DomainOS (Aegis) was written in Pascal.
tremon大约 3 年前
Do these operating systems also use a non-C calling convention for libraries?
评论 #30871455 未加载
评论 #30866452 未加载
Koshkin大约 3 年前
&gt; <i>Wirth a go</i><p>They should rename Oberon to Wirth.
评论 #30874482 未加载
dmtroyer大约 3 年前
click-bait title for programmers if I ever saw one.
评论 #30877267 未加载