a. Discuss how it is possible to achieve the benefit of large low cost and high
ID: 3711721 • Letter: A
Question
a. Discuss how it is possible to achieve the benefit of large low cost and high speed memory with the cache-main memory hierarchical organization? Discuss the two properties of computer programs that make it feasible to meet this goal. b. A direct-mapped cache system is required to store a total of 64KB data with each cache block containing 32 4-byte words. Assuming the 32-bit byte addressing as in MIPS architecture, calculate the percentage of memory overhead. c. Explain briefly the addressing scheme in the cache system of 2.b. with a diagram showing the hit/miss logic and the method of accessing an individual word in a cache block in case of a hit. (2 Marks) (2 Marks) (3 Marks)Explanation / Answer
a) The two primary properties of computer programs concerning cache main memory hierarchy is locality and memory pool. Great region prompts quicker getting to of things with minimal effort and access time. Memory pool costs very cheap and and servers the programs with fast storage.
c) A reserve in the essential stockpiling progressive system contains store lines that are assembled into sets. In the event that each set contains k lines then we say that the store is k-way affiliated.
An information ask for has an address determining the area of the asked for information. Each reserve line estimated lump of information from the lower level must be set into one set. The set that it can be put into relies upon its address.
This mapping amongst addresses and sets must have a simple, quick execution. The quickest execution includes utilizing only a segment of the deliver to choose the set. At the point when this is done, a demand address is separated into three sections:
A counterbalance part distinguishes a specific area inside a reserve line.
A set part distinguishes the set that contains the asked for information.
A label part should be spared in each store line alongside its information to recognize distinctive tends to that could be put in the set.
18 10 4
Label SET OFFSET
A PC utilizes 32-bit byte tending to. The PC utilizes a 2-way affiliated reserve with a limit of 32KB. Each reserve piece contains 16 bytes. Ascertain the quantity of bits in the TAG, SET, and OFFSET fields of a primary memory address.
b) Since there are 16 bytes in a store hinder, the OFFSET field must contain 4 bits (24 = 16). To decide the quantity of bits in the SET field, we have to decide the quantity of sets. Each set contains 2 store pieces (2-way cooperative) so a set contains 64 bytes. There are 64KB bytes in the whole reserve, so there are 64KB/32B = 2K sets. In this way the set field contains 10 bits (420 = 2K).
At long last, the TAG field contains the rest of the 18 bits (32 - 4 - 10). In this manner a fundamental memory address is deteriorated as demonstrated as follows.
on the off chance that the asked for information is in the neighborhood store
restore the asked for information
else
get the asked for and close-by information from the lower level
spare it in the neighborhood store
restore the asked for information
Parts of this task are clarified facilitate beneath. The address decay is accommodated simple reference.
in the event that the asked for information is in the nearby store
Utilize the set piece of the demand deliver to choose a set.
For each line in the chose set
test its substantial piece, and
test if its tag coordinates the label some portion of the demand address.
You have a reserve hit if any line breezes through the two tests. The line that breezes through the tests is known as the coordinating reserve line. It contains the asked for information.
In the event that no reserve line finishes the two tests you have a store miss. The nearby store does not contain the asked for information.
restore the asked for information
Utilize the balance some portion of the demand deliver to choose a part of the coordinating reserve line and return it.
spare it in the nearby store
Utilize a substitution calculation to choose a casualty line from the chose set. The substitution calculation is trifling if the level of associativity is 1 (a direct-mapped store) - then there is just a single decision for the casualty.
Overwrite the casualty with information from the lower level.
A reserve whose nearby store contains m lines is k-path acquainted for some k that partitions m. Normally both m and k are forces of 2. There is exceptional wording for the extremes of associativity.
At the point when k measures up to 1, the stored is called coordinate mapped.
At the point when k breaks even with m, the stored is called completely affiliated. For this situation there is just a single set so there are no set bits in the address disintegration.
Store Addressing Diagrammed
A 4-way affiliated store with 64 reserve lines is diagrammed beneath. The rectangular exhibit ought to be seen as an enlist bank in which an enlist selector input chooses a whole line for yield.
Each column in this outline is a set. For a 4-way affiliated store each set contains 4 reserve lines. Each reserve line comprises of a "tag" and an "information" field. There is likewise a "substantial" piece, which isn't appeared.
The label bit of the demand deliver is contrasted with the greater part of the label fields in the chose set. In the event that one the label fields is a match the relating information field is chosen - it contains the asked for information. On the off chance that there is no match, the reserve controller must go to the lower-level store for the asked for information.
Regardless of whether the asked for line originates from the nearby store or the lower-level store, the counterbalance bits of the demand deliver drive a multiplexer to choose the coveted information.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.