if kernel rewritten from scratch

Why would anyone want to rewrite it?

It would take lots of time, lots of effort, it would stall any real development for a long time (devs would be busy rewriting, instead of adding new features and fixing bugs), it would introduce new bugs and it would bring us nothing.

Why do you think the kernel -- and supposedly the rest of FreeBSD as well -- should be rewritten? Be it C++, F#, or FORTRAN.
 
But then again, remember the USB stack before 8 branch ? It was re-written because pretty much no one was satisfied of how it was working (well, actually, not working).

At a certain point, you realize the whole darn thing might be better off written in another way just because of .... many reasons.

Realistically, how many of you came back to a script you wrote 2y ago and said "Hmm, this script would make more sense if it was written in another way" ?

Of course, if time is an issue, rewriting something is non-sense (if it works good enough) but if time is not an issue, sure ... why not (if it makes sense to do it) ? Times change, scripting/programing languages change, ppl change and if you fall behind you will be (left) behind.


My 2c.
 
It's one thing to rewire a subsystem of kernel.
It's completely another thing to rewrite kernel.

Also If you think FreeBSD should rewrite kernel, please explain why? Does current kernel doesn't work well?
 
mm

I think freebsd FreeBSD with current kernel work very well I'm not asking about if we need to rewrite it or not, unix kernel developed from long time ago, I just wonder if there are any reason demand freebsd FreeBSD community to rewrite the kernel what language would they use and technology?
(the only language was suitable in the past was c)
 
darkshadow said:
Will it be rewritten using c++? Or another language?
Actually I don't know what C++ can give to kernel. This is pretty low-level programming, so moving to high level is just another headache.
 
I think the motivation behind the question should be understood - Are you asking what language a modern operating system would be written in?
 
Millions of generations of chickens and eggs can't be wrong:
C is still the best choice for an operating system.

(Hmmm, or is it eggs before chickens?)
 
rden said:
Millions of generations of chickens and eggs cant be wrong:
C is still the best choice for an operating system.

(Hmmm, or is it eggs before chickens?)

Recent scientific research proved that chicken was before egg....
Don't ask me how they proved, it's to complex to explain in my native language, not to speak about English :D
 
rden said:
Millions of generations of chickens and eggs cant be wrong:
C is still the best choice for an operating system.

(Hmmm, or is it eggs before chickens?)

There is no question what came first, chicken or egg. It was the rooster.
That's what she said ;)

Apart from that, some good systems have been written in other languages than C, heck there even is a complete system (including compiler, ...) written in some variant of FORTRAN. But for the FreeBSD kernel, C is the best choice. Maybe one day the language will be some subset of C with several things stripped out, then it will no longer be C. Maybe one could call that a rewrite.
 
FreeBSD should be rewritten in assembly to get maximal performance. Both clang and gcc fail to give performance to your code.
 
richardpl said:
FreeBSD should be rewritten in assembly to get maximal performance. Both clang and gcc fail to give performance to your code.

Good bait to hook trolls. Congrats!
Your statement is completely correct, and utterly wrong at the same time, if I may be so bold to say so.

But I hope you own, and wear, fireproof underwear? I mean there may be those who do not get the joke :)
 
using assemply

I think they will take
100 year to develop
100 year to debug
till that they arch will change they will repeat the process
I was think about middle level language
 
richardpl said:
FreeBSD should be rewritten in assembly to get maximal performance.
Possible, but we would lose portability. And one would need *good* assembly programmers or the result will be as unoptimized and inefficient as code written in the most HLL.


~~~~


darkshadow said:
100 year to debug
Assembly is the easiest to comprehend and most logical language if you understand how an architecture works, so no. I think it would be only slightly slower to debug than C.

darkshadow said:
I was think about middle level language
Choose C-- or C + a lot of inline assembly and you have already lost portability which is important for systems like FreeBSD.
C is and will always be the best choice.
Choose anything higher and efficiency starts to decrease. Even the output of C compilers is sometimes horrible. Check it out and see for yourself.
 
killasmurf86 said:
Recent scientific research proved that chicken was before egg....
Don't ask me how they proved, it's to complex to explain in my native language, not to speak about English :D

I'll explain. This is an easy question to answer if you think about evolution. It's clear that the chicken came first. Something that wasn't completely a chicken gave birth to a chicken. What about the egg? Isn't it a chicken egg? Well, no, it was a "something that wasn't completely a chicken" egg that had a chicken in it.


As for darkshadow's kernel question, just take a look at this page:
http://en.wikipedia.org/wiki/Comparison_of_open_source_operating_systems

C dominates the list as the kernel programming language. You want efficiency in the kernel, and there's very few options available if efficiency is your main concern.
 
Historically it was written in assembly. Also C has ties to the system due to the need for a portable assembler. UNIX birthed C to birth UNIX. Almost in the same sense to use enough assembly to create the smallest amount of C possible to build the rest of the language within itself...C.
 
UNIXgod said:
Almost in the same sense to use enough assembly to create the smallest amount of C possible to build the rest of the language within itself...C.

Originally that was true but these days the most common way to produce a compiler is to write the first one in another language (commonly C) and/or on another machine (with a modified output stage for the target machine). Sure the first few C compilers were written in PDP assembly (PDP-7) but eventually it compiled itself. (They later even used YACC (written in C) to produce C compiler C source code.)

It's been a long time since a brand new compiler started as assembly.

Also not all languages are eventually used to compile themselves: consider writing a COBOL compiler in COBOL - technically not impossible, but not a idea unless you hate yourself.
(Whats the chances while the younguns are Wiki-ing COBOL some old timer will tell me they did just that).
 
Back
Top