Page 1 of 1
About my OS Design
Posted: Thu Apr 23, 2009 1:15 pm
by Wolftein
I Want to know what type of Design it's My OS..
Question:
1) It's good idea to make the multitasker in Daemon Server on Ring 2?
2) Making a Callgate From Ring 3 to Ring 2 and then Syscall from Ring 2 to Ring 0, it's slow?
Re: About my OS Design
Posted: Thu Apr 23, 2009 1:25 pm
by nekros
monolithic...
Re: About my OS Design
Posted: Thu Apr 23, 2009 3:13 pm
by Wolftein
nekros wrote:monolithic...
Monolithic use Message Passing? My os does that, can be hybrid?
Re: About my OS Design
Posted: Thu Apr 23, 2009 5:52 pm
by Love4Boobies
Can you think of any advantages for using rings 1 and 2? What do you base your design decisions on?
Re: About my OS Design
Posted: Thu Apr 23, 2009 6:09 pm
by Brendan
Hi,
Love4Boobies wrote:What do you base your design decisions on?
One of the things I'd consider is whether or not a device driver for something like
a USB coffee cup warmer actually does need to have access to read/write code and data in all your applications, daemons and other device drivers....
Cheers,
Brendan
Re: About my OS Design
Posted: Thu Apr 23, 2009 6:23 pm
by Love4Boobies
Brendan wrote:Love4Boobies wrote:What do you base your design decisions on?
One of the things I'd consider is whether or not a device driver for something like
a USB coffee cup warmer actually does need to have access to read/write code and data in all your applications, daemons and other device drivers....
Good call
But seriously, should drivers be allowed to directly read or write from/to applications? I think they should make use of the kernel, a special server, whatever
safe mechanism you can think of. So your coffee warmer should go with the rest of the other devices to ring 3 where it belongs
Re: About my OS Design
Posted: Fri Apr 24, 2009 2:22 am
by skyking
First of all I would like to point out that if there is no rationale to use all three rings you shouldn't use them. Just because there are three rings does not mean that you have to use all, I think it would be enough to use only ring3 and ring0 (unless you of course has a valid reason to use more). That would make the design more portable.
Is there a difference between driver and hal? I think one should be clear about what these are, since putting two things that could potentially mean the same thing in different places in the architecture could become confusing.
Exactly what do you mean by multitasker? Putting the task/context switching in ring2 is not a good idea.
About call gates I'd use similar reasoning as using all rings, unless you have a rationale for using them you shouldn't use them.
Re: About my OS Design
Posted: Fri Apr 24, 2009 8:25 am
by yemista
I think this would work, but it may not be the best idea unless you are doing it for experimental purposes. To go from user space to kernel space, youd have to make 3 switches rather than just 1, and there seems to be a lot of unnecessary over head
Re: About my OS Design
Posted: Fri Apr 24, 2009 12:31 pm
by Wolftein
My os it's just experimental, i'm trying to use all ring for a security purpouse and also testing my ipc experimental code using the 4 rings
The Diferent between Driver's and hal, it's that the driver doesn't need to readwrite all memory. and also doesn't need to change any system var, like gdt,idt. Also i didn't put the drivers in Ring3, because hal can only be called though Ring (0,1), so any User Application, can't access to an Device, without the interaction of the Daemon -> Driver.
Re: About my OS Design
Posted: Fri Apr 24, 2009 12:33 pm
by earlz
I'm curious to see how paging will work. (there is only supervisor/user, no 4 ring crap.)
Re: About my OS Design
Posted: Fri Apr 24, 2009 7:01 pm
by Brynet-Inc
Brendan wrote:Hi,
Love4Boobies wrote:What do you base your design decisions on?
One of the things I'd consider is whether or not a device driver for something like
a USB coffee cup warmer actually does need to have access to read/write code and data in all your applications, daemons and other device drivers....
Cheers,
Brendan
You're in luck, little gadgets like that don't actually follow standards.. they just leech away power without any care in the world.
As for drivers having access to kernel space, in my opinion.. you should write your own drivers and discourage 3rd party ones.
Also, USB devices don't have direct memory access.. unlike Firewire.
Re: About my OS Design
Posted: Fri Apr 24, 2009 9:56 pm
by Brendan
Hi,
Brynet-Inc wrote:As for drivers having access to kernel space, in my opinion.. you should write your own drivers and discourage 3rd party ones.
If there's 1000 device manufacturers creating 10 new devices each year, and if it takes a programmer an average of 1 month to write (and test) each device driver, then how many programmers do you need to employ to keep up? Where are you going to get that kind of money, and how much extra profit will the device manufacturers make by claiming their devices are fully supported by your OS?
You could take advantage of unsuspecting volunteers (while you let device manufacturers take advantage of you); and until your OS becomes popular you won't have much choice, but it's not the sort of arrangement I'd want to be stuck with forever.
Finally, better protection in the OS means faster device driver development - do you want to spend hours trying to find a mystery bug, or do you want the OS to say "Hey, the instruction at FOO tried to do BAR!". If you're relying on volunteers, then you should have the decency to make it as easy as possible for those volunteers to do your work, including providing protection for device drivers so that they don't have to waste as much of their time finding bugs.
Cheers,
Brendan
Re: About my OS Design
Posted: Sat Apr 25, 2009 1:24 pm
by Wolftein
earlz wrote:I'm curious to see how paging will work. (there is only supervisor/user, no 4 ring crap.)
this will work?
Process (Ring 3): Has mapped his own Memory and server Memory for access, when the process call a server function, it's swicth to server AddressSpace, if the function needs a kernel function, it make a syscall to it, if it needs a driver, it will change again the AddressSpace to the Driver, the driver will parse the function, save to a shared buffer, againt switch to the Server AddressSpace, copy the shared Server/Driver Buffer to Process/Server Shared Buffer, and then return the process. Can that work?