Question
Some processors have two sets of registers, one for integer operations and one for floating point (fp) operations. The registers used in integer operations are
Some processors have two sets of registers, one for integer operations and one for floating point (fp) operations. The registers used in integer operations are always saved and restored during every context switch whether it is preemptive multithreading or non-preemptive multithreading(since they are also used for calculations for instructions, such as memory address calculation, branch target calculation etc.) However, for most machines it is not very clear what will happen to the floating point registers.
Below you are given 5 different processor architectures. As a programmer, for which architectures do you need to save and restore floating point registers? state your reasons.
a) (5 pts) Machine uses non-preemptive multithreading and only allows only a single thread that can use the floating point registers. There is a separate stack for integer and floating point operations.
b) (5 pts) Machine uses preemptive multithreading and only allows only a single thread that can use the floating point registers. There is a separate stack for integer and floating point operations.
c) (5 pts) Machine uses non-preemptive multithreading and allows multiple threads that can use floating point registers. There is a separate stack for integer and floating point operations.
d) (5 pts) Machine uses preemptive multithreading and allows multiple threads that can use floating point registers. There is a separate stack for integer and floating point operations.
e) (5 pts) Machine uses non-preemptive multithreading and you know that the kernel is designed so that it also supports saving of floating point registers. However, there is a unified stack for integer and floating point operations.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started