Page 1 of 2
Kernel Languages
Posted: 5. May 2012, 11:11
by deja69
On a general question again
Ive been reading a fair amount on this,and finding it equally fascinating and mindboggling.
i just wondered what forum users opinions were?
I would assume SalixOS,as with most Linux kernels are written in C,with a smidgin of assembly.
Theoretically could a kernel be written in any language?
Know of any Pascal,Python,Java,etc based kernels
Please excuse the fact im basing my assumptions with huge gaps of knowledge,just with a little communication,it can create some innovation.....theoretically

Re: Kernel Languages
Posted: 5. May 2012, 11:27
by deja69
Found an amusing take on C++ efforts.( L4 IS C++ too !)
http://kerneltrap.org/node/2067
Re: Kernel Languages
Posted: 5. May 2012, 17:24
by deja69
Nice little websites for kernel n00bs
http://kernelnewbies.org/
Re: Kernel Languages
Posted: 5. May 2012, 19:15
by mlmyers
deja69 wrote:On a general question again
Ive been reading a fair amount on this,and finding it equally fascinating and mindboggling.
i just wondered what forum users opinions were?
I would assume SalixOS,as with most Linux kernels are written in C,with a smidgin of assembly.
Theoretically could a kernel be written in any language?
Know of any Pascal,Python,Java,etc based kernels
Please excuse the fact im basing my assumptions with huge gaps of knowledge,just with a little communication,it can create some innovation.....theoretically

At the distribution level, I think the kernel is modified more by changing configurations than by actual coding. Some distributions can pay engineers to have them work on aspects of the kernel that are relevant to them, but I believe that is the exception.
One reason C is so good for kernel coding, aside from its relative speed, is how low-level it is in comparison with, say, Java. Since Java apps need a JRE and the kernel is the part of the OS that initializes and interacts with the hardware in the most basic ways, how would you start a JRE before the kernel itself? As for the other languages, the questions you might ask yourself are:
* Is it fast enough?
* Is it flexible enough?
* Can it deal with hardware in a direct fashion?
Glad to see you're curious enough to do some research to fill in those knowledge gaps.
Cheers.
Re: Kernel Languages
Posted: 6. May 2012, 12:04
by deja69
Thanks for the encouragement,mlmyers
I tend to think conceptually,and enthusiastically go off on pipe dreams,only to get so far and suddenly realise i need hard data and solid understanding of the mathematics
I guess,my impression is that core components,kernel and operating system appear separate to each other, and it feels intuitive for them to 'think' more cooperatively,and have the ability to compensate for changes in each,from the little i have read of Minix,it appears they are in the same mindset maybe?
With regards to a Java kernel,i agree this does offer a challenge and from what i have read Sun Java's JRE licensing does not allow 'stripping down' of the JRE to minimal...still,never to be deterred
A glimmer of hope is maybe in the following project
http://code.google.com/p/aparapi/
Meanwhile on thoughts,i have a seed of an idea of a dedicated compositing manager for SalixOS,based on photosynthesis
https://en.wikipedia.org/wiki/Photosynthesis ,i just need to continue on the 'type' of green fingers i have
Keep propagating

Re: Kernel Languages
Posted: 6. May 2012, 12:20
by thenktor
deja69 wrote:I would assume SalixOS,as with most Linux kernels are written in C,with a smidgin of assembly.
Salix OS is based on the one and only Linux kernel. No idea what you are talking about when you say "most Linux kernels".
Since Java apps need a JRE and the kernel is the part of the OS
You can compile Java apps so they don't need a JRE anymore.
Re: Kernel Languages
Posted: 6. May 2012, 12:47
by deja69
Its okay thenktor
My reflections means im straying in to Unix kernel territory.
Does a 'Linux' kernel HAVE to be C/Assembly to BE a 'Linux' kernel? No Mods?
Apart from SalixOS being an attractive distro,your resolve to be a 'pure' Linux Slackware ethos,means for learning it helps me 'snap back' to focus from too much dissipating.
Similarly,Microsoft has had heaps of criticism heaped upon it,it HAS acted as a focal point and rallying call for other distributions to frequently outperform,which,when you think of the influence the Big M has,is sadly unforgivable.
mlmyers reply was in regards to a Java based 'kernel',and problems with regards to its possibility...so how its implemented or whether yes JRE or no JRE, im yet to discover.
Answers maybe in these distributions?
http://jos.sourceforge.net/
http://www.jnode.org/
http://sourceforge.net/projects/jxos/
Re: Kernel Languages
Posted: 6. May 2012, 13:02
by Shador
Yes, there are kernels that run inside a JRE or other runtime environments like .NET. So when booting you first have to setup that runtime environment and than the execution of the actual kernel starts.
Or you do it like thenktor said, but that could have other advantages/disadvanages than a runtime environment.
Re: Kernel Languages
Posted: 6. May 2012, 13:10
by deja69
Thanks Shador
It makes sense to have comprehensive understanding to give details context.
And,for a FOSS fish we can contemplate whether it is sensible to swim too near to the .NET

Re: Kernel Languages
Posted: 6. May 2012, 15:31
by deja69
Ouch ..ive just discovered what its like to be kicked in the face by Amdahl's law
