Subject: Re: VM86 stuff: how faithful to Linux interface?
To: None <firstname.lastname@example.org, email@example.com>
From: Bruce Evans <firstname.lastname@example.org>
Date: 03/14/1995 13:23:22
>> Currently we don't use a TSS per process at all. Doing so would slow
>> down context switching significantly. In fact, the i386 System Software
>> Writer's Guide specifically disrecommends using multiple TSSes unless
>> you need some feature that you can't get any other way.
Actually, the TSS is in the pcb, so it is per process. It just doesn't
get used much. The task register doesn't event need to be reloaded
because the TSS is sufficiently constant. Perhaps using the TSS only
for switching the bitmap would be fast enough. The `ltr' instruction
"only" takes 20 cycles on a 486. I don't know if it causes additional
cycles later to reread parts of the TSS that are normally cached.
>Well, that pretty much rules out having separate I/O permissions per
>task, unless one were to play games with the page tables -- have one
>tss that starts just before a page boundary, so that the I/O permission
>bits began page-aligned; reserve 2 pages for the bit map. Then one
>would simply change bit maps by changing the page table at context swap
These games are mostly already played. Few changes would be required
to support small bitmaps, but there would have to be 2 more user pages
to support 8K bitmaps, and allocating these pages only for processes
that need them would be messy.