LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-27-2010, 11:23 AM   #1
eveningsky339
Member
 
Registered: Mar 2010
Location: Western Maine
Distribution: PCLinuxOS (LXDE)
Posts: 466

Rep: Reputation: 51
High-level languages and kernel creation


Just a quick question out of curiosity.

Most kernels are written in low level programming languages such as C and Assembly. Would it be possible to write a kernel in a high level language such as Python? Many high-level languages are themselves written in C.
 
Old 04-27-2010, 11:40 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
No. Python is an interpreted language, therefore nothing can interpret it until a system is up and running and the python interpreter is available. In this scenario a kernel couldn't ever boot up!
 
1 members found this post helpful.
Old 04-27-2010, 11:45 AM   #3
eveningsky339
Member
 
Registered: Mar 2010
Location: Western Maine
Distribution: PCLinuxOS (LXDE)
Posts: 466

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by colucix View Post
No. Python is an interpreted language, therefore nothing can interpret it until a system is up and running and the python interpreter is available. In this scenario a kernel couldn't ever boot up!
Hmm, very good point!

I'm aware that this proposition would be cumbersome and unnecessarily complicated, but bear with me. What about a "two-part" OS-- a small, simple, mini-OS to get the interpreter up and running, and then booting up the high-level kernel?
 
Old 04-27-2010, 12:40 PM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by eveningsky339 View Post
I'm aware that this proposition would be cumbersome and unnecessarily complicated, but bear with me. What about a "two-part" OS-- a small, simple, mini-OS to get the interpreter up and running, and then booting up the high-level kernel?
I guess that's possible, but many of the things an OS needs to do are almost right down to the CPU's inner workings, even lower-level than C.
 
Old 04-27-2010, 02:24 PM   #5
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
But that would be unbelivable wasteful and slow.
 
Old 04-27-2010, 02:53 PM   #6
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 110Reputation: 110
http://wiki.osdev.org/Languages

Words of Wisdom.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Very high system level processing kenneho Linux - Server 10 01-12-2009 05:20 AM
accessing SPI from kernel level and user level ramya_ts Programming 1 01-06-2009 07:30 AM
help for high level shell script kushkothari Programming 13 10-29-2008 11:16 PM
High-level question about printing via a router? gtjmn308 Linux - Networking 2 09-23-2006 09:21 AM
low level languages devit Programming 2 05-07-2004 11:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration