A possible advanced trick from my wizard-bag (might not work in every situation, though):
- have a supervisor component that is the one to choose which low-level component is active at a time
- when giving the access to one of these components, set its descriptor present bit on, leave other descriptors with present bit off.
- On context switchings between sub-tasks, toggle access bits ...
Now, this has a drawback : the supervisor component can virtually write anything to the table... potentially a protection flaw if not at DPL0 -- or you might have a system call for asking a trusted component to do the "present bit" switch for you ...
Now, this is a never-seen-anywhere-else-and-never-tried idea of mine ... so be wise when using it