OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 8:43 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: My 512 byte OS demo
PostPosted: Sat Jun 04, 2011 11:55 pm 
Offline
Member
Member

Joined: Sun Sep 20, 2009 4:03 pm
Posts: 50
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.


Attachments:
File comment: binary
binary.zip [583 Bytes]
Downloaded 136 times
File comment: source
system.asm [19.18 KiB]
Downloaded 312 times


Last edited by bitshifter on Sun Jun 05, 2011 9:18 am, edited 1 time in total.
Top
 Profile  
 
 Post subject: Re: My 512 byte OS demo
PostPosted: Sun Jun 05, 2011 5:38 am 
Offline
Member
Member
User avatar

Joined: Sat Jul 17, 2010 12:45 am
Posts: 487
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.

_________________
Programming is not about using a language to solve a problem, it's about using logic to find a solution !


Top
 Profile  
 
 Post subject: Re: My 512 byte OS demo
PostPosted: Sun Jun 05, 2011 9:19 am 
Offline
Member
Member

Joined: Sun Sep 20, 2009 4:03 pm
Posts: 50
I attatched binary version as requested.


Top
 Profile  
 
 Post subject: Re: My 512 byte OS demo
PostPosted: Sun Jun 05, 2011 4:19 pm 
Offline
Member
Member
User avatar

Joined: Thu Feb 14, 2008 10:46 am
Posts: 277
Location: Italy
Wow, the zip file is 583 bytes, 71 more than the lenght of the image itself. XD


Top
 Profile  
 
 Post subject: Re: My 512 byte OS demo
PostPosted: Sun Jun 05, 2011 10:13 pm 
Offline
Member
Member
User avatar

Joined: Sat Jul 17, 2010 12:45 am
Posts: 487
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.

_________________
Programming is not about using a language to solve a problem, it's about using logic to find a solution !


Top
 Profile  
 
 Post subject: Re: My 512 byte OS demo
PostPosted: Mon Jun 06, 2011 12:33 am 
Offline
Member
Member

Joined: Sun Sep 20, 2009 4:03 pm
Posts: 50
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.


Top
 Profile  
 
 Post subject: Re: My 512 byte OS demo
PostPosted: Mon Jun 06, 2011 7:40 am 
Offline
Member
Member
User avatar

Joined: Sat Jul 17, 2010 12:45 am
Posts: 487
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?

_________________
Programming is not about using a language to solve a problem, it's about using logic to find a solution !


Top
 Profile  
 
 Post subject: Re: My 512 byte OS demo
PostPosted: Mon Jun 06, 2011 11:33 am 
Offline
Member
Member

Joined: Sun Sep 20, 2009 4:03 pm
Posts: 50
It is not really meant to be run as visual demo,
but instead a study demo in the coding itself.


Top
 Profile  
 
 Post subject: Re: My 512 byte OS demo
PostPosted: Mon Nov 24, 2014 10:20 am 
Offline
Member
Member

Joined: Sun Sep 20, 2009 4:03 pm
Posts: 50
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...


Attachments:
File comment: Latest Version:
system.asm [7.61 KiB]
Downloaded 73 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 30 guests


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group