FPU vs Task Switch
-
Stefan
FPU vs Task Switch
Ok... I understood that 386 processors do not save informations about FPU when switching a task. How does operating system handle this problem? Because it must be kept data integrity for fpu or mmx registers too.
-
Anton
RE:FPU vs Task Switch
Well, an os can save it, when it handels task switch. I mean, that task switching can't bee done totaly on hardware, which means that you have some software task switcher(timer interrupt handler), which in turn uses the hardware instructions. Well, then this handler should save the FPU. Intel does provide some help(copy on write): you don't have to save the FPU, MMX, SIMD stuff, but when they are acessed, by some other task, you have an exeption.
Anton
Anton
-
Stefan
RE:FPU vs Task Switch
Could you tell me what exception is thrown? Because I want to read about it.
-
Anton
RE:FPU vs Task Switch
It generates device-not-available exception (#NM). Read chapter 10.4.1 "Using the TS Flag in Control Register CR0 to Control MMX™/FPU State Saving" in Intel Manual Volume 3.
Anton.
Anton.