Re: Application commands
Posted: Tue Aug 23, 2005 11:00 pm
Call gates are avilable only on the i386p+ (It's slover than interrupts - i was used call gates in early stage of my o.s - now i use interrupts;)
The Place to Start for Operating System Developers
http://f.osdev.org/
This depends on the platform, but its pretty widely accepted. I'd imagine this would be L2, though? I could be wrong.bontanu wrote: The stack is always in cache...
Yes, this is, indeed, the kicker. If you can manage to avoid a bunch of register movement/stack pushes, then you might come out on top, but this is unlikely.bontanu wrote: This will require that you save the registers --ironically-- on the stack and restore them later on...
How do you handle protection with this mechanism?eosp wrote:First: Ctrl-A, Ctrl-V before that happens again
Second, on topic. My OS is completely based on message ppassing, so it's very simple. Just send a message to the kernel with what you want to do, and it will put you into the scheduler.
That's a huge loss. Are you suggesting that it's a good idea to run apps at the same privelege level as the OS?bontanu wrote: Besides the fastest way to call an API is to simply CALL it, NEAR Call i mean -> one that is without any ring switch and no protection in a flat memory model... like I do in SolarOS.
You can not beat that speed but you loose protection... well, as if that is any loose at all.
The irony being that my unix installs are considerably faster then in winX installs, and are also much more secure.bontanu wrote: The full ring protection switch is simply too slow to be bearable without clear performance loss... that is a fact. You can choose in between very secure and very slow or insecure but much faster. Windows tries to do something in between because commercially speaking an slow OS has problems flying...
No loss for meThat's a huge loss. Are you suggesting that it's a good idea to run apps at the same privelege level as the OS?
Exactly, and I sure hope I do have the right to my own oppinion that does not come from ignorance (since i do know how to use protection) but from my own joy, taste and experience.Are you suggesting that it's a good idea to run apps at the same privelege level as the OS?
The keyword here is are consideredThe irony being that my unix installs are considerably faster then in winX installs, and are also much more secure.
It is clearly impossible. not unless you ahve a very high speed CPU that makes thing apear "as if" there would be no performance loss... but the loss will be there allright.Switching privelege levels is slow, yes, but if you're smart about it, you can keep the security *AND* a decent speed.
If you don't ever intend on running a 3rd party app then so be it. I'd imagine a lot of us have dilutions of gradeur that involve running applications from a multitude of vendors in the future.bontanu wrote: Sitting here in my room alone in front of my PC who am I protecting against? Me against myself... looks like paranoia indeed.
That's implying configurable app security. Sounds like a decent concept to me, but if it's up to an end-user to do, they'll destroy their system.bontanu wrote: And I do understand that sometimes I might need some degree of protection because we do live in a very non evolved world, but still protecting ALWAYS just because once you might have a problem looks like a waste of resources to me.
So you suggest leaving the door unlocked and open? I have too many valuables I wouldn't like stolen or damaged.bontanu wrote: It is like having a key locked front door (that is ok - although it should not be) and then closing with a heavy key all doors behing me at each move in my house: to the kitchen (open/close door with key) to bathroom (open close dor with key) to the living room (open close dor with key) ...
That will make a somehow secure house... but a very inefficient one... I do know it can work like that but it is a pitty...
Because the world, quite obviously, isn't trustworthy. Virii and trojan horses are the way of the world. Even something much less drastic as a crappy written program... there's billions of lines of crappy source code out there. I'd rather they didn't crash my OS when they ran.bontanu wrote: We do need a level of TRUST and to ask ourselfes Why we did reach such a situation?
An interesting idea, indeed, but... given an end-user, I still see a very likely and plausable situation arising, involving a malicious app.bontanu wrote: Instead I would provide a safe sandbox for untrusted applications and situattions... in THAT situation the performance loos will be an acceptable trade-off. It is like putting a murder susped behing bars for a short while until the acuzations can be confirmed or denyed.
Sounds more decent to me that putting everything under a high security alert.
I trust my own code, too... but I'm not the first person to mistakeningly run faulty code... would be a pity if it was an HD driver... or a USB interface to your digital camera...bontanu wrote: So back on computers... to check always? every memory access? every application? No way man... At least I do trust my own OS and I do trust my own source code. And if i do make mistakes it is all for the best... I will learn and improve myself.
I'm certainly not the only one... if you're suggesting I'm naive for listening to the evolution of software and hardware, then...bontanu wrote: I do not know how people did ever get into this security mania and protection... I guess it must be the students of University crowding mainframe terminals and trying to make fun of the System admin / teachers... well who cares?
I never said otherwise, I'm just challenging it.bontanu wrote: Exactly, and I sure hope I do have the right to my own oppinion that does not come from ignorance (since i do know how to use protection) but from my own joy, taste and experience.
No, the keywords were are considerably. There's a difference.bontanu wrote:The keyword here is are consideredThe irony being that my unix installs are considerably faster then in winX installs, and are also much more secure.
How's a 486dx4/100? WinXP wont even run on it... X11 does.bontanu wrote: May be on a huge speed machine with big RAM it might look like this but it certainly it is not. You can not have the cake and laso eat it. But you can easy lie yourself about it... well with a little help from XP that is going on a path that copy UNIX more and more
Try on a very slow machine because it increases the truth and differences making them more clear.
It truely isn't impossible. Chose your API appropriately, realize when and why you must context switch and, as you agreed: "The algorithmical optimizations are the most important of all."bontanu wrote:It is clearly impossible. not unless you ahve a very high speed CPU that makes thing apear "as if" there would be no performance loss... but the loss will be there allright.Switching privelege levels is slow, yes, but if you're smart about it, you can keep the security *AND* a decent speed.
So by all means, leave a welcome mat...bontanu wrote: Honestly once the attacker is inside your house the doors will be just a delay for an inteligent attacker that is