Topic: RISC vs CISC · ISA and binary compatibility · abstraction and portability · CPU instruction cycle · cache locality · DMA and interrupts · threads and shared state
Questions: 10 (5 MCQ + 5 True/False)
Source: ../../../Chats/WhatsApp-Cheat-code/chat.md — the set circulated in the class WhatsApp group on 22 Nov 2026.
Verification status: ✅ All 10 marked answers checked against the lecture material in
../Study Notes/Lecture Sessions/(ISA, instruction cycle, process/system calls). All 10 are correct. No corrections needed.
Quick answer key
| Q | Answer | Q | Answer |
|---|---|---|---|
| 1 | D — not justified; depends on implementation, not the RISC/CISC label | 6 | False |
| 2 | D — abstraction improves portability, compatibility still depends on the software stack | 7 | False |
| 3 | A — different ISAs, so encodings and architectural rules differ | 8 | True |
| 4 | D — decode → datapath supplies registers → ALU → write R3 | 9 | False |
| 5 | A — cache retains recently/frequently used data near the CPU | 10 | False |
Detailed questions, verified answers & explanations
Q1. A cloud infrastructure team is evaluating two server platforms. One uses an x86-64 processor and the other uses an ARM64 processor. A team member concludes that the ARM64 server must always consume less power and execute workloads faster because ARM is a RISC architecture. Which is the most technically defensible response?
A. The conclusion is correct because RISC processors always execute fewer instructions. B. The conclusion is correct because CISC processors cannot use pipelining. C. The conclusion is incorrect because ARM64 and x86-64 implement the same ISA. D. The conclusion is not justified; workload performance and power depend on the implementation, microarchitecture, process technology and system configuration, not merely the RISC/CISC label.
✅ Correct: D RISC and CISC describe instruction-set philosophy, not an efficiency guarantee. ARM64 is a fixed-length (32-bit) load-store ISA; x86-64 is variable-length CISC, yet modern x86 cores decode into RISC-like micro-ops and pipeline heavily — so B is false. A is false because RISC generally means more, simpler instructions with a lower CPI payoff traded against higher instruction count. C is false because they are entirely different ISAs (that is exactly why Q3's binary fails). Real power and performance come from the microarchitecture, process node, clock, cache hierarchy and the workload mix.
Q2. A company is migrating an internally developed business application from one hardware platform to another. The development team argue that because the application is written in a high-level programming language, it should execute identically on the new platform without any changes to the software environment. Which statement most accurately describes the role of abstraction in this situation?
A. Abstraction guarantees that every application can execute on every hardware platform without modification. B. Abstraction eliminates the need for an operating system when applications are migrated. C. Abstraction ensures that the CPU, memory and I/O architecture remain identical across platforms. D. Abstraction hides lower-level implementation details, improving portability, but compatibility still depends on the software stack and platform support.
✅ Correct: D A high-level language abstracts the ISA away from the programmer, which is what makes source-level portability possible. But the compiled artifact still targets one ISA/ABI, and running it needs a compatible OS, runtime libraries, drivers and toolchain. A overstates it (a recompile is usually required), B is wrong (the OS is more necessary, not less), C is the opposite of what abstraction does — it hides the differences rather than removing them.
Q3. A software vendor distributes a compiled application for an x86-64 server. A customer attempts to run the same binary directly on an ARM64 server. Both processors support arithmetic, logical, load and store operations. Why might the application fail to execute natively?
A. The processors implement different ISAs, so their machine instruction encodings and architectural rules are not necessarily compatible. B. ARM64 processors cannot access memory using registers. C. Both processors must use identical clock frequencies for binary compatibility. D. ARM64 processors do not support arithmetic operations.
✅ Correct: A A binary is a stream of encoded instructions in one ISA. Opcode layouts, register conventions, addressing modes, ABI and memory-consistency rules differ between x86-64 and ARM64, so the file simply is not valid machine code for the other core. It can run only after recompilation or through emulation/translation. B and D are factually wrong (ARM64 is a load-store ISA — it only accesses memory via registers), and C confuses clock rate with compatibility.
Q4. A developer examines an assembly instruction: ADD R3, R1, R2. Assume the instruction format specifies that the contents of R1 and R2 are added and the result is stored in R3. Both source operands are already available in CPU registers. Which sequence best represents the relevant execution activity?
A. The CPU fetches both operands from SSD, adds them and writes the result to RAM. B. The CPU transfers the operands to the I/O controller before performing the addition. C. The ALU decodes the instruction and the control unit performs the arithmetic operation. D. The control unit decodes the instruction, the datapath supplies the register operands to the ALU, and the result is written to R3.
✅ Correct: D This is the classic fetch–decode–execute–writeback cycle: the control unit decodes the opcode and asserts the control signals; the datapath reads R1 and R2 from the register file and feeds the ALU; the ALU result is written back to R3. C swaps the two units' jobs — the ALU never decodes. A and B route register operands through storage or I/O, which does not happen for a register-to-register ALU operation.
Q5. A database application repeatedly accesses a small set of frequently used records. The system architect wants to improve average memory-access performance without increasing the capacity of main memory. Which architectural mechanism most directly supports this objective?
A. Use cache memory to retain recently or frequently accessed data close to the CPU. B. Replace registers with a larger SSD. C. Move all frequently accessed data to secondary storage. D. Increase the size of the application executable.
✅ Correct: A Cache is small, fast SRAM between the CPU and DRAM that exploits temporal locality (recently used data is likely reused) and spatial locality. A small hot working set fits almost entirely in cache, so the average access time drops sharply — with no change to DRAM capacity. C moves data to slower storage, B and D have no bearing on the memory hierarchy at all.
Q6. A software team migrates an application from an x86-64 server to an ARM64-based cloud instance. The application source code is unchanged, but the team must ensure that the executable and its dependencies are compatible with the target architecture. A developer argues that because both processors execute instructions such as addition, load and branch, the same compiled binary must work on both systems.
✅ Correct: False Sharing categories of operations (add, load, branch) does not make the encodings identical. The compiled binary and its native dependencies (shared libraries, runtime) are ISA/ABI-specific, so the app must be rebuilt for ARM64 — or run under emulation.
Q7. A transaction-processing application executes an instruction that adds the values held in two CPU registers and stores the result in a destination register. An engineer claims that the CPU must fetch both operands from DRAM before performing the addition because all application data ultimately resides in main memory.
✅ Correct: False The operands are already in registers. Registers are the top of the memory hierarchy and are addressed directly by the datapath; DRAM is only touched by explicit load/store instructions. "All data ultimately lives in memory" says nothing about where the operands are at the moment of execution.
Q8. A data-engineering team processes a large matrix stored in row-major order in C. During performance tuning, the team changes its nested loops to process elements row by row rather than column by column. The engineer expects this to improve cache utilization because consecutive elements in a row are stored contiguously in memory.
✅ Correct: True
C stores arrays in row-major order, so a[i][j] and a[i][j+1] are adjacent. Row-wise traversal walks memory sequentially, using every element of each fetched cache line (spatial locality). Column-wise traversal strides by a full row per step, so nearly every access is a cache miss and a whole line is fetched to use one element.
Q9. A network interface controller transfers a large block of received data into main memory using DMA. The CPU is then notified that the transfer has completed through an interrupt. An engineer argues that DMA and interrupts cannot be used together because DMA eliminates the need for CPU involvement in I/O operations.
✅ Correct: False DMA removes the need for the CPU to copy the data, not the need to know when it is done. Completion is normally signalled by an interrupt (or by polling a status register), so DMA and interrupts are complementary — the standard high-throughput I/O design.
Q10. An online order-processing service uses three threads within the same process. One thread handles incoming requests, another processes payments, and a third writes audit records. A developer assumes that each thread has its own independent copy of the process heap and global variables, so no synchronization is required when these threads update shared application data.
✅ Correct: False Threads in one process share the code, heap, globals and open file descriptors; only the stack, registers and program counter are per-thread. Concurrent updates to shared order/payment/audit state are therefore a data race and need synchronization (mutex, atomic operation, or message passing) to stay correct.