Homework 1.pdf - CSCE 614 Lab manual Homework-1 description...

This preview shows page 1 - 4 out of 12 pages.

CSCE 614 Lab manualHomework-1 descriptionInstructor: Dr. Eun Jung KimDEADLINE: 09/10/2018, 11:59 pmFall 2018Department of Computer Science & EngineeringTexas A&M University
Processor internals and program executionBasic processor operations: To understand how a processor works, we should observe Jack, whois a diligent and obedient worker (Fig. 1). Jack is provided with a list of tasks that he should do.Jack looks at each task in the list, does the work in a way exactly as mentioned in the list. Aftercompletion, he delivers the work, and then goes back to the list to check the next task that he hasto do. Jack does this cycle till he completes all the tasks in the given list. Quite some time back, even before when geeks kept sideburns, (i.e. 1960s), processor designershad decided that processor circuits should work the same way as Jack. For example to executethe following “C” statement – a = b + c+ d ;the processor would execute the following operations in sequence, one operation at a time –Opr. 1: Get the value from memory location that corresponds to “C” variable “b”Opr. 2: Get the value from memory location that corresponds to “c”Opr. 3: Add these two values Opr. 4: Store the intermediate result to the location corresponding to “a”.Opr. 5: Get the value from memory location that corresponds to “d”Opr. 6: Add the intermediate result at “a” with the value retrieved from “d”Opr. 7: Store the final result to memory location “a”Reads the list, understands what to do(“Fetch and decode”)Executes the task(“Execute”)Delivers the result(“Write”)Fig. 1: The story about Jack: the fetch-decode-execute-write cycle inside the processor
For every “C” variable a certain memory location/address is reserved. Later you will learn whodoes this and how this is achieved. These operations (Opr. 1 to 7) belong to either one of the fourstandard class of operations: fetch (Opr. 1, 2), decode (not shown as a task), execute (Opr. 3) andwrite (Opr. 7). All computations inside a computer are performed using these four basic primitiveclass of operations. The fetch, execute and write operations are easy to understand. The decodeoperation is explained in subsequent paragraphs.Why processor needs memory? : Before we attempt to understand the decode operation, we needto appreciate multiple role of memory. When Jack is working he needs to remember the smalldetails of the present work, he needs a work bench to hold his incomplete work, he also needssheets of paper to hold his task list. Similarly the processor needs memory to store input data,intermediate and final results. Stored program “Von Neumann” computer: The list of tasks or operations is also stored in thememory. This sort of computer system is known as “stored program computer” where the samememory is used to store the input, output, intermediate data and also the task list, as opposed tothe calculator, where the user has to define every task using the push buttons. The advantage ofthis “stored program computer” is that it can literally be the “Jack of all trades”. This computer

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture