User: Password:
|
|
Subscribe / Log in / New account

Microkernels are better

Microkernels are better

Posted Feb 27, 2013 14:11 UTC (Wed) by gmatht (subscriber, #58961)
In reply to: Microkernels are better by khim
Parent article: MINIX 3.2.1 released

No matter how exactly switching is done it changes context. Either you need more context to keep all rings "in the loop" (which means larger pieces of CPU core which means slower frequency which means slower CPU overall) or you need to load and unload said context (which means ring switch is slow)."
How much context do we need per ring? According to Wikipedia, ring switches can be relatively fast, presumably because they don't need to reload the page table.


(Log in to post comments)

Microkernels are better

Posted Feb 27, 2013 14:36 UTC (Wed) by khim (subscriber, #9252) [Link]

How much context do we need per ring?

Enough to distinguish access from ring-0 to the access from ring-3, heh. Either you add tags to all the commands and all the data in the pipelines or you flush the pipeline after flush.

Basically the question is: if "mov [some_address], register" should succeed in ring-0 and fail in ring-3 then how do you detect this? Either you keep this metainformation near the information itself (that is: when you assign registers you now have 2-3-4x more physical registers and thus more complex logic to assign them) or you need to flush the pipeline after ring switch. First approach will mean larger core pieces (and thus slower CPU frequency), second approach will mean slow ring switch.

According to Wikipedia, ring switches can be relatively fast, presumably because they don't need to reload the page table.

The key word here is "relatively". If you flush the pipeline then there are 15-20 ticks stall and in that time CPU can execute about 30-40 simple commands.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds