| The movement of software in the software space
is described by the instruction fetch execute cycle of the computer.
This cycle is operative from the moment the computer is turned on to when it is turned off. Our objective in this
section is to examine the roles played by the units shown in figure SG1 (and other units not
presented in the schema for the sake of simplicity) in the instruction fetch execute cycle.
The instruction fetch cycle consists of the following: fetch cycle, decode cycle , execute cycle and interupt cycle . The fetch cycle begins when the address contained in the Program Counter (PC) is communicated to the address bus. The control unit of the Central Processing Unit (CPU), signals the retrieval of the instruction in the space in main memeory(RAM) that has the address communicated by the Program Counter. If the address is not found, the Central Procssing Unit (CPU) initiates an interupt or an exception and the operating system intervenes to coordinate the response to the interupt or exception. If the address is found, the instruction at the address is retreived and transferred to the Instruction Decoder. The address in the Program Counter is incremented to the address of the next instruction to be fetched. The decode cycle begins with the decoding or interpretation of the fetched instruction in the |
| instruction decoder. Any operands needed by the instruction are retrieved from RAM.
The execute cycle is controlled by the control unit . In the control units are micro operations (MOPS) that determine the execution paths and modes of instructions. For example, if the instruction requires an arithmetic calculation and logical comparison, the micro operations of the control unit communicate this need to the Arithmetic and Logic Unit (ALU). The ALU retrieves the data it needs from registers associated with it and when done, outputs its results into other associated registers. In the simple schema of figure SG 1, registers 5 and 6 are such registers. The interupt cycle occurs when the normal instruction fetch cycle is interupted by a signal from a peripheral device. The signal could be a request for attention, a status change, or the completion of an input/output operation. In any event, once the interupt is received by the CPU, it calls on the Operating System to handle it. The Operating System then carries out the following steps: (1) Suspends the execution of current instruction (2) Pushes the address of the current instruction on the system stack (3) Loads the address of the interupt handler into the Program Counter (4) Starts the fetch execute cycle for the instructions of the interupt handler. (5) Sets the operation mode to supervisor mode (privileged mode) in order to execute the interupt handler. |
|
Once the Operating System completes the execution of the interupt handler,
it pops the address of the supended instruction from the system's stack and resumes its execution..
The instruction fetch execute cycle we have discussed so far, occurs inside the CPU. But how does the Operating System and other software get into main memory (RAM)? The system bootup is the event that starts the series of processes that eventually move the Operating System into main memory. Once the Operating System is in RAM, the CPU is then able to send a system call to it when it is needed to perform any of its coordinating roles. One of these roles is to move other software into main memory. The system bootup begins once the computer is turned on. The Operating System is not functional at this point, so a set of instructions called Basic Input/Output System(BIOS) is assigned the function of checking the states of the devices and loading the Operating System. In essence, the boot sequence is the first instruction fetch execute cycle. The steps of the boot sequence are as follows: (1) The CPU's RESET pin is set to logical high (2) The Program Counter is set to point to a specific address in RAM. Intel CPUs set this address to the hexadecimal number,0xfffffff0 and map this address to the Read Only Memory where the BIOS reside. (3) The BIOS retrieves the Boot Loader |
| program and the Boot Loader reads the Master Boot Record (MBR), the first sector of the disk, and copies the first few instructions of the Operating System) to a specified address in RAM. The Boot Loader then jumps to this address thereby handing over
the responsibility of loading the Operating System to the Operating System's codes in the Master Boot Record. At this point, the Operating System is forced to bootstrap
itself into RAM. Once in main memory, it can then load other software and carry out its other coordinating functions. In adddition to loading the Operating System, the BIOS is responsible for: starting the Power-On-Self-Test (POST) that checks the functionality of hardware components; activating other BIOS entities such as graphic cards; and providing the low-level routines that enable the Operating System to interface different hardware devices such as the keyboard, mouse, monitor, serial and parallel ports. The Instruction Fetch Execute Cycle also describes the movement of software in computer networks. However, in this scenario, there is additional movement outside the host computer, through connected cables and routers, or by radio waves, and the movement is coordinated by a Network Operating system. The International Standard Organization (ISO) has set a standard for how software and data are transmitted in computer networks. This standard is called Open Source Interconnect (OSI) and it consists of seven functional layers: application layer, presentation layer, session layer, transport layer, network layer , data link layer and physical layer . Each layer plays an important role in the fetch execute cycle associated with computer networks. previous more |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Let us use our environment respectfully so that future generations would not label us"prodigal ancestors" |
|
|