views:

2555

answers:

8

I was just wondering who knows what programming languages Windows, Mac OS X and Linux are made up from and what languages are used for each part of the OS (ie: Kernel, plug-in architecture, GUI components, etc).

I assume that there are multiple languages for each and obviously I know the Linux kernel is written in C.

I'm totally guessing here that Mac OS X contains a lot of Objective-C code as it is Apple's language derived from NeXT.

Windows, I have heard contains C, C++ and Intel Assembly. Do Linux or Mac OS contain any Assembly code?

Also, are there scripting languages like Ruby, Python, etc used by the OS developers for scripting parts of the OS? What parts of the OS would be written in each language?

+1  A: 

Windows: Mostly C and C++, some C#

Larry Osterman
c#!!! NO WAY, REALLY??????!
Aaron
.NET is shipped with Windows. A lot of .NET is in C#.
Jonathan Parker
There's rumors that future versions (Windows 8 maybe) of windows will have some C++ code replaced with C#/.NET.
Jonathan Parker
They've already managed a working OS (almost) completely in C#. It's called Singularity. http://research.microsoft.com/en-us/projects/singularity/
Randolpho
C/C++ is managed(.net version of) C/C++
Sharique
Luc M: Yes, there's C# code in Windows. Poke around and you'll find it..Net is shipped with the OS but it doesn't mean the OS is written using .Net.And Windows isn't Singularity. There's a huge difference between a research prototype and a real operating system.
Larry Osterman
I'm pretty sure at least Windows XP can work entirely without any .NET runtime installed (I'm not sure about Vista), so there can't be any C# in there.
Joachim Sauer
C# consists of bytecode and a virtual machine....if they used that in Windows it would make it rather slow... Oh... now i see.
Brock Woolf
Obviously XP was released a long time before .Net so it would have no dependancy on .Net
1800 INFORMATION
@Brock - you have some seriously wrong information there - C# compiles to IL or native machine code, from there the JIT compiles the IL to machine code when it is run. There is no bytecode and no virtual machine. Perhaps you are thinking of Java?
1800 INFORMATION
@1800Information - C# compiles to machine code from there JIT compiles to machine code when run? I think you are the confused one. There IS bytecode and there IS a virtual machine: http://en.wikipedia.org/wiki/Common_Intermediate_Language
Brock Woolf
+2  A: 

You're right MacOSX has Objective-C in the core.

Windows C++

Linux C

About the scripting languages, no, they pretty much high level.

OscarRyz
Windows in C: kernel, drivers, API. Only system applications and tools in C++, I guess. So it's more clear to say just C
abatishchev
+17  A: 
  • Windows: C++, kernel is in C
  • Mac: Objective C, kernel is in C (IO PnP subsystem is Embedded C++)
  • Linux: Most things are in C, many userland apps are in Python, KDE is all C++
Paul Betts
+1  A: 

The Linux kernel is mostly written in C (and a bit of assembly language, I'd imagine), but some of the important userspace utilities (programs) are shell scripts written in the Bash scripting language. Beyond that, it's sort of hard to define "Linux" since you basically build a Linux system by picking bits and pieces you want and putting them together, and depending on what an individual Linux user wants, you can get pretty much any language involved. (As Paul said, Python and C++ play important roles)

David Zaslavsky
+2  A: 

I have read or heard that Mac OS X is written mostly in Objective-C with some of the lower level parts, such as the kernel, and hardware device drivers written in C. I believe that Apple "eat(s) its own dog food", meaning that they write Mac OS X using their own Xcode Developer Tools. The GCC(GNU Compiler Collection) compiler-linker is the unix command line tool that xCode used for most of its compiling and/or linking of executables. Among other possible languages, I know GCC compiles source code from the C, Objective-C, C++ and Objective-C++ languages.

Patrick Cassell
+1  A: 

http://www.lextrait.com/vincent/implementations.html

this should helped

+1  A: 

Windows is obviously not written in C# (!)

Simply see the source code of Windows and you'll see...

"Simply see the source code of Windows" if you're one of the few that is allowed/able to do that ...
Joachim Sauer
There are a lot of Windows source code parts in Torrents, also a few reviews of it
abatishchev
Parts of the Windows code have leaked out, years ago. See for instance this old thread: <http://www.kuro5hin.org/story/2004/2/15/71552/7795>. :)
unwind
+2  A: 

Mac OS X uses large amounts of C++ inside some libraries, but it isn't exposed as they're afraid of the ABI breaking.

alex strange