Author Topic: any examples of OS not written in C/C++?  (Read 8499 times)

0 Members and 1 Guest are viewing this topic.

Online DiTBho

  • Frequent Contributor
  • **
  • Posts: 754
  • Country: gb
any examples of OS not written in C/C++?
« on: January 11, 2021, 09:29:11 pm »
I am learning Rust step by step, and I wonder if at the end of the course I will be ever able to write something like a mini scheduler that can run on a real target.

I am learning Rust step by step, and I wonder if at the end of the course I will be ever able to write something like a mini scheduler that can run on a real target.

Probably no, but hey? At least I will have learned something new  :D

The same applied to other languages I have learned in the past. For instance ... Pascal? I have never seen an OS written in such language. Basic? No nice, etc.

Except Assembly. I have seen a lot of firmware and operating systems written in Assembly, but all my books about operating systems mention C or C++ as the only development language.

Have anyone seen and can report here a link to an OS not written in C/C++/ObjC?
 

Offline I wanted a rude username

  • Frequent Contributor
  • **
  • Posts: 508
  • Country: au
  • ... but this username is also acceptable.
Re: any examples of OS not written in C/C++?
« Reply #1 on: January 11, 2021, 09:35:34 pm »
TempleOS, obviously (HolyC and x86 assembly).

Many less famous operating systems such as Linux and Windows follow this pattern, though they tend to use boring mainstream languages like C and C++.

OS/360 was written in pure assembly, because in those days, men were real men.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 6946
  • Country: fr
Re: any examples of OS not written in C/C++?
« Reply #2 on: January 11, 2021, 09:51:37 pm »
I think a large chunk of the first Mac OS versions was written in Pascal. Ditto for Lisa OS which Mac OS was partly based on.

CP/M was partly written in  PL/M.

Probably a lot of other examples, that's the two that come to mind at the moment.

Edit: I should also have mentioned Wirth's Oberon OS, written in Oberon! Although mostly an academic exercise and learning tool, it was a usable OS.
« Last Edit: January 11, 2021, 09:56:01 pm by SiliconWizard »
 

Online DC1MC

  • Super Contributor
  • ***
  • Posts: 1303
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #3 on: January 11, 2021, 09:53:26 pm »
http://menuetos.net/ - Pure Assembly

One can't write an OS in garbage collected languages, maybe some kind of student didactic implementation running on a virtual machine, you get rid of C/C++ and assembly, no OS, end of story.
Maybe sometimes later when the access to the actual hardware will restricted and just be offered via some hypervisor or other virtualization/containerization/obfuscation/simulation system one can make a "safe & modern"  >:D OS in Python, node.js, Ruby, Rust, Go or other crap application languages, but the real OS glued to the HW will still be C/assembly. Other 65535 attempts failed miserably so far, you can't write OS low level stuff with import system.os.
Of course all the other stuff above could still be used perfectly fine for writing apps and other user mode programs, just not bootloaders, drivers and schedulers. Who isn't able to cut it in assembly and C should stay away from any OS related stuff.

Cheers,
DC1MC


 
 

Online DiTBho

  • Frequent Contributor
  • **
  • Posts: 754
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #4 on: January 11, 2021, 10:35:40 pm »
thanks guy!

any publicly available source?  ;D
 

Online DiTBho

  • Frequent Contributor
  • **
  • Posts: 754
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #5 on: January 11, 2021, 10:50:47 pm »
http://menuetos.net/ - Pure Assembly

Wow, crazy, but cool  :D

Who isn't able to cut it in assembly and C should stay away from any OS related stuff.

Umm, not exactly related to your sentence, but it made me thing these two lines are sometimes mixed up.

For instance I don't want to have anything to deal with the Linux kernel, and I develop a lot of applications and libraries in user-space, but with FreeRTOS it's a completely different approach, and I like to play with its kernel stuff.

Also the kind of target makes the difference. For instance I don't like to have anything to deal with the low-level of a PowerPC e5xx because its user-manual is more 600 pages, the architecture itself is very complex (especially with super-scalar with tons of cops around) and my memory is so limited that I do find the whole experience far from being pleasant, but I like to play with a simple Arm classic even in assembly because it's simpler and its datasheet shorter, both of several orders of magnitude  :D
« Last Edit: January 11, 2021, 10:55:28 pm by DiTBho »
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 6455
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #6 on: January 11, 2021, 10:58:33 pm »
Very few OSes have been written in C or C++, but most of the ones which have survived until now are. There were a lot of OSes developed before C existed, and a lot more were developed before C++ existed.
 
The following users thanked this post: I wanted a rude username, DiTBho

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 6946
  • Country: fr
Re: any examples of OS not written in C/C++?
« Reply #7 on: January 11, 2021, 11:27:32 pm »
any publicly available source?  ;D

I was looking for early Mac OS source code, but haven't found anything. I don't think Apple ever released it, does anyone know? That would be fun to look at.

For CP/M, here it is: http://www.cpm.z80.de/source.html

Oberon: http://www.projectoberon.com/
 
The following users thanked this post: DiTBho

Offline fanOfeeDIY

  • Supporter
  • ****
  • Posts: 405
  • Country: jp
    • YouTube Channel
Re: any examples of OS not written in C/C++?
« Reply #8 on: January 12, 2021, 12:03:50 am »
I started to see many project of writing OS in Rust recently.

The list of some of them.
https://github.com/flosse/rust-os-comparison
 
The following users thanked this post: DiTBho

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 7627
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #9 on: January 12, 2021, 02:32:29 am »
This is, by no means, an exhaustive list; just a few systems off the top of my head.

Commercial systems that I've actually worked on that the OS was programmed in a high level language that wasn't C, and weren't assembly based:

Multics - PL/1 - https://en.wikipedia.org/wiki/Multics
MCP - various proprietary Algol variants - https://en.wikipedia.org/wiki/Burroughs_MCP
CTOS - PL/M - https://en.wikipedia.org/wiki/Convergent_Technologies_Operating_System
TOPS-10 - BLISS - https://en.wikipedia.org/wiki/TOPS-10
PERQ - Pascal - https://en.wikipedia.org/wiki/PERQ
PR1MOS - PL/P, SPL both proprietary PL/1 variants - https://en.wikipedia.org/wiki/PRIMOS
Ericsson AXE (et. al) OS (telephone switch/exchange) - PLEX/SDL
Nortel DMS-100 telephone switch OS - PROTEL - https://en.wikipedia.org/wiki/Protel

Commercial systems that I've no personal direct experience of:

ICL VME 2900 - S3 a proprietary Algol 68 variant - https://en.wikipedia.org/wiki/ICL_VME
Xerox Star - MESA
IBM System/38 - PL/S another PL/1 variant

Research/Educational systems:
Cambridge CAP - Algol68
CTSS (MIT) - MAD an Algol variant
« Last Edit: January 12, 2021, 02:58:25 am by Cerebus »
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline chickenHeadKnob

  • Frequent Contributor
  • **
  • Posts: 933
  • Country: ca
  • doofus programus semi-retiredae
Re: any examples of OS not written in C/C++?
« Reply #10 on: January 12, 2021, 02:57:28 am »
Lisp machines - a company that temporarily flourished during the first A.I. boom in the mid 80's had their own hardware and most of it including most of the OS was written in Lisp.

This then brings you to the point where you need to decide how much of the coding you want to be in the high(er) level language. You will need some assembly regardless, just to diddle the registers in an intimate fashion.
 

Offline JohnnyMalaria

  • Super Contributor
  • ***
  • Posts: 1148
  • Country: us
    • Enlighten Scientific LLC
Re: any examples of OS not written in C/C++?
« Reply #11 on: January 12, 2021, 03:21:57 am »
OpenFirmware was written in Forth.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 6455
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #12 on: January 12, 2021, 02:23:51 pm »
TOPS-10 - BLISS - https://en.wikipedia.org/wiki/TOPS-10
VMS might be a more interesting example from DEC. It started out mostly in BLISS, and migrated to C over time, with a few big step changes in the C content. Interestingly, BLISS continued for so long that after Compaq bought DEC they produced a BLISS compiler for IA64. This seems to indicate that they never got VMS entirely free of BLISS code.
 
The following users thanked this post: I wanted a rude username

Offline dave j

  • Regular Contributor
  • *
  • Posts: 86
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #13 on: January 12, 2021, 04:21:40 pm »
I think a large chunk of the first Mac OS versions was written in Pascal. Ditto for Lisa OS which Mac OS was partly based on.
That's my, rather vague and dim, recollection too.

TRIPOS was largely written in BCPL with a small bit of assembler in the kernel. Despite what that Wikipedia article says, device drivers were written in BCPL (all the ones I worked on were at least). Although, since BCPL is a predecessor of C it might not count.

@DC1MC
One of the big selling points of Rust is that it is useable for the sort of low level systems programming that C and C++ are used for.
I'm not David L Jones. Apparently I actually do have to point this out.
 
The following users thanked this post: DiTBho

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2290
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #14 on: January 12, 2021, 05:06:22 pm »
The Xerox Star (and Dandelion etc) were all built up using MESA. (I think the Alto started up BCPL and then MESA?)
I forget the names... The OS was Pilot? CoPilot? later Viewpoint?
The hardware "Wildflower architecture" was micro-coded to be MESA friendly.

MESA was a nice language and had much in common with the language I used for my 3rd year project... Concurrent CLU.

Wow that was a long long time ago.  :)
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 6946
  • Country: fr
Re: any examples of OS not written in C/C++?
« Reply #15 on: January 12, 2021, 05:16:31 pm »
I think a large chunk of the first Mac OS versions was written in Pascal. Ditto for Lisa OS which Mac OS was partly based on.
That's my, rather vague and dim, recollection too.

Yep. I had a Mac in the early nineties, and remember I had a few "Inside Macintosh" books (is there anyone else here who did?), each dealing with a particular part of the Mac OS API. All interfaces were described in Pascal AFAIR.

In 2017, it was announced that the Lisa OS would be released as open source in 2018.
https://fossbytes.com/apples-lisa-operating-system-free-open-source-release/
But AFAIK, it never did. Does anyone know what happened?

Now regarding C... please correct me if I'm wrong, but I think C was actually not that popular outside of the Unix world in the 80's. I think it really started to get momentum in the late 80's to early 90's. So I don't think there actually were many OS's written in C back then, except again from Unix and derivatives.
« Last Edit: January 12, 2021, 05:21:42 pm by SiliconWizard »
 

Online DiTBho

  • Frequent Contributor
  • **
  • Posts: 754
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #16 on: January 12, 2021, 05:39:25 pm »
One of the big selling points of Rust is that it is useable for the sort of low level systems programming that C and C++ are used for.

That's why I have invested money and I am investing time to learn it :D
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 6946
  • Country: fr
Re: any examples of OS not written in C/C++?
« Reply #17 on: January 12, 2021, 05:46:57 pm »
MESA was a nice language and had much in common with the language I used for my 3rd year project... Concurrent CLU.

Oh, yeah! You'll find the ref manual here: http://www.bitsavers.org/pdf/xerox/parc/techReports/CSL-79-3_Mesa_Language_Manual_Version_5.0.pdf
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 6455
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #18 on: January 12, 2021, 05:47:26 pm »
Now regarding C... please correct me if I'm wrong, but I think C was actually not that popular outside of the Unix world in the 80's.
By the early 80s C was a big deal all over the computing world.
 

Online DC1MC

  • Super Contributor
  • ***
  • Posts: 1303
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #19 on: January 12, 2021, 05:49:06 pm »
There were not many OSes written in C + assembly, only the ones who actually matter and passed the test of time, the rest went as academic masturbation, hyper-specialized NIH stuff and forgotten attempts of enthusiasts, forever remaining at version 0.0.1alpha0 in a forgotten '90s stile web page or repository.

 Rust will go like all the rest of over-engineered cretinic experiments, only to be eventually used in some kind of hypervisor or virtualization, where the heavy lifting will be done by C or assembly stuff, but it will be not visible to the mediocre programmer who will happily announce that "duuude, I've written a user mode driver in Python... Yeah dude, I written a scheduler in Rust, this OS stuff is so simple...".

 Some times low level and difficulty is just that, not reducible to application level stuff and trying to sugarcoat it with automated  garbage collectors and object paradigms, glorified interpreters of pseudocode and other crutches for mediocre programmers will always fail.

 
The following users thanked this post: Siwastaja

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 9216
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #20 on: January 12, 2021, 06:41:02 pm »
The Oberon system was written in Oberon - though more of an academic system (at ETH).
AFAIK there was also a simile system in Modula.

Most OS need at least some parts in ASM too. This may not be directly visible but as startup / library code for the compiler. Some of the really low level parts are too low even for C.

AFAIK the Apple Lisa system was written in Pascal. For better performance and less space needed much of this was rewritten / optimized in ASM for the early MAC OS.
 

Offline ve7xen

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: ca
    • VE7XEN Blog
Re: any examples of OS not written in C/C++?
« Reply #21 on: January 12, 2021, 07:01:31 pm »
There were not many OSes written in C + assembly, only the ones who actually matter and passed the test of time, the rest went as academic masturbation, hyper-specialized NIH stuff and forgotten attempts of enthusiasts, forever remaining at version 0.0.1alpha0 in a forgotten '90s stile web page or repository.

 Rust will go like all the rest of over-engineered cretinic experiments, only to be eventually used in some kind of hypervisor or virtualization, where the heavy lifting will be done by C or assembly stuff, but it will be not visible to the mediocre programmer who will happily announce that "duuude, I've written a user mode driver in Python... Yeah dude, I written a scheduler in Rust, this OS stuff is so simple...".

 Some times low level and difficulty is just that, not reducible to application level stuff and trying to sugarcoat it with automated  garbage collectors and object paradigms, glorified interpreters of pseudocode and other crutches for mediocre programmers will always fail.

Do you know anything at all about Rust or are you just blathering on ignorantly and arrogantly like a senile old man? It is not garbage collected. It was specifically designed for systems programming. It does not need a hypervisor or virtual machine, and its capabilities are very analogous to those of C or C++. It performs better than C/C++ on most microbenchmarks. And it has a lot fewer gotchas that trap even the best programmers from time to time, often leading to major security holes.
« Last Edit: January 12, 2021, 07:03:06 pm by ve7xen »
73 de VE7XEN
He/Him
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 6455
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #22 on: January 12, 2021, 07:48:31 pm »
Do you know anything at all about Rust or are you just blathering on ignorantly and arrogantly like a senile old man?
Are you blathering on ignorantly and arrogantly like a young idiot without the experience of seeing endless repeating cycles of the Next Big Thing that fades away? There's always that one wonderful little thing they do, that means the world is going to see the brilliance of the Next Big Thing and flock to it. Every once in a long while people actually do. Not often, though. Maybe Rust will hit the big time, but the odds are heavily against it unless one or more massive long term systems that are needed all over the place are written in it.
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: any examples of OS not written in C/C++?
« Reply #23 on: January 12, 2021, 07:52:13 pm »
There were not many OSes written in C + assembly, only the ones who actually matter and passed the test of time, the rest went as academic masturbation, hyper-specialized NIH stuff and forgotten attempts of enthusiasts, forever remaining at version 0.0.1alpha0 in a forgotten '90s stile web page or repository.

 Rust will go like all the rest of over-engineered cretinic experiments, only to be eventually used in some kind of hypervisor or virtualization, where the heavy lifting will be done by C or assembly stuff, but it will be not visible to the mediocre programmer who will happily announce that "duuude, I've written a user mode driver in Python... Yeah dude, I written a scheduler in Rust, this OS stuff is so simple...".

 Some times low level and difficulty is just that, not reducible to application level stuff and trying to sugarcoat it with automated  garbage collectors and object paradigms, glorified interpreters of pseudocode and other crutches for mediocre programmers will always fail.

Try and get a grip on that C Programming Language fanboyism ?

The first versions of rustc (before 1.0) were written in OCaml, and then rewritten in rust itself.
 

Offline dave j

  • Regular Contributor
  • *
  • Posts: 86
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #24 on: January 12, 2021, 08:20:40 pm »
Are you blathering on ignorantly and arrogantly like a young idiot without the experience of seeing endless repeating cycles of the Next Big Thing that fades away? There's always that one wonderful little thing they do, that means the world is going to see the brilliance of the Next Big Thing and flock to it. Every once in a long while people actually do. Not often, though. Maybe Rust will hit the big time, but the odds are heavily against it unless one or more massive long term systems that are needed all over the place are written in it.
Whilst Rust certainly has a big hill to climb in order to avoid being just another Next Big Thing C/C++ killer that fades away, it does have the advantage that it can actually be used for all the things C/C++ can. It also seems to be getting traction in Linux - Rust code in Linux kernel looks more likely as language team lead promises support.
I'm not David L Jones. Apparently I actually do have to point this out.
 
The following users thanked this post: DiTBho


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf