Preview

Computer Organization and Systems: Problems about Cache Memory

Powerful Essays
Open Document
Open Document
1443 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Computer Organization and Systems: Problems about Cache Memory
COMP212 Computer Organization and Systems

Tutorial/Lab #4

Problems about Cache Memory

4.2 A two-way set associative cache has lines of 16 bytes and a total size of 8 bytes. The 64-Mbyte main memory is byte-addressable. Show the format of main memory address.
Kb => 1,024
Mb => 1024 * 1024
Ans.

A two-way set => 2 lines / set in the cache;

The cache has lines of 16 bytes and a total size of 8K bytes => There are a total of 8K bytes/16 bytes = 512 lines (23*210/24) in the cache;

‘2 lines / set in the cache’ AND ‘There are a total of 512 lines in the cache’
=> The cache consists of 512 lines/2 lines/set = 256 sets
=> 8 bits (256=28) are needed to identify the set number.

64-Mbyte main memory is byte-addressable
=> There are 64M units to be addressed
=> A 26-bit (26*220) address is needed;

‘The cache has lines of 16 bytes’ AND ‘64-Mbyte main memory’
=> Main memory consists of 64-Mbyte/16 bytes = 222 blocks
=> The length of Tag + Set = 22
=> The length of Tag = 22-8 = 14;

The word field length is 26 – 22 = 4 bits

(Another way to calculate word field length:
The cache has lines of 16 bytes => The main memory block size is 16 bytes;
The main memory is byte-addressable => The word length (size) is 1 byte;
=> There are 16/1=16 words in one block;
=> 4 bits (16=24) are needed to identify the word number.)

Therefore, the format of main memory is
Tag Set Word
14
8
4

4.3 For the hexadecimal main memory address 111111, 666666, BBBBBB, show the following information, in hexadecimal format: a) Tag, Line, and Word values for a direct-mapped cache, using the format of Figure 4.8 (slide 27).

Ans. Address
(in hexadecimal format)
111111
666666
BBBBBB
Address
(in binary format)
0001 0001 0001 0001 0001 0001
0110 0110 0110 0110 0110 0110
1011 1011 1011 1011 1011 1011
Tag
0001 0001 (11h)
0110 0110 (66h)
1011 1011 (BBh)
Line
0001 0001 0001 00

You May Also Find These Documents Helpful

  • Powerful Essays

    Nt1330 Unit 3 Assignment 1

    • 2019 Words
    • 9 Pages

    + 0 + 0 0 0 + 0+ 1 1 0 0 8 + 4 + 0 + 0= 140 Address Classes • There are 5 different…

    • 2019 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    A user has opened a calculator application, typed the numbers 123456789, and then done some math problem using this number. Which of the following determines, in part, what bits the computer stores in RAM to represent the number 123456789?…

    • 957 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Nt1210 Chapter 1 Review

    • 1315 Words
    • 6 Pages

    7. A user has opened a calculator application, typed the numbers 123456789, and then done some math problem using this number. Which of the following determine, in part, what bits the computer store in RAM to represent the number123456789?…

    • 1315 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    CHAPTER3 REVEIW

    • 527 Words
    • 3 Pages

    a. The CPU tells the RAM which address holds the data that the CPU wants to read…

    • 527 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    7. A user has opened a calculator application, typed the numbers 123456789, and then done some math problem using this number. Which of the following determines, in part, what bits the computer stores in RAM to represent the number 123456789?…

    • 856 Words
    • 4 Pages
    Good Essays
  • Good Essays

    A user has opened a calculator application, typed the numbers 123456789, and then done some math problem using this number. Which of the following determines, in part, what bits the computer stores in RAM to represent the number 123456789?…

    • 605 Words
    • 3 Pages
    Good Essays
  • Good Essays

    The operating systems job is managing the memory. The operating system is in charge of bringing this process into main memory (Stallings, 2012). However the processor must deal with references within the program. Branch instructions include an address to reference the order to be executed next. Data reference instructions include the address of the byte or word of data referenced. The processor hardware and operating system software must be able to translate the memory references found in the code of the program into actual physical memory addresses, reflecting the current location of the program in main memory. (Stallings, 2012).…

    • 573 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Lab 1.4 ASCII

    • 349 Words
    • 3 Pages

    What is the ASCII hexadecimal code for a blank space? Why is it necessary to represent a blank space as a separate character in text? 32. Spaces are part of data.…

    • 349 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Intro the Programming

    • 386 Words
    • 5 Pages

    The _______ is the memory address that is saved by the system when a method is called and is the location to which…

    • 386 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Sheet01

    • 1045 Words
    • 5 Pages

    1. Find the total amount of the memory in units requested, for each of the following CPUs, given the size of the address buses: a) 16-bit address bus. (in K) b) 24-bit address bus. (in megs) c) 32-bit address bus. (in megabytes and gigabytes) d) 48-bit address bus. (in megabytes, gigabytes, and terabytes)…

    • 1045 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    b. How much data storage space is needed to record two minutes of the video stream?…

    • 889 Words
    • 4 Pages
    Good Essays
  • Better Essays

    In addition, assembly language allows programmers to utilize symbolic addresses to replace numeric memory addresses in binary bits to execute a command or input data. Computer specialist can link symbolic labels to an instruction or piece of data in the program. In other words, the symbolic label turns into a permanent tag for the instruction or piece of data disregarding where it populates in the program or where it relocates in the memory. However, machine language is more complicated. To perform an instruction or input data in the memory in a specific location, the computer specialist must specify the direct address. For example, “In machine language, to jump to the instruction stored in memory location 18, you must specify directly to address 18 (write JUMP…

    • 2002 Words
    • 9 Pages
    Better Essays
  • Satisfactory Essays

    Copyright © 2012 Pearson Education, Inc. 0-4 2 Stored Program Concept A program can be encoded as bit patterns and stored i main memory. F d t d in i From th there, the CPU can then extract the instructions and execute them. In turn, the program to be executed can be altered easily.…

    • 783 Words
    • 4 Pages
    Satisfactory Essays
  • Powerful Essays

    It Infrastructure Answers

    • 1407 Words
    • 5 Pages

    Convergence – In the telecommunications industry, convergence refers to the integration of voice, internet, broadcasting, and other telephony servers into one mega-industry from their traditionally separate industries. Companies such as Telstra are an excellent example of this, as Telstra now offers an abundance of products such as, Fixed Phone, Mobile Phone, Dialup Internet, Broadband Internet, Wireless Internet, TV, Music, Tickets, and more. Incentives are given to “bundle” services with the one particular provider, which can have advantages and disadvantages.…

    • 1407 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    int function1(char x) { //parameter x passed to the function, function returns an integer value…

    • 1596 Words
    • 7 Pages
    Good Essays