Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Spatial locality And Temporal locality, Essays (university) of Computer Architecture and Organization

Defining the terms spatial locality and temporal locality

Typology: Essays (university)

2018/2019

Uploaded on 10/28/2019

marvin-zachary
marvin-zachary 🇰🇪

1 document

1 / 3

Toggle sidebar

Related documents


Partial preview of the text

Download Spatial locality And Temporal locality and more Essays (university) Computer Architecture and Organization in PDF only on Docsity! Question one Define the terms spatial locality and temporal locality, and explain how caches are used to exploit them for a performance benefit. Be specific in the different ways that caches exploit these two phenomena. Temporal locality states that, the same data objects are likely to be reused multiple times by the CPU during the execution of a program. Once a data object has been written into the cache on the first miss, a number of subsequent hits on that object can be expected. Since the cache is faster than the storage at the next lower level like the main memory, these subsequent hits can be served much faster than the original miss. Temporal locality also uses the concept of current data or instruction that is being fetched may be needed soon. Therefore exploits that to performance benefit in a way that when we should store that data or instruction in the cache memory so that we can avoid again searching in main memory for the same data. Spatial locality states that if a data object is referenced once, then there is a high probability that its neighbour data objects will also be referenced in near future. Memory blocks usually contain multiple data objects. Because of spatial locality, we can expect that the cost of copying a block after a miss will be amortized by subsequent references to other objects within that block. Question Two Assume a memory system contains the cache, main memory, and virtual memory. Suppose that the access time of the cache is 3.7 ns with a hit rate of 83 % and the access time of the main memory 99 ns with a hit rate of 98.7 %. The access time of the virtual memory is 13 ms. Calculate the Access Time (Show your Working) Question Three With the aid of a diagram discuss the instruction cycle and the handling of interrupts The processor does the work of executing these instructions by (1) reading (fetch) the instructions from memory one at a time, and then (2) executing these instructions. The processor then checks to see if any interrupts have occurred, indicated by the presence of an interrupt signal. If no interrupts are pending, the processor proceeds to the fetch cycle and fetches the next instruction on the current program. Program execution halts only when the machine is turned off, some sort of unrecoverable error occurs, or a program instruction that halts the computer is encountered. Question Four The amount of time required to read a block of data from a disk into memory is composed of seek time, rotational latency, and transfer time. Explain each one of them as applied in computer storage indicating their computations. (4 marks) Seek Time refers to how long it takes the read/ write head on a hard disk to move from one track to another. Rotational latency refers to the time required for a desired sector of a disk to rotate under the read and write head. It’s usually assumed to be half of rotation time. Average rotational delay = 0.5 x rotations x rotational speed Transfer time is the time taken to transfer all the data in the target sector. Question Five Differentiate between various processor types. Would you advice a friend to purchase a 1.8 Ghz Core 2 Quad processor or 2.4 gigahertz Core 2 Duo Mac based laptop. (4 Marks) Intel Core CPU is based on a collection of criteria involving their number of cores, clock speed (in GHz) and cache size. There are various types which includes:
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved