Page 2 of 2
Posted: Thu Nov 01, 2007 6:22 pm
by SpooK
01000101 wrote:lol I just got rid of ALOT of rejected crap code that was just sitting there from previous mess ups. brought my realtek drive down to 6k.
now my os is still just as functional but is only 16k compiled.
It is nice to get around to optimization, when you can
Posted: Fri Nov 02, 2007 3:48 am
by AJ
My OS size went down a lot when I felt my memory management modules were reliable enough. I had started off by declaring a lot of static arrays etc... As soon as you have a decent memory manager, you can think more along the lines of linked lists and / or dynamically allocated arrays.
I suppose this begs the question of what is meant by OS size? If you just mean the kernel on the disk, it could be a few hundred KB. If you see the OS as including the window manager and associated artwork, and are more concerned with inflated memory size rather than on-disk size, I guess a relatively mature OS can easily reach the 100MB+ mark.
Cheers,
Adam
Posted: Fri Nov 02, 2007 4:04 am
by Osbios
My Kernel is around ~5 KB
Pmode with virtual memory. (Memory management not finish)
KBC (Keyboard, mouse, etc...)
VGA (big modelists!!!)
Floppy
I think 2 KBs are used for error massage strings.
Writen 100% in FASM.
For static memory reservation I use macros:
Memory: <--Kernel(file)--> <--static kernel memory--> <--other memory-->
Posted: Fri Nov 02, 2007 11:02 am
by 01000101
OS size is the size of the compiled image that is thrown on disk.
if you would like, you can throw in your external modules/executables, it is up to you, there is no real set rule about it.
wow Osbios, thats an impressive kernel size Is it all in Real Mode?
Posted: Fri Nov 02, 2007 11:02 am
by frank
The last iteration of my kernel(I'm kernel doing a rewrite to make it a microkernel) was around 80k with -Os on. Without -Os I think it was around 120k.
It had read/write FAT support, read/write hard drive and floppy drive support, support for loading some very basic user level code. It also had priority based multitasking with process and thread management. The only real problem was that I never really had a clear design goal or plan so most of the code was hackish and the OS was basically a pain to develop.
Posted: Fri Nov 02, 2007 12:13 pm
by Dex
I have two kernels one a Dos clone that has keyboard, floppy, CLI, mouse, can load and run some old dos game/programs com/exe and it less than 2k in size.
I also have my main PMode OS, that has built in atapi, floppy,hdd, keyboard, fat12/16/32, mouse drivers, CLI, GUI full tcp/ip stack, module interface, can load and run programs, over a 100 built in functions, + can run basic batch files etc and comes in at about 60k.
Posted: Fri Nov 02, 2007 3:43 pm
by Osbios
01000101 wrote:wow Osbios, thats an impressive kernel size Is it all in Real Mode?
Did you even read what I write?
Osbios wrote:Pmode with virtual memory...
Posted: Fri Nov 02, 2007 8:24 pm
by 01000101
terribly sorry.
don't know why I overlooked that.
5k w/ PMode, thats crazy.