Question

In: Computer Science

What does the Operating System do with registers such as the PC, IR, PSW, and MAR?


What does the Operating System do with registers such as the PC, IR, PSW, and MAR?

 It uses the PC to locate the instruction for the IR and address for the MAR, then puts the metadata results of execute into the PSW

 During a swapping it moves them between memory and the hard drive

 During a context switch it moves them between the PCB/TCB and microprocessor

 Nothing, these are hardware components

Solutions

Expert Solution

Role of different registers

PC:

The Program Counter is one of the most important registers in the CPU. A program is a series of instructions stored in the memory. These instructions tell the CPU exactly how to get the desired result. It is important that these instructions must be executed in a proper order to get the correct result. This sequence of instruction execution is monitored by the program counter. It keeps track of which instruction is being executed and what the next instruction will be.

IR:

The instruction register (IR) is used to hold the instruction that is currently being executed. The contents of IR are available to the control unit, which generate the timing signals that control the various processing elements involved in executing the instruction.

MAR:

MAR are used to handle the data transfer between the main memory and the processor. The MAR holds the address of the main memory to or from which data is to be transferred.

All processor designs also include a register or set of registers, often known as the program status word (PSW), which contains status information. The PSW typically contains condition codes plus other status information. Common fields and flags include the following:

• Sign: Contains the sign bit of the last arithmetic operation.

• Zero: Set when the result of an arithmetic operation is zero.

• Carry: Set if an operation resulted in a carry (addition) into or borrow (subtraction) out of a high-order bit. Used for multi-word arithmetic operations. • Equal: Set if a logical compare result is equality.

• Overflow: Used to indicate arithmetic overflow. • Interrupt Enable/Disable: Used to disable or enable interrupts. When interrupts are disabled, the processor ignores them. This is often desirable when the operating system is in the midst of dealing with another interrupt.

• Supervisor: Indicates whether the processor is executing in supervisor or user mode. Certain privileged instructions can be executed only in supervisor mode, and certain areas of memory can be accessed only in supervisor mode

-------------------------------------------------------

By understanding about these registers we can conclude that first option is the most suitable answer.


Related Solutions

Study PC operating system such as windows and linux etc and mobile operating system such as...
Study PC operating system such as windows and linux etc and mobile operating system such as Android and iOS, find out whether there are functions and features that are provided in PC OS but not in mobile OS, and if there is any, analyze why these functions and features are not provided by these mobile OS. In your opinion for the future development will PC operating system and mobile operating system be the same or different? Give the details.
what does transmittance mean in IR ?
what does transmittance mean in IR ?
What is an ‘operating system’ and what does it do? What is meant by the term ‘open source’ or ‘copyleft’ in reference to the GPL license that is distributed with most Linux operating systems?
What is an ‘operating system’ and what does it do? What is meant by the term ‘open source’ or ‘copyleft’ in reference to the GPL license that is distributed with most Linux operating systems? How do the business models of Linux-based companies differ from Microsoft with regards to intellectual property and customer service. When and if a Linux-based company (e.g. RedHat, Suse, Ubuntu, or Mint… etc) charges a fee for their operating systems, and the code is designated open source,...
What is an operating system? What are its functions? What are the types of operating system?
What is an operating system? What are its functions? What are the types of operating system?
A new PC operating system is being developed. The designer claims "more than 90% of all...
A new PC operating system is being developed. The designer claims "more than 90% of all computer programs currently being run on Microsoft's Vista operating system will run successfully on the new PC operating system." A random sample of 100 programs are selected and run. Only 86 of the 100 programs run successfully. The designer decides to calculate a 90% confidence interval from his data for p= proportion of programs that will run successfully on the new PC operating system...
when look at the IR spectrum,what does a sharp peak mean and what does the broad...
when look at the IR spectrum,what does a sharp peak mean and what does the broad peak mean?
describe the fundaments of the IR following technique (what do you use it for?)
describe the fundaments of the IR following technique (what do you use it for?)
What information does the operating system need to store about a running process? (Think of 4...
What information does the operating system need to store about a running process? (Think of 4 or 5 different things.)
1. What does the Best Operating Point (BOP) of a pump represent? 2. Predicted system curves...
1. What does the Best Operating Point (BOP) of a pump represent? 2. Predicted system curves and measured system curves don’t always match. Manufacturer provided pump curves and measured pump curves can also differ. What are some reasons why?
What is the function (what is it, what does it do, how does it do it)...
What is the function (what is it, what does it do, how does it do it) of a defrost high limit thermostat and a defrost termination thermostat?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT