Is your OS self-hosting? Or is it one of your goals?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Is your OS self-hosting? Or is it one of your goals?

Post by Brynet-Inc »

This came up in a previous topic, but I'd like to know who all is interested in this..

Who here has already made their OS self hosting? Or at least have it as a future goal?

And who's already ported their favourite Assembler/Compiler?.

I know a few people have already ported NASM/FASM.. but maybe it would be handy to know who's interested in this concept? 8)
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

but I'd like to know the numbers..
You forgot adding the poll :)

Anyway, eventually i do want to have a self-hosted environment. But that'll take some time and its not really a priority for me at this stage.
"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 ]
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

My OS is self hosting, i have ported fasm, made a text editor, can save to floppy or hdd, also my web site will be hosted on a dex OS server in about a week, the dex OS server has been done and fully tested.
My only problem when first assembling my OS on my OS was i had to change all the none 8+3 include file names, as my file sys only uses 8+3.
Next on my list is web browser.

But as i said before, you can learn a lot, by using your OS for the job you designed it for in the first place, it funny as my OS was not designed for this job, as in a desktop OS, Mine was designed more for projects like a serve, a mp3 player etc.
But people want to program PIC etc, so we just tuck it a stage further, on top of this i am coding a ARM port of dex OS, with the the adding of a FasmArm i now can code the ARM port on x86 dex OS and flash the ARM chip, also from dex OS 8).

http://jas2o.forthworks.com/dexforum/in ... ;attach=80
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

Thats cool dex, I deleted my account on your forum awhile back..

I found the Anti-Unix-like discussions annoying 8)
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

DEX:

I hate to be the voice of ignorance... but one must learn. What is the device that you have the GP2X and PC connected to that lets them communicate? I assume it is the uncovered board at the left..w hat exactly is that?
TheQuux
Member
Member
Posts: 73
Joined: Sun Oct 22, 2006 6:49 pm

Post by TheQuux »

I'm hoping that I'll get Xenon fully self hosting, but... I've gotten carried away with graphics at the moment.

However, I'll probably find myself porting perl, to run makepp, and vim, for editing... so at the point where Xenon is self-hosting, it will be nearly finished.

More important right now is getting my calculator to speak GDB's remote serial protocol, so I can do serious debugging (The HP 50g can do anything... :- )

But, in order for that to work, I'd need USB or IR, neither of which is here yet.

So, I've got a long way to go.
My project: Xenon
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Brynet-Inc wrote:Thats cool dex, I deleted my account on your forum awhile back..

I found the Anti-Unix-like discussions annoying 8)
I think if i remember right, you had already wounded up one of the "dex OS team" on a another forum, and then you insinuated that dex OS's single-tasking, was not a design as such, but more lazyness on our part.

I and most of our member use linux as our desktop OS, we are all great fans, but just goto a ubuntu forum and go on about Slackware :wink: .

@Tyler, That a bob it adds lots of goodys to the already great gp2x, which come with linux on Brynet-Inc :wink:
See here: http://www.gp2x.co.uk/gp2xbreakoutboard.html
With my OS arm port you can boot linux or my OS from the boot loader.

PS: @TheQuux, Just in case you did not know, but using IR is just the same as serial, thats how my IR Furby program works.
Last edited by Dex on Mon Dec 04, 2006 8:26 pm, edited 2 times in total.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Is your OS self-hosting? Or is it one of your goals?

Post by Brendan »

Hi,
Brynet-Inc wrote:Who here has already made their OS self hosting? Or at least have it as a future goal?
For me self hosting is a future goal, but not until the "foundation" of my OS is near perfect - there's no point building a sky-scraper on sand.

The tools will be written from scratch, starting with an optimizing assembler, then an intermediate language, then some compilers. There will be no liinkers and probably no "make", and the compilers won't be compatible with any standards (for e.g. I'd have a "looks like C" compiler rather than a true C compiler).


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.
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Re: Is your OS self-hosting? Or is it one of your goals?

Post by Tyler »

Brendan wrote:Hi,
Brynet-Inc wrote:Who here has already made their OS self hosting? Or at least have it as a future goal?
For me self hosting is a future goal, but not until the "foundation" of my OS is near perfect - there's no point building a sky-scraper on sand.

The tools will be written from scratch, starting with an optimizing assembler, then an intermediate language, then some compilers. There will be no liinkers and probably no "make", and the compilers won't be compatible with any standards (for e.g. I'd have a "looks like C" compiler rather than a true C compiler).


Cheers,

Brendan
Don't you mean... there is no point building a skyscraper inside of a skyscraper that is built upon sand...
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Is your OS self-hosting? Or is it one of your goals?

Post by Brendan »

Hi,
Tyler wrote:Don't you mean... there is no point building a skyscraper inside of a skyscraper that is built upon sand...
What I mean is that I've stopped my project and started again from scratch enough times to know that getting things right is infinitely more important than getting things working... ;)

Think of it like this - if I spend 4 years writing boot code and kernel code, and John Doe does his boot code, kernel, some device drivers, some file systems, some applications, some tools and a compiler (i.e. becomes self hosting), then who is closer to having a complete/usable desktop/server OS?

In this case, it's extremely likely that John Doe has made serious design mistakes, doesn't support many features, has bad performance or scalability, or has created a clone of some other OS; and because of (one or more of) these problems will either start again from scratch, give up completely or will continue adding more stuff while never getting anyone to actually use their OS (beyond people experimenting with it out of curiousity).

Of course my main goal is different to most people's - I eventually want to see people switching from Windows/*nix to my OS because they think my OS is better for their specific purposes....


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.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

@Brendan, I have a lot of respect for you as a coder and a writer and what you say makes a lot of sense, but i am not sure that you can achieve your goals, just by making it better.
Everything impacts on everything else, you make a very secure OS, useally makes it less user friendly, you make a OS with lots of DRM so people can not watch copy ed movies, maybe there own copy ed movies, will not make user happy.

The best way to make a good OS is first keep it simple, so you can easy find bugs, make it very module, so that any new thing that comes out can easy be added, because if not you may take too long to get your OS to market, a lot of things may have changed.
Too me you are falling into the big boys trap, and trying to make something that is better than something made by 1000's of people, you are a great coder, but no one can do that.
You need too make your OS small, faster, i think if your OS could boot up on most PC and get email and browses the net, but could fit on a floppy (note: the fit on a floppy bit, is to keep it small, not that it as to run from a floppy ), you would have a better chance of your goal.
This just my opinion, on the OS market and in a perfect world your OS would win, but as we have seen, good enough and lot of money Win's :cry: .
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re: Is your OS self-hosting? Or is it one of your goals?

Post by Candy »

Brendan wrote: What I mean is that I've stopped my project and started again from scratch enough times to know that getting things right is infinitely more important than getting things working... ;)

Think of it like this - if I spend 4 years writing boot code and kernel code, and John Doe does his boot code, kernel, some device drivers, some file systems, some applications, some tools and a compiler (i.e. becomes self hosting), then who is closer to having a complete/usable desktop/server OS?

In this case, it's extremely likely that John Doe has made serious design mistakes, doesn't support many features, has bad performance or scalability, or has created a clone of some other OS; and because of (one or more of) these problems will either start again from scratch, give up completely or will continue adding more stuff while never getting anyone to actually use their OS (beyond people experimenting with it out of curiousity).

Of course my main goal is different to most people's - I eventually want to see people switching from Windows/*nix to my OS because they think my OS is better for their specific purposes....
Sometimes I'm amazed how much we can agree on subjects.
User avatar
B.E
Member
Member
Posts: 275
Joined: Sat Oct 21, 2006 5:29 pm
Location: Brisbane Australia
Contact:

Re: Is your OS self-hosting? Or is it one of your goals?

Post by B.E »

Brendan wrote:Hi,
Brynet-Inc wrote:Who here has already made their OS self hosting? Or at least have it as a future goal?
For me self hosting is a future goal, but not until the "foundation" of my OS is near perfect - there's no point building a sky-scraper on sand.

The tools will be written from scratch, starting with an optimizing assembler, then an intermediate language, then some compilers. There will be no liinkers and probably no "make", and the compilers won't be compatible with any standards (for e.g. I'd have a "looks like C" compiler rather than a true C compiler).


Cheers,

Brendan
That sounds like M$ - create their own standards, and expect everyone to conform, then when everyone has conformed to this new standard, create another one and force people to use the new standard.

Anyway I'm curious to how your going to achieve the no linkers part.
What I mean is that I've stopped my project and started again from scratch enough times to know that getting things right is infinitely more important than getting things working... Wink
This usually means that you have skipped the inception, and elabloration phases of development.

What I have done on my OS is very little (only a boot loader), code wise. But I have designed the whole OS architecture, and now I can start writing the code (may need to rewrite the boot loader).
Image
Microsoft: "let everyone run after us. We'll just INNOV~1"
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
Dex wrote:@Brendan, I have a lot of respect for you as a coder and a writer and what you say makes a lot of sense, but i am not sure that you can achieve your goals, just by making it better.
Everything impacts on everything else, you make a very secure OS, useally makes it less user friendly, you make a OS with lots of DRM so people can not watch copy ed movies, maybe there own copy ed movies, will not make user happy.
The key phrase is "better for their specific purposes". For example, if someone has a 486 with 4 MB of RAM, and the only thing they want to do is play audio CDs, which OS would be best for their specific purpose? Vista and Windows XP won't run, and Windows 95/98 are too bloated. They could probably setup Linux or a BSD to do it but the time it'd take to customise something to suit would be a problem. For this specific purpose I can think of an OS that is better than all of these... ;)

Of course most people want to do more than just play CDs, so there probably wouldn't be a large number of people who would use Dex4u for this specific purpose (even though it's better than any other OS for it). The hard part is finding a specific purpose that a larger number of people would want that other OSs aren't too good at....

B.E wrote:That sounds like M$ - create their own standards, and expect everyone to conform, then when everyone has conformed to this new standard, create another one and force people to use the new standard.
If a user desperately needed to run something like GIMP or Apache, would they change from their existing OS to Linux to do it, or would they just find a version that's been ported to their existing system? If a user desperately needed to run Microsoft Office, would they change from their existing OS to Windows to run it?

Basically, it's very difficult to create an OS that is better than other OSs for a specific purpose if all of the applications can be ported to another OS. In this case you're limited to providing better performance, better reliability, better hardware support, better installation and maintenence, etc, which are all good things but make it much harder to convince someone to leave their existing OS.

For an example of this, consider SkyOS. It looks very impressive, but most of the applications are ported from elsewhere. AFAIK their file system indexing is native code, but other systems (Vista, OS X) do this just as well. Where is the reason for people to leave their current OSs and shift to SkyOS? Nice looking graphics are great for first impressions, but is that enough?
B.E wrote:Anyway I'm curious to how your going to achieve the no linkers part.
All compilers would generate "intermediate language" files, and all libraries would be in this intermediate language. Then there's another compiler which compiles all of the "intermediate language files" into a single assembly language file (which is then assembled to a flat binary, optionally with the special executeable header my OS uses). Dynamic linking (DLLs, shared libraries) will never be supported by my OS, so that isn't a problem. The intermediate language is a low level language (like a portable assembly language). People could write code in this language, but that's not what it's intended for.
B.E wrote:
What I mean is that I've stopped my project and started again from scratch enough times to know that getting things right is infinitely more important than getting things working... Wink
This usually means that you have skipped the inception, and elabloration phases of development.

What I have done on my OS is very little (only a boot loader), code wise. But I have designed the whole OS architecture, and now I can start writing the code (may need to rewrite the boot loader).
I had an older version of the OS that worked fine, had a few device drivers, Othello, a BASIC interpretter (intended as a scripting language), a (text mode) GUI, a CLI and a few other things. It used plain 32-bit paging only, was single-CPU only, didn't do decent device detection, etc.

I wanted to add support for multi-CPU and PAE, and change the device driver interface, switch to "variable sized" messaging and make other improvements, so I started again. The next version ended up with an almost complete kernel that supported plain 32-bit paging and PAE, and multi-CPU, hyper-threading and NUMA. I also added support for internationalization (including support for different time zones, languages, etc in the boot code itself).

The scheduler wasn't too good (in some cases it was "O(n*2)" and sucked when there's a large number of threads running, and didn't handle NUMA and hyper-threading too well), but it did handle a large number of (SMP) CPUs fairly well. There was also an IRQ latency problem in there somewhere that I tracked back to the scheduler disabling IRQs for too long. I attempted to replace the scheduler, but the entire micro-kernel was mostly a single large chunk of code and I ran into trouble finding the scheduler's dependancies. Lastly, during the development Intel and AMD introduced 64-bit and hardware virtualisation, which weren't really part of the original design.

Anyway I figured that if I had trouble changing the scheduler I wrote, then anyone else would find making changes extremely difficult. At the time I was also considering the end uses of the OS (like embedded systems), and a few other mistakes I made (Internationalization shouldn't have been in the boot code, the memory manager was too complex as it supported plain paging and PAE using conditional code, etc). I decided that a microkernel wasn't modular enough, and that I could improve some things, so....

Then I started a short-lived modular system, where different parts of the kernel were designed as seperate modules. For example, you could have 3 memory managers, 2 schedulers, etc and decide which one to use during boot, when the OS is installed and/or when the boot image was created. For this, half of the modules were done in 3 versions (one for plain 32-bit paging, one for PAE and another for 64-bit). During boot there was a "chicken and egg" problem with memory management - to create the paging structures used after boot you needed to allocate physical pages suited for the page colour and NUMA domain, which led to a full NUMA aware memory manager in real mode and certain structures were used for both the boot memory management and the kernel's memory management, which restricted the design of memory managers used after boot. Around this time I started working on a BIOS for Bochs (I needed ACPI SRAT and SLIT tables to improve my NUMA support), and lost track of what I was doing. After a while I returned to this version of the OS, decided I wanted to add support for headless systems and a few other things, and wanted to fix my "chicken and egg" problem. Because it was in it's early stages I stopped it and....

This led to the current version - I've been working on boot code for several months. So far it can boot from floppy, over the network (diskless systems) or can be installed on a custom ROM (embedded systems). The boot code uses a seperate "user interface" module (one module for normal keyboard & video and another one that uses the serial port for headless systems). There's other boot modules used for memory detection, CPU detection, NUMA domain detection, etc, so that these modules can all be replaced easily without effecting the rest of the system (for e.g. in an embedded system you don't need code to detect and find bugs in all CPUs, and you could replace the CPU detection module with something that only works with a specific CPU to save space). Currently I'm porting some older "boot image compression" code to the project, but improving it as I go.

Anyway, most of my problems were the result of "scope creep" and not-enough modularity (too many hidden dependancies between parts). Now my project is extremely modular with formal specifications for each module (no more hidden dependancies). The possibility of scope creep has been reduced too (mostly, the OS is designed to support everything I can think of, except for things I know I'll never want). Somewhere in there was a change in focus too - earlier versions where educational/hobby OSs, but gradually I shifted to more commercial/practical purposes and I found that "good enough" is never really good enough.... :)


Cheers,

Brendan

--
BCOS Project - http://bcos.zapto.org
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.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Well answered as usual Brendan and if i had to put money on any hobby OS hitting the big times, it would be yours.
Post Reply