Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo

Problem Set A

1 .
A cache has an access time of 1 cycle. The computer with that cache experienced an average memory access time of 4 cycles, and the hit rate is 70%. What is the access time of the main memory? Did we benefit from having a cache in this system?
2 .
Research and explain a few key responsibilities of operating systems.
Given X = 01100110,
3 .
What is the value of X once you logically shift X to the right by two digits?
4 .
What is the value of X once you arithmetically shift X to the right by two digits?
Given X = 10100110,
5 .
What is the value of X once you logically shift X to the right by two digits?
6 .
What is the value of X once you arithmetically shift X to the right by two digits?
7 .
What is the value of X if you arithmetically shift it to the right by eight digits?
Perform the following number conversions:
8 .
hexadecimal value 40A5F916 to binary
9 .
binary value 11011010011010111010 to hexadecimal
10 .
Considering the arguments passed in, what does the following assembly language program do?
Register Use(s)
%rdi Argument x
%rsi Argument y
%rax Return value
movq %rdi, %rax
subq %rsi, %rax
movq %rsi, %rdx
subq %rdi, %rdx
cmpq %rsi, %rdi
cmovle %rdx, %rax
ret  
11 .
Suppose that we have a system with memory access time of 8 cycles. We need to add to that system a cache with 2 cycles access time. What is the smallest hit rate needed to make that cache beneficial? (Hint: avg access time must always be an integer number not floating point.)
12 .
A cache has an access time of 1 cycle. The computer with that cache experienced an average memory access time of 4 cycles, and the hit rate is 70%. What is the access time of the main memory? Did we benefit from having a cache in this system?
Citation/Attribution

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/introduction-computer-science/pages/1-introduction
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/introduction-computer-science/pages/1-introduction
Citation information

© Oct 29, 2024 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.