Hi all,
Can anyone explain why floating point operations are not allowed in kernel mode?
I searched in the archives and found reasons like saving FPU context is costly, parallelism is lost,wrong mechanism etc
The archives say
"You lose parallelism because FPU state is not saved on every kernel
thread switch. It could be done, but it's much more expensive - both in
terms of CPU time and in terms of memory usage. User mode can get away
with it because FPU states can be captured at the system call boundary,
which is already expensive."
I primarily could not understand the explanation how user mode can get away with it while in kernel mode it is a problem.
another mail thread say that:
"The FPU context is not saved; even in user context the FPU state probably
won't correspond with the current process: you would mess with some user
process' FPU state. If you really want to do this, you would have to
explicitly save/restore the full FPU state (and avoid context switches)."
Can somebody explain it so that it is easy to understand..
Thanks,
Mugunthan