I see there's even no mention of it (except something like "languages like Perl or Java is unlikely to succeed"). I'm ready to add Java related information to some pages, but I'm in doubts if it is really needed.

What do you think?

_________________My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability

I see there's even no mention of it (except something like "languages like Perl or Java is unlikely to succeed"). I'm ready to add Java related information to some pages, but I'm in doubts if it is really needed.

What do you think?

Feel free; I'm sure you aren't the only one here who would find it of interest (even if they aren't using Java themselves - there are more than a few people who want to use C#, as well, and similar issues come up with that, too), so it would be worthwhile, sure. A 'bare bones' on the subject would probably be a good starting point, though I would expect (without knowing good deal more about it than I do) that it would require more work than most of the other BB pages.

I would keep in mind that you'll have to either select a specific Java implementation (again, not knowing enough about it, I imagine gjc is probably easiest to work with for this purpose, but you would know better than I would), or else have separate sections (or even separate pages) for different compilers and JVMs. You will also need to go into detail about a number of issues that don't arise with most other languages, such as porting the JVM and the JIT compiler, implementing the garbage collector(s), handling the JNI to call native code, and so on. Being in a similar position myself (except with a language that doesn't even exist yet), I can tell you that there are more than a few issues that you will need to explain that simply don't come up with, for example, Ada. You can anticipate it taking a fairly long time to get it beyond being just a stub.

_________________Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTFμή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίανLisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.

Last edited by Schol-R-LEA on Fri Nov 13, 2015 2:12 pm, edited 1 time in total.

The thing with OSDev Java is that it requires a programmer that knows well beyond the bounds of Java to succeed in the real challenges of OS development: these are also the ones that Java actively hides from developers.

If you can formulate something truly Bare Bones, that'd certainly be a nice thing. However if it goes more into the direction of "clone this git repository" or "use this support code", then it's probably ill-advised to present the beast in sheep's clothing to the unprepared newcomer. Then again, we don't have a "Rolling your own Android" article either

_________________"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie[ My OS ] [ VDisk/SFS ]

Your approach to writing an OS in Java is pretty specific, so writing documentation about it may give people the wrong impression -- that you can actually write an OS in Java, like you can in C. In reality, you have written a Java-to-x86 byte code assembler, and then written an OS using that.

As long as this is explicitly stated in your wiki page, I think it's fine.

To put it another way, I could add a page to the wiki discussing how to write an OS in XML. But I would need to put a huge disclaimer at the top of the page stating something like:

Quote:

This article discusses the idea of writing both an XML compiler AND an Operating System using XML documents. Normally, XML cannot be compiled directly into executable code. You will need to write your own compiler, or use a pre-existing one, like the one found at http://ozone.codeplex.com

But I would still be documenting my specific implementation, not necessarily an industry "standard".

You may just want to start out by documenting your tools and your OS design, specifically, and later move some or all of it to a "generic" Java OS article, if it makes sense.

Up to you though...

_________________Project: OZoneSource: GitHubCurrent Task: LIB/OBJ file support"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott

A 'bare bones' on the subject would probably be a good starting point, though I would expect (without knowing good deal more about it than I do) that it would require more work than most of the other BB pages....I would keep in mind that you'll have to either select a specific Java implementation (again, not knowing enough about it, I imagine gjc is probably easiest to work with for this purpose, but you would know better than I would), or else have separate sections (or even separate pages) for different compilers and JVMs. You will also need to go into detail about a number of issues that don't arise with most other languages, such as porting the JVM and the JIT compiler, implementing the garbage collector(s), handling the JNI to call native code, and so on. Being in a similar position myself (except with a language that doesn't even exist yet), I can tell you that there are more than a few issues that you will need to explain that simply don't come up with, for example, Ada. You can anticipate it taking a fairly long time to get it beyond being just a stub.

Nice introduction. In case of the implementation in fact it's simpler (Java is standardized much more than C), but I'll try to write about it in the wiki.

BASICFreak wrote:

Though I would not be interested in using Java, I would enjoy reading how it is done .

Ok, I'll try to show it from the perspective of C developers.

Combuster wrote:

If you can formulate something truly Bare Bones, that'd certainly be a nice thing. However if it goes more into the direction of "clone this git repository" or "use this support code", then it's probably ill-advised to present the beast in sheep's clothing to the unprepared newcomer.

Do you think I'll start to advertise my OS? It's not the case. But it is much easier to get examples from my work.

_________________My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability

The thing with OSDev Java is that it requires a programmer that knows well beyond the bounds of Java to succeed in the real challenges of OS development: these are also the ones that Java actively hides from developers.

Low level knowledge is what the osdev.org provides, so I'm not afraid of people who get here and knows nothing about the challenges.

And hiding the low level details is important only for beginners. As time passes a developer starts to understand importance of optimization. But actually there should be some limit to such efforts because it can take a lot of time. Java let's you to stop earlier. But if a developer wants to advance his skills then the low level becomes interesting.

_________________My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability

Your approach to writing an OS in Java is pretty specific, so writing documentation about it may give people the wrong impression -- that you can actually write an OS in Java, like you can in C. In reality, you have written a Java-to-x86 byte code assembler, and then written an OS using that.

We can discuss the approaches to write an OS not in C or assembly. May be it worth to start a separate thread?

SpyderTL wrote:

To put it another way, I could add a page to the wiki discussing how to write an OS in XML. But I would need to put a huge disclaimer at the top of the page stating something like:

Quote:

This article discusses the idea of writing both an XML compiler AND an Operating System using XML documents. Normally, XML cannot be compiled directly into executable code. You will need to write your own compiler, or use a pre-existing one, like the one found at http://ozone.codeplex.com

That's why it is interesting to write about a general approach of writing OS in not very common (for it) language. And existing OSes can show examples for interested developers.

SpyderTL wrote:

You may just want to start out by documenting your tools and your OS design, specifically, and later move some or all of it to a "generic" Java OS article, if it makes sense.

At least there should be some root in the tree of languages and their features. It can be the generic discussion about different languages for OSdeving, supplemented by wiki fragments as a result.

_________________My previous account (embryo) was accidentally deleted, so I have no chance but to use something new. But may be it was a good lesson about software reliability

'Easy' is going to vary from dev to dev. In any case, the point isn't that you might engage in SSP, but that you would be channeling the readers into a specific solution rather than giving them options. Admittedly, the entire site is guilty of that, given the heavy reliance on C and the GNU toolchain, but there has been a conscious effort to limit that and provide some guidance for that who stray from The Golden Path of Unix RighteousnessTM.

_________________Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTFμή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίανLisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.

For a start, you probably should change the page's title to something more like "Writing an Assembler in Java (and using it to generate a boot loader written in your new dialect of assembly)"...

Cheers,

Brendan

_________________For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.

For a start, you probably should change the page's title to something more like "Writing an Assembler in Java (and using it to generate a boot loader written in your new dialect of assembly)"...

It's a way of using Java for OSdeving. The way C is used is as such:

Somebody writes assembly translator

Somebody writes assembly program, which is used as a C translator

Somebody writes C program

C translator is executed

C program (in it's the very new form) is executed

You're conflating "writing a C compiler" with "using a C compiler". The normal way people use C is:

Somebody writes C source code

C translator is executed

C program (in it's the very new form) is executed

It's entirely possible to use C differently. For example, you could write an assembler in C that uses "assembly source code" embedded directly in the assembler's own C (e.g. as data and/or macros and/or functions, not as inline assembly); so that when you execute the compiled C program it assembles the assembly source code that was embedded into it. Of course nobody does this in C because it's hideous (much better to get the assembly source code from separate file/s instead of building it directly into the assembler); but if someone did do this then the boot loader would be written in (an awkward/ugly dialect of) assembly and the boot loader wouldn't be written in C at all.

In the same way; you could write an assembler in Java that gets the assembly source code from separate file/s (and then write a boot loader in assembly); or you could write an assembler in Java where the assembly source code is embedded directly into the assembler itself (and then write a boot loader in assembly).

Basically; you're writing an assembler, and then writing a boot loader in assembly. You're not writing a boot loader in Java.

Cheers,

Brendan

_________________For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum