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

0 Members and 1 Guest are viewing this topic.

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #50 on: April 16, 2021, 10:26:54 am »
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.

Not true, provided you are sufficiently imaginative and clever!

Smalltalk-80 manages that.

See, for example, Apple's original Smalltalk port of The Xerox 1.0 release. That runs on a FatMac from two floppies. It is, of course, glacially slow since it didn't have L. Peter Deutch's groundbreaking JIT. FFI http://macintoshgarden.org/apps/apple-smalltalk-80

Play with it's modern descendent Squeak, which has the interesting feature that the VM itself (including GC) is written in Smalltalk. FFI https://dl.acm.org/doi/10.1145/3281287.3281295
« Last Edit: April 16, 2021, 10:30:54 am by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #51 on: April 16, 2021, 10:38:47 am »
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.

Sorry dude:

https://en.wikipedia.org/wiki/Lisp_machine

It has been done and it worked really well.

Also JavaOS:
https://en.wikipedia.org/wiki/JavaOS

(and if you think that is something research and exotic, look up what Jazelle is - ARM CPUs had specific support for running Java bytecode natively ...)


There is nothing intrinsic about garbage collection that would prevent you from writing an OS in in a language using it. Garbage collection can be both controlled and disabled when you don't want it to interfere with important processing. Again something that has been done many times.

The same about C/C++ and assembly - the underlying hardware runs machine code and really does not care squat about how you generate it. Whether it is by manually punching cards or by some sophisticated compiler/assembler stack.

That doesn't mean you would write an OS in something like Python these days but it has nothing to do with this garbage collection urban myth.

« Last Edit: April 16, 2021, 10:44:10 am by janoc »
 
The following users thanked this post: tooki

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2150
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: any examples of OS not written in C/C++?
« Reply #52 on: April 16, 2021, 12:21:01 pm »
I vaguely remember parts of AmigaOS were written in BCPL. C is not that old. I figure most OS before Unix were written in something else but C.
Everybody likes gadgets. Until they try to make them.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: nz
Re: any examples of OS not written in C/C++?
« Reply #53 on: April 16, 2021, 12:51:26 pm »
I vaguely remember parts of AmigaOS were written in BCPL. C is not that old. I figure most OS before Unix were written in something else but C.

OSes before Unix were written in assembly language! It was absolutely heretical to think that an OS could be written primarily in a high level language -- not to mention a portable one.
 

Online janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #54 on: April 16, 2021, 01:13:59 pm »
OSes before Unix were written in assembly language! It was absolutely heretical to think that an OS could be written primarily in a high level language -- not to mention a portable one.

That's just false.

https://en.wikipedia.org/wiki/History_of_operating_systems

Quote
Burroughs Corporation introduced the B5000 in 1961 with the MCP (Master Control Program) operating system. The B5000 was a stack machine designed to exclusively support high-level languages, with no software, not even at the lowest level of the operating system, being written directly in machine language or assembly language; the MCP was the first[citation needed] OS to be written entirely in a high-level language - ESPOL, a dialect of ALGOL 60 - although ESPOL had specialized statements for each "syllable"[NB 2] in the B5000 instruction set. MCP also introduced many other ground-breaking innovations, such as being one of[NB 3] the first commercial implementations of virtual memory. The rewrite of MCP for the B6500 is still in use today in the Unisys ClearPath/MCP line of computers.

That is an actual commercial system (thus not some boutique lab research thing of which there were plenty) and predates even development of C (Algol 60 was a major inspiration for both B, BCPL and later C), not just Unix.

Others:

- Pilot https://en.wikipedia.org/wiki/Pilot_(operating_system) (writen in Mesa)
- Forth has been (and still is) used on bare hardware as a rudimentary OS

Probably some more.

That something is prevalent doesn't mean it is the only way of doing things and that doing things in another way is impossible or hasn't been done.
 
The following users thanked this post: tooki

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 10576
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #55 on: April 16, 2021, 02:16:27 pm »
I vaguely remember parts of AmigaOS were written in BCPL. C is not that old. I figure most OS before Unix were written in something else but C.

OSes before Unix were written in assembly language! It was absolutely heretical to think that an OS could be written primarily in a high level language -- not to mention a portable one.

*Cough* Multics. *Cough*
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Online janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #56 on: April 16, 2021, 02:56:11 pm »
*Cough* Multics. *Cough*

Multics is not a good counter-example to his claim. Parts of it were written in PL/I but a large part was in assembly.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: any examples of OS not written in C/C++?
« Reply #57 on: April 16, 2021, 03:08:23 pm »
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.

Early AmigaDOS was also written in BCPL, and later versions still included some remnants.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14309
  • Country: fr
Re: any examples of OS not written in C/C++?
« Reply #58 on: April 16, 2021, 03:11:19 pm »
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.

Not true, provided you are sufficiently imaginative and clever!

Yep. Of course you can. Now whether this is a good idea is another question. Not a trivial one to answer either.

We'd first need to consider what part of the "OS" we are talking about. Kernel? Drivers? Higher-level stuff? All of this? And what kind of architecture? Monolithic? Microkernel? This may all have an impact on the applicability of garbage collection.


 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #59 on: April 16, 2021, 03:11:54 pm »
 >:D >:D >:D >:D >:D >:D >:D

And in the end, all the above examples proved to be mostly of academic and research interest (even there, just briefly) and abject commercial failures, this is why they are now a footnote in OS history.
Of course, the people experimenting with this stuff in '70 had the excuse that it was not tried before, but really, "Language X" machines ?!?!
What if I want to run a "Language Y" program on the highly optimized "Language X" machine ?

Probably they're still wondering how come nobody was interested in such a perfect Lisp language optimized machine, that besides an ultra narrow application in academia, is fully useless for anything else, and believing that general purpose computers and Windows killed their proprietary abomination because of M$ monopoly  :-DD, oh wait, that was way before Windows, it tells scores when bloody Unix !!! was immediately considered more user friendly and useful than their monstrosity.

I mean, because the CPU complexity becomes higher and higher, along with cheap RAM and lot of cores, it is conceivable that there will be a general purpose OS written in some higher level language in the future, other than a combination of C and assembly, to hold the hand of feeble minded incompetents, oh sorry, that sounded too harsh, to "increase security and reliability" and "reduce the development costs and time to market", but the most lame way to waste money is to produce language specific optimized CPUs and platforms, I don't see many Jazelle running CPU lately, do you ?

 Cheers,
 DC1MC
 >:D >:D >:D >:D >:D
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14309
  • Country: fr
Re: any examples of OS not written in C/C++?
« Reply #60 on: April 16, 2021, 03:13:06 pm »
I vaguely remember parts of AmigaOS were written in BCPL.

Do you have any reference to back up that claim?
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7695
  • Country: de
  • A qualified hobbyist ;)
Re: any examples of OS not written in C/C++?
« Reply #61 on: April 16, 2021, 03:34:03 pm »
Amiga ROM Kernel Reference Manual series.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #62 on: April 16, 2021, 03:46:45 pm »
And in the end, all the above examples proved to be mostly of academic and research interest (even there, just briefly) and abject commercial failures, this is why they are now a footnote in OS historu machines

That's overstating it, of course. It.is also missing a key point: why?

The answer isn't technical merit but cost and opportunity. C and Unix were given away freely because they didn't have commercial value to AT&T.

Something similar happened with the WWW and HTML from CERN.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline dave j

  • Regular Contributor
  • *
  • Posts: 127
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #63 on: April 16, 2021, 03:48:14 pm »
I vaguely remember parts of AmigaOS were written in BCPL.

Do you have any reference to back up that claim?
The AmigaDOS part of AmigaOS was the corresponding bits of TRIPOS, which was written in BCPL, ported to use the AmigaOS kernel. It was replaced in later versions with C code. See the Wikipedia page on AmigaOS for more details.

I was a TRIPOS systems programmer in the early 1990s and using the Amiga command line was essentially the same as using a TRIPOS system.
I'm not David L Jones. Apparently I actually do have to point this out.
 
The following users thanked this post: SiliconWizard

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #64 on: April 16, 2021, 03:53:20 pm »
What if I want to run a "Language Y" program on the highly optimized "Language X" machine ?

Nowadays the very real problem is that no architecture will ever be built unless it can run C -- even though there would be many many significant advantages if C's problems could be left in the past where they belong. C is now a major impediment to improvement  just like the 80x86 ISA.

There have been only two interestingly innovative architectures recently: the Mill and xCORE.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3796
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #65 on: April 16, 2021, 04:03:38 pm »
There have been only two interestingly innovative architectures recently: the Mill and xCORE.

in my opinion, that's because in modern projects (softcore and researching) they don't have dreams, they have commercial goals ...
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3796
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #66 on: April 16, 2021, 04:06:32 pm »
OK, it's planned for this weekend a new attempt to write a "scheduler" in assembly.

I can do it
I can do it
I can do it

Can I?  :o :o :o
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #67 on: April 16, 2021, 04:09:49 pm »
There have been only two interestingly innovative architectures recently: the Mill and xCORE.

in my opinion, that's because in modern projects (softcore and researching) they don't have dreams, they have commercial goals ...

Which demonstrates you have zero knowledge of either. Both enable orders of magnitude improvement in different areas - that's why they are interesting.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #68 on: April 16, 2021, 04:11:20 pm »
>:D >:D >:D >:D >:D >:D >:D

And in the end, all the above examples proved to be mostly of academic and research interest (even there, just briefly) and abject commercial failures, this is why they are now a footnote in OS history.

You mean like that Burroughs mainframe system which is still used to this day?


Of course, the people experimenting with this stuff in '70 had the excuse that it was not tried before, but really, "Language X" machines ?!?!
What if I want to run a "Language Y" program on the highly optimized "Language X" machine ?

Then you most likely can - that an OS is written in one language doesn't automatically mean that it won't run anything else.

And moving the goalposts, aren't we?


Probably they're still wondering how come nobody was interested in such a perfect Lisp language optimized machine, that besides an ultra narrow application in academia, is fully useless for anything else,

Yeah right, that's why LispMachines Inc. and Symbolics were making such a killing in the late 70s and 80s - with graphic UIs, networking etc. when everyone else was using dumb terminals and later on 80x25 text ...

They were used for a lot of things, that they were obsoleted in the 90s and replaced by other things is normal evolution of technology (and most had zero to do with Lisp but with poor business decisions of the companies making them). SGI workstations were also the high end graphic workstation "duck's guts". You can't buy one anymore. Does that mean they were "useless for anything else too"? Probably one of your cars was designed on one.

I mean, because the CPU complexity becomes higher and higher, along with cheap RAM and lot of cores, it is conceivable that there will be a general purpose OS written in some higher level language in the future, other than a combination of C and assembly, to hold the hand of feeble minded incompetents, oh sorry, that sounded too harsh, to "increase security and reliability" and "reduce the development costs and time to market", but the most lame way to waste money is to produce language specific optimized CPUs and platforms, I don't see many Jazelle running CPU lately, do you ?

Sorry but that's just in an incoherent rant based on ignorance. There are quite a few OSes out there written in higher level languages than C and assembly that are in current use, even though most mainstream stuff is still written in C,C++ and assembly. That you don't know one (and when shown examples you always find excuse why it somehow doesn't count) is only your problem, really.

Also you are conflating commercial success with the language the OS was written in, even though those two are completely orthogonal issues. And then you use that claim that because something was a commercial failure it somehow implies that one cannot write a working OS in a high level language. Way to go, first class demagogy right there ...

Not going to waste more time here.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #69 on: April 16, 2021, 04:12:15 pm »
OK, it's planned for this weekend a new attempt to write a "scheduler" in assembly.

I can do it
I can do it
I can do it

Can I?  :o :o :o

A simple cooperative scheduler for a 6800 only takes a dozen instructions or so. If you can't do!that then you aren't thinking clearly :)
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: DiTBho

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: any examples of OS not written in C/C++?
« Reply #70 on: April 16, 2021, 04:15:05 pm »
Not going to waste more time here.

Agreed.

The smell of terminal cluelessness or trolling is overwhelming.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #71 on: April 16, 2021, 04:19:22 pm »
...
There have been only two interestingly innovative architectures recently: the Mill and xCORE.

The Mill - dead as a door nail, before being alive, ultra-proprietary patent troll stuff.
xCORE  - (almost) dead, but was living briefly and still twitching, still nobody gave a rat behind about it and then it sunk in the bucket of bad ideas, no next Atmel or STM anytime soon.

So much for the innovation, anybody with a bit of brain can imagine a CPU architecture (see OpenCores CPU section), but if it does not offer massive advantages over the existing stuff, it will be just an exercise in spending venture or EU grants money.
IMHO, the advancements in code analyzers and simulators will make the existing stuff secure enough (fast already is) without the need of introducing strange cumbersome concepts, of course if the HW guys will stop cutting corners in an attempt to squeeze the last bit of performance.
 
The following users thanked this post: DiTBho

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: any examples of OS not written in C/C++?
« Reply #72 on: April 16, 2021, 04:24:37 pm »
Not going to waste more time here.

Agreed.

The smell of terminal cluelessness or trolling is overwhelming.

I have to let you know sir, that I'm very cluefull with a terminal, so it may something else...  >:D

Now, what other wonderful long dead OS was written in a long dead advanced language and what will the future bring us ?
 
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8605
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #73 on: April 16, 2021, 04:51:26 pm »
C is now a major impediment to improvement  just like the 80x86 ISA.
I'm not clear what you mean by that. Can you give examples?

There have been only two interestingly innovative architectures recently: the Mill and xCORE.
The Mill is an interesting CPU architecture. The interesting thing about xCORE is the way the CPUs cooperate, rather than anything about the architecture of the CPUs.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8605
  • Country: gb
Re: any examples of OS not written in C/C++?
« Reply #74 on: April 16, 2021, 04:54:05 pm »
xCORE  - (almost) dead, but was living briefly and still twitching, still nobody gave a rat behind about it and then it sunk in the bucket of bad ideas, no next Atmel or STM anytime soon.
The xCORE dominates in some niches, like professional audio. Whether that is enough to keep the business alive long enough to broaden its appeal is the key question.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf