Page 1 of 1
Kernel library and user applications
Posted: Wed Jul 15, 2009 2:47 am
by i586coder
HI,
How you doin fellows
today i want to share with you some techniques about OS libraries
first i completely finished the my KERNEL LIBRARY its contain
- FAT 12,16,32 driver
open,close,read,write,seek,mkdir,mkfile,rmdir,rm,dir,cp,mv
new FLAT-mode memory manager
new device driver: ps/2 keyboard and mouse
SVGA 24bit color-depth
dynamic multi-tasking scheduler
and so good at this moment the library behave as expected but its size about 200KB and it's static library
so KERNEL ready, now i'm trying to write some application for my kernel but the question is
1. what is the best memory model for user application small,large,...,please notice the kernel it self is in small memory model
2. and how user application use system call , is by interrupt call like this(asm int 0x44 ;print text)
or via kernel library it self(the static 200K)
any advice
CheerS,
a.
T.d
Re: KERNEL LIBRARY AND USER APPLICATION
Posted: Wed Jul 15, 2009 3:35 am
by Solar
i586coder wrote:2. and how user application use system call , is by interrupt call like this(asm int 0x44 ;print text)
You can do int / iretd, SYSENTER / SYSEXIT, SYSCALL / SYSRETURN, whatever the CPU and your OS supports. Each has its advantages and disadvantages.
...or via kernel library it self(the static 200K).
That's only possible if your OS doesn't do memory protection, i.e. the application itself is running in ring 0...
Re: KERNEL LIBRARY AND USER APPLICATION
Posted: Wed Jul 15, 2009 3:47 am
by Love4Boobies
i586coder wrote:1. what is the best memory model for user application small,large,...,please notice the kernel it self is in small memory model
The memory model you're talking about sound an awful lot like the ones used in Windows/DOS. If you have your own definition, would you mind sharing it with us?
2. and how user application use system call , is by interrupt call like this(asm int 0x44 ;print text)
or via kernel library it self(the static 200K)
The most elegant way to do it is to provide userland libraries (like the ones defined by POSIX, or Windows' DLLs) and have those use the actual trap mechanism. The trap itself can use the best option it has, checking what is implemented for that CPU beforehand. This way applications would have greater performance and the trap mechanism will be transparent to them.
Re: KERNEL LIBRARY AND USER APPLICATION
Posted: Wed Jul 15, 2009 11:31 am
by Combuster
First off: DO NOT SHOUT IN TOPIC TITLES
Also, I have a nagging suspicion its a 16 bit OS...
Re: KERNEL LIBRARY AND USER APPLICATION
Posted: Wed Jul 15, 2009 12:42 pm
by i586coder
Combuster wrote:First off: DO NOT SHOUT IN TOPIC TITLES
Also, I have a nagging suspicion its a 16 bit OS...
ARE you always like this
, first i'm not shouting at all Combuster ,
you specially misunderstand me for all my posts so what is that man
,
i meant from title to make reader understand what is the post subject before
reading, and remember i'm not waiting for you to help me i said share some ideas only
second ,yap it's 16bit BORLAND C++ compiler whatever and it's not shame for that
finally you told me before this
If you have criticism, please let it be constructive rather than this kind of derogatory remarks, thanks.
ARE YOU REMEMBER
Re: KERNEL LIBRARY AND USER APPLICATION
Posted: Wed Jul 15, 2009 1:18 pm
by Combuster
i586coder wrote:
finally you told me before this
If you have criticism, please let it be constructive rather than this kind of derogatory remarks, thanks.
ARE YOU REMEMBER
Ok, thread locked for
- not sticking to the smart questions rule (shouting, withholding information)
- insulting fellow forum users
- trolling by deliberately denying your actions
Apparently, your response conveys that you prefer giving up this thread for inflammatory reasons than getting an answer.
Re: Kernel library and user applications
Posted: Wed Jul 15, 2009 2:02 pm
by JamesM
I agree with combuster and would like to add one thought:
A 16-bit DOS-style small memory model allows 64K of accessible memory. How have you managed to create a 200K compiled static library using that small memory model?