About my OS Design

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Wolftein
Posts: 14
Joined: Wed Oct 15, 2008 3:39 pm

About my OS Design

Post by Wolftein »

I Want to know what type of Design it's My OS..

Image

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?
User avatar
nekros
Member
Member
Posts: 391
Joined: Wed Mar 05, 2008 9:10 pm
Contact:

Re: About my OS Design

Post by nekros »

monolithic...
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
Wolftein
Posts: 14
Joined: Wed Oct 15, 2008 3:39 pm

Re: About my OS Design

Post by Wolftein »

nekros wrote:monolithic...
Monolithic use Message Passing? My os does that, can be hybrid?
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: About my OS Design

Post by Love4Boobies »

Can you think of any advantages for using rings 1 and 2? What do you base your design decisions on?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: About my OS Design

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: About my OS Design

Post 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 8)
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
skyking
Member
Member
Posts: 174
Joined: Sun Jan 06, 2008 8:41 am

Re: About my OS Design

Post 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.
User avatar
yemista
Member
Member
Posts: 299
Joined: Fri Dec 26, 2008 12:31 pm
Location: Boston
Contact:

Re: About my OS Design

Post 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
Wolftein
Posts: 14
Joined: Wed Oct 15, 2008 3:39 pm

Re: About my OS Design

Post 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.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: About my OS Design

Post by earlz »

I'm curious to see how paging will work. (there is only supervisor/user, no 4 ring crap.)
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: About my OS Design

Post 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.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: About my OS Design

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Wolftein
Posts: 14
Joined: Wed Oct 15, 2008 3:39 pm

Re: About my OS Design

Post 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?
Image


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?
Post Reply