Kernel Languages

Other talk about Salix
User avatar
deja69
Posts: 89
Joined: 23. Apr 2012, 00:20

Kernel Languages

Post by deja69 »

On a general question again :oops:
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 ;)
User avatar
deja69
Posts: 89
Joined: 23. Apr 2012, 00:20

Re: Kernel Languages

Post by deja69 »

Found an amusing take on C++ efforts.( L4 IS C++ too !)

http://kerneltrap.org/node/2067
User avatar
deja69
Posts: 89
Joined: 23. Apr 2012, 00:20

Re: Kernel Languages

Post by deja69 »

Nice little websites for kernel n00bs :)

http://kernelnewbies.org/
mlmyers
Posts: 23
Joined: 28. Apr 2012, 03:19
Location: Nashville, TN
Contact:

Re: Kernel Languages

Post by mlmyers »

deja69 wrote:On a general question again :oops:
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.
Running a mix of Slackware64 14.0 / Slackware 14.1 + Salix OS packages
User avatar
deja69
Posts: 89
Joined: 23. Apr 2012, 00:20

Re: Kernel Languages

Post 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 :P

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 ;)
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: Kernel Languages

Post 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.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
deja69
Posts: 89
Joined: 23. Apr 2012, 00:20

Re: Kernel Languages

Post 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. :roll:

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/
Last edited by deja69 on 6. May 2012, 13:04, edited 1 time in total.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: Kernel Languages

Post 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.
Image
User avatar
deja69
Posts: 89
Joined: 23. Apr 2012, 00:20

Re: Kernel Languages

Post 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 ;)
User avatar
deja69
Posts: 89
Joined: 23. Apr 2012, 00:20

Re: Kernel Languages

Post by deja69 »

Ouch ..ive just discovered what its like to be kicked in the face by Amdahl's law :twisted:
Post Reply