Osdev standards...

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
mitzampt
Posts: 1
Joined: Sun May 25, 2008 2:04 am
Location: romania,PH

Osdev standards...

Post by mitzampt »

Hi,
I'm thinking about starting my own project or adhering to one soon, but first i'm planning and I have some thoughts/questins i want to share:
1. Can there be other executable formats for kernels, i mean custom ones? I'm thinking about one that allows you to use separate compiled parts of the kernel into one big picture of the image? I find quite dificult to follow a monolithic structure (example linux kernel) without some sort of mapping of it's guts.
2. Can someone point me a language that it's equally fast and comprehensive, both compiled and interpreted? This is for basic system interfacing/system calls/shell.... Fast may not be the most important quality....
3. How many of you have succeded making a operating system with a object oriented language compiler and standard library (that means C++) and kept an object oriented structure? Can anyone point me a project which is still in development of this kind?
The bottom line is, according with the topic title: Can osdev use developer experience to formulate some standards about operating systems, new standards that complete the goals POSIX and other standards had? Executable format, language, system layout recommendations, mappings, some points of reference for a good operating system.... only POSIX standard alone, if kept in an operating system allows easy porting of software and that is a big advantage. But POSIX is not complete, not as nearly as comercial software developers' ones...

Hope i don't make a big fool out of myself...
Mike
2xTZ
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Osdev standards...

Post by Troy Martin »

Welcome to the forums!

1. Sure, you can code your own and parse the header. I was thinking of doing one for my OS.
2. If you're looking for really fast, you should go for assembly language. I think C is a good high level language, personally.
3. Never tried it. But remember, in OS development, you have to code EVERYTHING yourself, especially in protected mode with high-level language. So there's no libraries to do stuff for you.
Hope i don't make a big fool out of myself...
Nope, you didn't! Perfectly logical and smart questions.

Good luck with your OS,
Troy
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Osdev standards...

Post by Love4Boobies »

mitzampt wrote: 3. How many of you have succeded making a operating system with a object oriented language compiler and standard library (that means C++) and kept an object oriented structure? Can anyone point me a project which is still in development of this kind?
Troy Martin wrote:3. Never tried it. But remember, in OS development, you have to code EVERYTHING yourself, especially in protected mode with high-level language. So there's no libraries to do stuff for you.
Well, if you want OOP, C++ isn't necessarily what you need. C, as opposed to wha t Troy Martin said, is not a high level language, but rather a middle level language. C++ is a higher level language and has all sorts of stuff that you'll need to write yourself (standard library); however, OOP support is not one of these things. Try Objective C if it meets your requirements.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Osdev standards...

Post by Troy Martin »

Heh, middle-level, I like that. I'd apply that to my NASM macros though xD
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
thre3dee
Member
Member
Posts: 34
Joined: Mon Nov 03, 2008 7:42 pm

Re: Osdev standards...

Post by thre3dee »

Love4Boobies wrote:however, OOP support is not one of these things
I fail to see how people constantly disregard C++ as being object-oriented. Its not quite high level and not quite low level but its classes provide a lot of flexibility and satisfy the "OOP" definition. The whole point of C++ was to add object-oriented programming to C.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Osdev standards...

Post by neon »

3. How many of you have succeded making a operating system with a object oriented language compiler and standard library (that means C++) and kept an object oriented structure?

...Are you looking for a number here? Im sure plenty of people here use C++. My new systems design is an example and is very object oriented.
I fail to see how people constantly disregard C++ as being object-oriented. Its not quite high level and not quite low level but its classes provide a lot of flexibility and satisfy the "OOP" definition. The whole point of C++ was to add object-oriented programming to C.
<opinion>
Agreed. classes, namespaces, multiple inheritance are enough for me to want to choose C++ over C any day; and none of those require a runtime. They provide a much cleaner way of writing object oriented code then C ever could. In this respect C is more lower level then C++; but I prefer cleaner code and design.
</opinion>
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
thre3dee
Member
Member
Posts: 34
Joined: Mon Nov 03, 2008 7:42 pm

Re: Osdev standards...

Post by thre3dee »

neon wrote:3. How many of you have succeded making a operating system with a object oriented language compiler and standard library (that means C++) and kept an object oriented structure?

...Are you looking for a number here? Im sure plenty of people here use C++. My new systems design is an example and is very object oriented.
I fail to see how people constantly disregard C++ as being object-oriented. Its not quite high level and not quite low level but its classes provide a lot of flexibility and satisfy the "OOP" definition. The whole point of C++ was to add object-oriented programming to C.
<opinion>
Agreed. classes, namespaces, multiple inheritance are enough for me to want to choose C++ over C any day; and none of those require a runtime. They provide a much cleaner way of writing object oriented code then C ever could. In this respect C is more lower level then C++; but I prefer cleaner code and design.
</opinion>
Exactly. C++ falls under a category of object-oriented programming called class-based programming. But its still an object-oriented programming language whether you want it to be or not.
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Osdev standards...

Post by madeofstaples »

thre3dee wrote:
Love4Boobies wrote:C++ is a higher level language and has all sorts of stuff that you'll need to write yourself (standard library); however, OOP support is not one of these things.
I fail to see how people constantly disregard C++ as being object-oriented. Its not quite high level and not quite low level but its classes provide a lot of flexibility and satisfy the "OOP" definition. The whole point of C++ was to add object-oriented programming to C.
I added the entire sentence back into Love4Boobies's quote because as it reads, it appears he is saying that the OOP aspect of C++ is not something for which the OS developer has to write specific support (as opposed to the C++ standard library).

In other words, rather than "disregard[ing] C++ as being object-oriented," it would seem Love4Boobies actually asserted that C++ is inherently object-oriented.
Some people are offended by the verifiable truth; such people tend to remain blissfully unencumbered by fact.
If you are one of these people, my posts may cause considerable discomfort. Read at your own risk.
cg123
Member
Member
Posts: 41
Joined: Wed Sep 27, 2006 2:34 pm

Re: Osdev standards...

Post by cg123 »

berkus wrote:1. Definitely. There are lots out there already.
2. Python.
3. http://metta.exquance.com/
As much as I love Python, I'm going to have to set you straight on that. Python could perhaps be called fast in comparison to a turing machine implemented in Brainfuck. With a stretch of imagination, it could be called fast in comparison to Perl. But in any other situation? Python is dead slow. Psyco and the likes help, but you're still going to have serious performance problems with anything time-critical. That's even ignoring the fact that it takes a bit of a stretch of imagination to say it can be compiled at all.

However, I'd say it's extremely plausible to use RPython.
Post Reply