Question
Assemblly Programming and Computer Hardware Architecture Question (CSCE A240): Even though the existence of the SWP instruction allows for the implementation of such fundamental constructs
Assemblly Programming and Computer Hardware Architecture Question (CSCE A240): Even though the existence of the SWP instruction allows for the implementation of such fundamental constructs like mutexes in Operating Systems, ARM decided to deprecate the SWP instruction in later implementations of the ARM instruction set architecture. On recent ARM processors, the execution of the SWP provokes a trap into the Operating System. This means an interrupt is generated and the Operating System gets run at the appropriate interrupt vector address with an indication that an undefined instruction got executed. The Operating System of course knows the value of the program counter when such a trap occurs. Already compiled, old legacy user code using the SWP instruction, for example for thread synchronization, nevertheless continues to run on Linux systems running on these newer ARM processors that lack the instruction. To enable this kind of magic, Linux implements an extended machine that emulates the instruction where needed.
Describe which mechanism the Linux Operation System can use to perform such software emulation. Detail the different steps it takes from the moment it takes an undefined instruction trap until user code resumes after the emulated SWP instruction.
1. An Appendix that might assist your research: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0008a/ch01s03s02.html
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