linux kernel rewrite
linux kernel rewrite
Hello
I'm interested in a new linux kernel, based on the existing .
For that reason, i want to write a new compiler (because:
1. C and C++ aren't very good for kernel programming
1. b) the best language i know is java - but i can't write a kernel in java
2. the gas (assembler) language is awful
So i want to use yasm (or nasm).
I first want to implement a new language.
For that reason, i ask who is also interested in that.
The language will be similar to C/C++ with some details changed ...
I'll write soon
I'm interested in a new linux kernel, based on the existing .
For that reason, i want to write a new compiler (because:
1. C and C++ aren't very good for kernel programming
1. b) the best language i know is java - but i can't write a kernel in java
2. the gas (assembler) language is awful
So i want to use yasm (or nasm).
I first want to implement a new language.
For that reason, i ask who is also interested in that.
The language will be similar to C/C++ with some details changed ...
I'll write soon
Re: linux kernel rewrite
the idea is good if you want to reimplement the architecture (for example to write a microkernel for linux instead of classic monolitic), but the aproach is not to convencing ...
Conclusion : go ahead and good luck XD
wrong : C was especially writen for Unix kernel programing, it is the best language for OS coding, C++ is derivated from C and it is the best choice for oriented object kernels1. C and C++ aren't very good for kernel programing
hmm... I prefer python ;p (can't imagine ? virtual machine running on my OS to be able to run programs)1. b) the best language i know is java - but i can't write a kernel in java
all assembly languages give generally similar performances, it's up to programmer to hoose his assembler (generally for syntax reasons).2. the gas (assembler) language is awful
OKSo i want to use yasm (or nasm).
good luckI first want to implement a new language.
have you allready written a compiler ???I first want to implement a new language.
For that reason, i ask who is also interested in that.
The language will be similar to C/C++ with some details changed ...
Conclusion : go ahead and good luck XD
-----------------------
There are 10 types of people in this world... those that understand binary, and those that don't.
There are 10 types of people in this world... those that understand binary, and those that don't.
Re: linux kernel rewrite
I concur: c was designed explicitly for OS dev and its quite good at it
JAVA is horrible (but then again, i hate OOP so that may just be me)
you can use intel syntax with gas
you can use nasm(or yasm afaik) with GCC(just not for inline)
the asmbler in use has nothing to do with the language: just the programmers choice of tools
or if you dont like GCC use something else(there are thousands of C compilers)
writing your own language is just as big a project as writing an OS: so choose one (plus you wont get much help if you use a custom language because no one else knows it and wont want to learn it just to help you)
JAVA is horrible (but then again, i hate OOP so that may just be me)
you can use intel syntax with gas
you can use nasm(or yasm afaik) with GCC(just not for inline)
the asmbler in use has nothing to do with the language: just the programmers choice of tools
or if you dont like GCC use something else(there are thousands of C compilers)
writing your own language is just as big a project as writing an OS: so choose one (plus you wont get much help if you use a custom language because no one else knows it and wont want to learn it just to help you)
Re: linux kernel rewrite
I agree with language design being a seperate field.
However, I would not call C the end of development for OS coding languages, and C++ not the end of object oriented kernels. Probably they are the best for now! And if those too are not good enough, then, it is time to create your own. But these two have one specific advantage - it is basically possible at all to write nearly everything in that language!
Java for os development is possible too - at a high enough level. It needs a good deal of C or C++ framework (garbage collection etc., bootstrap classloader I guess etc.) As a result, you would build a java virtual machine kernel in C. Drivers might go in Java.
However, I agree with being gcc's inline asm syntax being awful - saving 0,00001% performance as I heard a lot of times now with being proposed as the best since sliced bread while making it 500% harder to use it.
And yet a simpler OOP (as I think OOP is a must for projects bigger then your average hack, i.e. when you really need to solve a problem and you need to create a model of it) language for system development might be a good idea.
However, if you say you are interested in a new linux kernel, do you mean you want to follow the same design (monolithic etc.)? Why bother then anyway?
However, I would not call C the end of development for OS coding languages, and C++ not the end of object oriented kernels. Probably they are the best for now! And if those too are not good enough, then, it is time to create your own. But these two have one specific advantage - it is basically possible at all to write nearly everything in that language!
Java for os development is possible too - at a high enough level. It needs a good deal of C or C++ framework (garbage collection etc., bootstrap classloader I guess etc.) As a result, you would build a java virtual machine kernel in C. Drivers might go in Java.
However, I agree with being gcc's inline asm syntax being awful - saving 0,00001% performance as I heard a lot of times now with being proposed as the best since sliced bread while making it 500% harder to use it.
And yet a simpler OOP (as I think OOP is a must for projects bigger then your average hack, i.e. when you really need to solve a problem and you need to create a model of it) language for system development might be a good idea.
However, if you say you are interested in a new linux kernel, do you mean you want to follow the same design (monolithic etc.)? Why bother then anyway?
*post*
Re: linux kernel rewrite
About the compiler:
I think i only have in mind to "only" improve it (XOR operation / flag enumeration)
The kernel should be very modular with API. One module could be the core (bootup + memory).
I think i only have in mind to "only" improve it (XOR operation / flag enumeration)
The kernel should be very modular with API. One module could be the core (bootup + memory).
Last edited by new_world on Fri Jan 07, 2005 12:00 am, edited 1 time in total.
Re: linux kernel rewrite
That is basically already in the Linux kernel, on the development side, and is still in a process of development. The largest issue would be that the APIs constantely change ...
*post*
Re: linux kernel rewrite
Finally I have enough time to write ...
About the improvments I think:
- XOR operation
- flag handling (optimized by compiler)
- limited macros -> they only apply in some sections of the code
- more warnings (redeclaration in inner functions !!!)
... I will write the compiler in the next time ...
I know this topic shouldn't be here, but if you have suggestions, please tell me!
About the kernel:
A Primary hierarchy:
*Core*
- PCI, AGP, Floppy Controller etc. (busses)
They provide interfaces like USB, FDC, HDC, Firewire etc.
A Secondary hierarchy:
*USB* (interfaces)
- different device drivers like storage
So there won't be lots of API changes, because if you write a USB device driver, you just care the USB-Interface (you register your driver and it would be loaded if your device is found).
The modules are linked to the API, so you just can download a driver from the internet and load it, without compiling it first! (But the API's may change, so they should be written backward compatible i. e. for one year)
It's important for me to write inline assembly (it's more comfortable, you haven't to write large assembler hacks).JAAman wrote:you can use nasm(or yasm afaik) with GCC(just not for inline)
About the improvments I think:
- XOR operation
- flag handling (optimized by compiler)
- limited macros -> they only apply in some sections of the code
- more warnings (redeclaration in inner functions !!!)
... I will write the compiler in the next time ...
I know this topic shouldn't be here, but if you have suggestions, please tell me!
About the kernel:
A Primary hierarchy:
*Core*
- PCI, AGP, Floppy Controller etc. (busses)
They provide interfaces like USB, FDC, HDC, Firewire etc.
A Secondary hierarchy:
*USB* (interfaces)
- different device drivers like storage
So there won't be lots of API changes, because if you write a USB device driver, you just care the USB-Interface (you register your driver and it would be loaded if your device is found).
The modules are linked to the API, so you just can download a driver from the internet and load it, without compiling it first! (But the API's may change, so they should be written backward compatible i. e. for one year)
Re: linux kernel rewrite
Yes, this would be something, this is something that the linux kernel hacker especially avoid - for ideologic reasons mainly. At least for closed source drivers, there might be issues with the GPL as well (when you load them into the kernel address space).
*post*
Re: linux kernel rewrite
I don't think so about the law.
The GPL would affect *only* the kernel.
It don't care if you enhance it by commercial (closed source) modules *just* in memory (you don't compile them together).
I think it's like you run commercial (closed source) programs under Linux.
The GPL would affect *only* the kernel.
It don't care if you enhance it by commercial (closed source) modules *just* in memory (you don't compile them together).
I think it's like you run commercial (closed source) programs under Linux.
Last edited by new_world on Sat Jan 08, 2005 12:00 am, edited 1 time in total.
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: linux kernel rewrite
I've taken an interest in compiler development recently, myself... ultimately, I'd like to have a fully fledged compiler that I can write apps for my OS in... BUT, having said that, my kernel continues to be written in C.
Why? Because C is an extremely good low-level language for writting OSs, and I can (more or less) garauntee that the compiler is generating correct code.
My own language is already in development, and supports several different constructs, etc... but... being in development, I can't garauntee it's producing 100% accurate binary code.
To boil it down; to write an OS in a new language (to me) is much like creating an enigma, using an engima. It's nice to take out as much elements of the unknown as possible, and work with known, and highly-tested, options as much as possible.
As-per Java... entirely possible, of course. I work in a company that's developed a Java virtual machine that can run apps within a 25Mhz, 2MB RAM digital cable box... anything's possible...
In any event, I'd be inclined to think Eiffel is the best OO language out there.
Why? Because C is an extremely good low-level language for writting OSs, and I can (more or less) garauntee that the compiler is generating correct code.
My own language is already in development, and supports several different constructs, etc... but... being in development, I can't garauntee it's producing 100% accurate binary code.
To boil it down; to write an OS in a new language (to me) is much like creating an enigma, using an engima. It's nice to take out as much elements of the unknown as possible, and work with known, and highly-tested, options as much as possible.
As-per Java... entirely possible, of course. I work in a company that's developed a Java virtual machine that can run apps within a 25Mhz, 2MB RAM digital cable box... anything's possible...
In any event, I'd be inclined to think Eiffel is the best OO language out there.
Re: linux kernel rewrite
instead of thinking to enhance the C/C++ compiler urself i think it will be more interesting to join exising project such as C--
it's only my opinion
it's only my opinion
-----------------------
There are 10 types of people in this world... those that understand binary, and those that don't.
There are 10 types of people in this world... those that understand binary, and those that don't.
-
- Posts: 1
- Joined: Tue Oct 26, 2004 11:00 pm
Re: linux kernel rewrite
Well, I currently have an Operating System Approach. It's called the Damn Small OS. It has a lower-level core written in C/Asm, with VFS, etc, providing resources to a libc (currently diet libc) that enable us to make an awesome usage of the Waba Virtual Machine. So the rest of the system, including the kernel it self, is being finished on top of such Machine in Java. So the lowest level part of it is in C/Asm, where Java can't deal with the machine. It's based on some aspects of microkernel and exokernel designs.
And yes, it's completely possible making an OS based on Java (not completely written on it), and you should try it... It might have IRC running on it soon. http://comos.sf.net/tdsos (sources) and http://comos.sf.net/download/commando.tar.bz2 (tree tarball). Feel free.
And yes, it's completely possible making an OS based on Java (not completely written on it), and you should try it... It might have IRC running on it soon. http://comos.sf.net/tdsos (sources) and http://comos.sf.net/download/commando.tar.bz2 (tree tarball). Feel free.