Page 1 of 1

My 512 byte OS demo

Posted: Sat Jun 04, 2011 11:55 pm
by bitshifter
Hello
This is my 512 byte operating system demo source code.
It demonstrates software multitasking, services, IPC and more.
It can be assembled with FASM http://flatassembler.net/
I think of making it 8086 or 80186 compatable. (still pondering this)
Please review my code and post your thoughts here.
Any comments or criticism are greatly appreciated.

Re: My 512 byte OS demo

Posted: Sun Jun 05, 2011 5:38 am
by Chandra
I suggest posting a binary file as well(may be through a link). It makes us easier to just try out on the binary itself.
Cheers.

Re: My 512 byte OS demo

Posted: Sun Jun 05, 2011 9:19 am
by bitshifter
I attatched binary version as requested.

Re: My 512 byte OS demo

Posted: Sun Jun 05, 2011 4:19 pm
by Karlosoft
Wow, the zip file is 583 bytes, 71 more than the lenght of the image itself. XD

Re: My 512 byte OS demo

Posted: Sun Jun 05, 2011 10:13 pm
by Chandra
Results:
I tested the binary. It doesn't have anything significant. It doesn't take commands so you don't have anything to play with it. But, what else can you expect in a 512-byte OS?

Feedback:
One thing I missed is the multi-tasking portion of your OS. You mentioned that it is capable of software multi-tasking, but I didn't get to see a single effect of this.

Compliments:
Good try, though. Just trying to make it as compact as possible in expense of features.

Suggestions:
May be you should add basic command handler so that it accepts keyboard commands and do accordingly. You don't need to have anything advanced- just it should be capable of handling simple commands. At least, it would be worth calling it an OS.

Cheers.

Re: My 512 byte OS demo

Posted: Mon Jun 06, 2011 12:33 am
by bitshifter
It is true mutitasking, you just have to look closer.
There are five servers started on init (one dies -hello-)
The hello task can be spawned dynamically mutiple times.

Basic flow:
Upon startup an idle task is started and a console is started.
The kernel gets mapped into the idle task space.
Interrupts are then enabled to start the scheduler.
When the console gets scheduled for the first time
it starts the stdin and stdout services and a free hello task.
The console then sends and waits input request to stdin server.
If a capital 'H' is recieved we spawn a new hello world task.
Any other characters get sent to stdout service.
The console server continues to do this forever...

Its not much of demo to be run but made to study its code.
I spent the last couple of years refining this code, i tried to keep
it simple and small but not cryptic, but if you study it long and hard
you will get the big picture, it is quite advanced i must say.

Re: My 512 byte OS demo

Posted: Mon Jun 06, 2011 7:40 am
by Chandra
Yeah, I missed the code portion of your OS. I just gave a surface look so I didn't notice the deeper part. Sorry for underestimating. But truely, there must be at least a 'help' command; otherwise, how are we supposed to go through it?

Re: My 512 byte OS demo

Posted: Mon Jun 06, 2011 11:33 am
by bitshifter
It is not really meant to be run as visual demo,
but instead a study demo in the coding itself.

Re: My 512 byte OS demo

Posted: Mon Nov 24, 2014 10:20 am
by bitshifter
I spent some time last winter on a new version.
Most of it has been re-written, size-optimized and such...
It now runs faster due to new yield capability of scheduler.
Comments have been removed, who needs them, hehe.
Im still pondering some new features...
Being a micro-kernel, a memory server would be cool.
Also a segmented memory model was a thought.
Any ideas, comments or criticism is greatly appreciated...