Syscalls versus Call Gates

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.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Syscalls versus Call Gates

Post by AJ »

Thread necro of the year (so far) award :)
xlq
Member
Member
Posts: 36
Joined: Mon Dec 11, 2006 7:51 am

Re: Syscalls versus Call Gates

Post by xlq »

For software isolation, surely array accesses would have to be bounds-checked? Static analysis can only go so far. Wouldn't the time spent bounds checking be far greater than any time saved from the MMU, address space switching, privilege level switching, TLB invalidating and the other reasons mentioned above?
Marionette the flexible kernel
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re: Syscalls versus Call Gates

Post by Colonel Kernel »

Read section 4.4 of this paper.

In a nutshell, run-time checks add about 4.5% overhead, but for many types of real-world tasks this will be outweighed by the cost of ring transitions, TLB misses, etc.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
xlq
Member
Member
Posts: 36
Joined: Mon Dec 11, 2006 7:51 am

Re: Syscalls versus Call Gates

Post by xlq »

Thank you for the link to the paper, Colonel. I tried downloading various papers from Microsoft's website, but the server just wasn't working. I wonder what server software they're running :lol:
Marionette the flexible kernel
Post Reply