Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CS 61C

Spring 2022

Final

Q1 True/False                    (6 points)

Q1.1 (1 point) True or False: All RISC-V instructions are 4 bytes long, which is why the immediates for B-type and J-type instructions each have two implicit 0s.

True          False

Q1.2 (1 point) True or False: Most computers natively use a little-endian data encoding.

True          False

Q1.3 (1 point) True or False: The last step of the CALL process, the loader, is part of the operating system and is responsible for correctly starting a program.

True           False

Q1.4 (1 point) True or False: System calls (such as the ecall instruction in RISC-V) are executed by the program itself.

True           False

Q1.5 (1 point) True or False: Even with a direct memory access (DMA) controller, the CPU is required to initiate a memory transfer.

True           False

Q1.6 (1 point) True or False: In warehouse scale computing, water can be used as an alternative to air to cool machines and infrastructure.

True           False

Q2 Short Answer (8 points)

Q2.1 (2 points) Translate the following RISC-V instruction into its corresponding 32-bit hexadecimal value.

sb t3, 31(t3)

Q2.2 (2 points) Simplify the following Boolean expression. For full credit, your solution must use at most 3 boolean operators (OR, AND, NOT).

!((A + !A)B + (CD)) + CD

The DOGGO 61C midterm consists of short-answer and long-answer questions. Grading all submissions for the midterm is done in two steps.

First, the midterm is preprocessed by the exam TAs. It would take 1 hour to sequentially preprocess all submissions, but this is infinitely parallelizable.

Then, once preprocessing is done, all TAs (including exam TAs) participate in grading. Each question must be graded fully by a single TA (to maintain consistent grading over all submissions). For example, if Justin grades Q1 for a submission, he must grade Q1 for all submissions; no other TA may grade Q1 for any other submission.

Question type

Number of questions

Time to grade one question across all submissions

Short-answer

40

50 minutes

Long-answer

10

250 minutes

Total: 4500 TA-minutes

Q2.3 (1 point) This class has 10 TAs, 5 of whom are exam TAs.

In the best-case scenario, how many minutes would it take us to grade all submissions? Round your answer to the nearest minute, if needed.

Q2.4 (1 point) Noting that this would take too long, we decide instead to hire all 7 billion people on Earth as TAs to help grade the midterm. As before, we still have only 5 exam TAs.

In the best-case scenario, how many minutes would it now take us to grade all submissions? Round your answer to the nearest minute, if needed.

Q2.5 (2 points) One of the hive machines shuts down unexpectedly. After investigating, the TAs conclude that during the past 100 days, this hive machine encountered 6 failures, and each failure took 12 hours to repair. What is the availability of this hive machine over the last 100 days? Express your answer as a reduced fraction.