Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What language for developing operating systems?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Message
Author
User avatar
oberon
Posts: 7
Joined: 2013-12-19 23:22

What language for developing operating systems?

#1 Post by oberon »

Hello,

I'm curious how to develop for operating systems like Linux. I've started to learn Python right now to get into the whole programming world. But what do i have to learn later to develop for operating systems in the future? Is it C that is the only choice or are there others with more potential? Many questions regarding this.

User avatar
korilius
Posts: 422
Joined: 2012-04-10 00:53
Location: US/IN
Has thanked: 3 times

Re: What language for developing operating systems?

#2 Post by korilius »

Plenty of answers via Google.

This should give you a good start:

http://stackoverflow.com/questions/5200 ... ented-in-c

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: What language for developing operating systems?

#3 Post by dasein »

oberon wrote:Is it C that is the only choice...
Pretty much.

P.S. Do not double-post. More here: http://forums.debian.net/viewtopic.php?f=11&t=10653

User avatar
oberon
Posts: 7
Joined: 2013-12-19 23:22

Re: What language for developing operating systems?

#4 Post by oberon »

dasein wrote:
oberon wrote:Is it C that is the only choice...
Pretty much.

P.S. Do not double-post. More here: http://forums.debian.net/viewtopic.php?f=11&t=10653
Oh, sorry. Someone can delete this topic then. Thanks for the link though!

admoore
Posts: 93
Joined: 2010-05-17 14:29

Re: What language for developing operating systems?

#5 Post by admoore »

This link is something interesting for those interested in OS design:

http://mikeos.berlios.de/

It's a simple OS written in assembly with a tutorial on how to create something like it. Probably a good introduction if you want to work with low-level things.

lilith2k3
Posts: 1
Joined: 2013-12-19 22:35

Re: What language for developing operating systems?

#6 Post by lilith2k3 »

C and C++ will do.

bradhog
Posts: 17
Joined: 2013-12-26 10:03

Re: What language for developing operating systems?

#7 Post by bradhog »

No C is not the only language but still it is considered to be a better one. But you can also use Ruby,Python for this.

bradhog
Posts: 17
Joined: 2013-12-26 10:03

Re: What language for developing operating systems?

#8 Post by bradhog »

I think c and c++ is enough for developing operating system.

zilleplus
Posts: 10
Joined: 2013-09-14 13:50

Re: What language for developing operating systems?

#9 Post by zilleplus »

A lot of people here say use C en C++, this can also be done with java.
I know the performance crap but honnestly C can be really hard for beginners.
Not the mention that it can become very confusing after a while in C, C++ is much better but is still way more complex then java.
Knowing that C++ tends to error on linking and makes the faults unclear.

check out this book:
http://www.amazon.com/Operating-System- ... 1118063333

tomazzi
Posts: 730
Joined: 2013-08-02 21:33

Re: What language for developing operating systems?

#10 Post by tomazzi »

Yeah, I can confirm that I'm bored...
....
The truth is:
If someone asks what language he should use to write an operating system, then everyone can safely assume that this is a waste of time to even try to write a response.

This is a kind of a brain-hack: Peoples who are writting OS-es have deep knowledge of programming languages and their limitations. Nobody would even try to suggest C++ as a "good" langauge for writting the OS - Yes, I'm aware of the fact that there is literally ONE OS written in C++, but that doesn't change anything.

So... perhaps C is good?
No, it's NOT.

At least, it's not sufficient to know C to write an OS.
You have to know HOW THE COMPUTER WORKS (just a hint :) )
...And how to switch processes stacks to implement a very basic multi-threading OS...

Regards
Odi profanum vulgus

マーズ maazu
Posts: 23
Joined: 2015-05-04 05:13
Location: kuala lumpur

Re: What language for developing operating systems?

#11 Post by マーズ maazu »

C.

tomazzi
Posts: 730
Joined: 2013-08-02 21:33

Re: What language for developing operating systems?

#12 Post by tomazzi »

マーズ maazu wrote:C.
Wrong.
C and assembler.

The only way to save/restore CPU "context" is to use assembly language - and this is the *only* possible way to implement multi-tasking and threads...

Regards.
Odi profanum vulgus

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: What language for developing operating systems?

#13 Post by Head_on_a_Stick »

My brother is a professional (games) programmer and he says he prefers C++ over C

I tried to persuade him otherwise but...
deadbang

tomazzi
Posts: 730
Joined: 2013-08-02 21:33

Re: What language for developing operating systems?

#14 Post by tomazzi »

...and what's the common part of writting games and OS-es?

I agree that C++ is "easier" / more comfortable.
But Dot Net is even more comfortable (C#/C-sharp).

The key problem is, that "comfortable" usually has nothing to do with "robust" and in most cases "convenience" is the opposite term to "performance" and "reliability".

...But who cares: Too slow? Buy a faster computer, so "our" lazy/incompetent programmers can continue to write more and more shitty code which will work with barely acceptable speed. Still too slow? - Buy a faster computer... :)

Regards.
Odi profanum vulgus

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: What language for developing operating systems?

#15 Post by Head_on_a_Stick »

tomazzi wrote:...and what's the common part of writting games and OS-es?
None whatsoever :(

I am very sorry, I will refrain from posting in programming related threads in the future.
deadbang

tomazzi
Posts: 730
Joined: 2013-08-02 21:33

Re: What language for developing operating systems?

#16 Post by tomazzi »

In any case, my intention was not to offend You - It is observable, that today most companies are selling shitty software.
Example #1:
Winblows (Microshit by-product) is working only slower and slower with each version, despite the fact, that in the mean time computing power of average PC have increased at least 10 times.
Example #2:
minetest is several times faster (while offering better graphics effects) than that crappy java version called minecraft (now microshit)
Example #3:
Something like a 15 years ago, Doom3 was created - it offers great effects and quite good physics on a 10-years old computers - unreachable for FarCry or Crysis.
...and so on.

BTW: Doom3 creator, John Carmack have sold himself to microshit, and now he claims that directx have magically becomed better than opengl - despite the fact that newer versions of directx are even more shitty than ver 5.0, which he criticised as being, well, crap.

Regards.

Edit:
Winblows is chaep, games are cheap.
Situation looks much worse in case of multi-billion companies, like f.e. Siemens:
They are selling extremely expensive and extremely shitty software for decades - f.e. none of siemens programs can properly refresh its own window - seriously, this is not a joke - they didn't discovered how to do this despite over 20 years of software development... ;)

Eaton:
Eaton bought Moeller few years ago. Moeller had DriveSoft - nice, small program for configuring Frequency Inverters. The program had one problem: It had Moeller Logo, not Eaton's.
So, Eaton created a crap called MaxConnect. This crappy soft is 100 times bigger, 10 times slower and does *exactly* the same thing as DriveSoft did. MaxConnect needs over 900KB to save drive parameters, and DriveSoft needs <30KB

DotNet rulez - You can write shitty software in a convenient and comfortable way.

...and of course unaware customers will cover all the costs.
Odi profanum vulgus

マーズ maazu
Posts: 23
Joined: 2015-05-04 05:13
Location: kuala lumpur

Re: What language for developing operating systems?

#17 Post by マーズ maazu »

tomazzi wrote:
マーズ maazu wrote:C.
Wrong.
C and assembler.

The only way to save/restore CPU "context" is to use assembly language - and this is the *only* possible way to implement multi-tasking and threads...

Regards.
oh yes, assembler. Thank you for the reminder.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: What language for developing operating systems?

#18 Post by GarryRicketson »

assembler
? Do you mean assembly ?

First released in 1971, Unix was written entirely in assembly language as it was common practice at the time.
"assembly" , then cobal, was also important, and fortran is used developing a OS, Pascal is also a very usefull language, there are many others
https://en.wikipedia.org/wiki/Fortran

Anyone interested in programing languages besides just C++, this is a list of them,
https://en.wikipedia.org/wiki/Generatio ... _languages

geekosupremo
Posts: 154
Joined: 2014-10-30 23:17

Re: What language for developing operating systems?

#19 Post by geekosupremo »

tomazzi wrote: You have to know HOW THE COMPUTER WORKS (just a hint :) )
...And how to switch processes stacks to implement a very basic multi-threading OS...
If folks are looking for an overview of "how computers work" Steve Gibson and Leo Laporte did a nice succinct series on this topic in 2010. Probably not enough to call it a "course" but it might get someone in the right direction.

https://www.grc.com/sn/past/2010.htm

The episodes you'll want are 233, 235, 237,239,241, 247, 250, 252, and 254

tomazzi
Posts: 730
Joined: 2013-08-02 21:33

Re: What language for developing operating systems?

#20 Post by tomazzi »

geekosupremo wrote: https://www.grc.com/sn/past/2010.htm

The episodes you'll want are 233, 235, 237,239,241, 247, 250, 252, and 254
Forgive me, but those links are leading to a bullshit-littered, power-point-like presentations, which can make You only confused - really, I've readed all of the topics which You've proposed - bullshits, but painted with a color of "professionalism"...

Best sources: read particular processor specification, published by the manufacturer - there are many of them...

Additional resources: read programmer's guide's published f.e. by ATMEL, AMD or Intel - inside those docs You'll find many references to "how the CPU works" topics, with detailed explanations.

Regards.
Odi profanum vulgus

Post Reply