Floating Point Operations | CS 162 Project 1
Pintos currently does not support floating point operations. You must implement such functionality so that both user programs and the kernel can use floating point instructions. This may seem like a daunting task, but rest assurred, the operating system doesn’t have to do much when it comes to implementing floating point instructions. The compiler does the hard work of generating floating point instructions, while the hardware does the hard work of executing floating point instructions. However, because there is only one floating-point unit (FPU) on the CPU, meaning all threads must share it. As a result, the operating system must save and restore floating-point registers on the stack during context switches, interrupts, and syscalls like it does for general purpose registers (GPR). However, contrary to GPRs, The FPU registers need to be initialized correctly when a new thread or process is created as well, which is different from the GPRs. Additionally, the operating system needs to i
Pintos currently does not support floating point operations. You must implement such functionality so that both user programs and the kernel can use floating point instructions. This may seem like a daunting task, but rest assurred, the operating system doesn’t have to do much when it comes to implementing floating point instructions. The compiler does the hard work of generating floating point instructions, while the hardware does the hard work of executing floating point instructions. However, because there is only one floating-point unit (FPU) on the CPU, meaning all threads must share it.
Explore this link on the map →