Unit 5 - Practice Quiz

CSE211 59 Questions
0 Correct 0 Wrong 59 Left
0/59

1 In a typical memory hierarchy, which type of memory has the fastest access time?

Memory hierarchy Easy
A. Auxiliary Memory (HDD/SSD)
B. Cache Memory
C. CPU Registers
D. Main Memory (RAM)

2 What is the primary characteristic of main memory, such as RAM?

main memory Easy
A. It is non-volatile
B. It is the slowest memory
C. It is volatile
D. It has the largest storage capacity

3 Which of the following is a primary example of auxiliary memory?

auxiliary memory Easy
A. Solid-State Drive (SSD)
B. DRAM
C. CPU Registers
D. SRAM

4 What is the main purpose of cache memory?

Cache memory Easy
A. To reduce the average time to access data from the main memory
B. To permanently store the operating system
C. To increase the total storage capacity of a computer
D. To perform arithmetic calculations

5 What does virtual memory allow a computer to do?

Virtual memory Easy
A. Use disk space as an extension of RAM, allowing larger programs to run
B. Increase the speed of the CPU clock
C. Make the cache memory larger
D. Connect to the internet wirelessly

6 What is the primary advantage of CPU pipelining?

Pipelining Easy
A. It increases the size of main memory
B. It increases instruction throughput
C. It reduces the computer's power consumption
D. It decreases instruction latency

7 In which cache mapping technique is a main memory block mapped to one specific line in the cache?

Mapping Techniques Easy
A. Random Mapping
B. Direct Mapping
C. Fully Associative Mapping
D. Set-Associative Mapping

8 In the 'write-back' policy, when is the modified data in a cache block written to main memory?

Writing into Cache concept Easy
A. Only when the cache block is being replaced
B. Never, it only stays in the cache
C. Immediately upon every write operation
D. After a fixed time interval

9 What is the fundamental concept behind parallel processing?

Introduction to Parallel Processing Easy
A. Storing data in a parallel sequence
B. Running a single task on a faster processor
C. Using a single processor to handle all tasks sequentially
D. Executing multiple tasks or parts of a task simultaneously

10 A system with multiple processors that share a common main memory and I/O devices is known as a:

Characteristics of Multiprocessors Easy
A. Standalone system
B. Distributed system
C. Loosely-coupled system
D. Tightly-coupled system

11 What is the most common, simplest, and least expensive interconnection structure for connecting multiple components like CPU, memory, and I/O devices?

Interconnection Structures Easy
A. Fully Connected Mesh
B. Hypercube
C. Crossbar Switch
D. Common Bus

12 According to Flynn's classification, a standard single-core processor that executes one instruction on one piece of data at a time is classified as:

Parallel Processing Easy
A. SISD (Single Instruction, Single Data)
B. MIMD (Multiple Instruction, Multiple Data)
C. MISD (Multiple Instruction, Single Data)
D. SIMD (Single Instruction, Multiple Data)

13 As we move down the memory hierarchy (from cache to HDD), what happens to the cost per bit?

Memory hierarchy Easy
A. It remains constant
B. It becomes unpredictable
C. It decreases
D. It increases

14 When the CPU needs data and it is not found in the cache, this situation is called a:

Cache memory Easy
A. Cache miss
B. Cache error
C. Cache fault
D. Cache hit

15 The fixed-size block of data that is transferred between main memory and secondary storage in a virtual memory system is called a:

Virtual memory Easy
A. Frame
B. Word
C. Cache line
D. Page

16 A situation where the pipeline must stall because of a branch instruction is known as a:

Pipelining Easy
A. Structural hazard
B. Execution hazard
C. Data hazard
D. Control hazard

17 Which technology is most commonly used to implement the main memory in modern computers?

main memory Easy
A. SRAM (Static Random-Access Memory)
B. DRAM (Dynamic Random-Access Memory)
C. Flash Memory
D. Magnetic Tape

18 A key advantage of auxiliary memory over main memory is that it is:

auxiliary memory Easy
A. Non-volatile
B. Faster
C. Directly accessible by the CPU
D. More expensive per bit

19 Which architectural model, according to Flynn's taxonomy, is used in modern multi-core processors found in PCs and servers?

Characteristics of Multiprocessors Easy
A. MISD (Multiple Instruction, Single Data)
B. MIMD (Multiple Instruction, Multiple Data)
C. SIMD (Single Instruction, Multiple Data)
D. SISD (Single Instruction, Single Data)

20 An interconnection network where each node connects to its neighbors in a 2D or 3D grid is called a:

Interconnection Structures Easy
A. Bus network
B. Star network
C. Ring network
D. Mesh network

21 A processor has a cache with an access time of 2 ns. The main memory has an access time of 120 ns. If the cache hit rate is 95%, what is the Average Memory Access Time (AMAT)?

Memory hierarchy Medium
A. 5.9 ns
B. 8.0 ns
C. 6.0 ns
D. 122 ns

22 Consider a direct-mapped cache of size 16 KB with a block size of 32 bytes. The system uses a 32-bit memory address. How are the address bits partitioned into Tag, Index, and Block Offset?

Mapping Techniques Medium
A. Tag = 17 bits, Index = 10 bits, Offset = 5 bits
B. Tag = 18 bits, Index = 10 bits, Offset = 4 bits
C. Tag = 19 bits, Index = 8 bits, Offset = 5 bits
D. Tag = 18 bits, Index = 9 bits, Offset = 5 bits

23 A system uses a 32-bit virtual address and a page size of 4 KB. If each page table entry (PTE) requires 4 bytes, what is the total size of the page table for a single process that uses the entire virtual address space?

Virtual memory Medium
A. 1 MB
B. 8 MB
C. 4 MB
D. 2 MB

24 In a system with a write-back cache policy, when is the data from a modified cache block actually written to the main memory?

Writing into Cache concept Medium
A. Periodically, based on a timer.
B. Immediately after the processor writes to the cache block.
C. Only when the cache block is selected for replacement and it is marked as 'dirty'.
D. When a cache read miss occurs for that specific block.

25 A 5-stage instruction pipeline executes 100 instructions. Assuming no stalls or hazards, and each stage takes one clock cycle, what is the speedup of the pipelined processor compared to a non-pipelined processor?

Pipelining Medium
A. 4.81
B. 5.00
C. 20
D. 100

26 In a multiprocessor system using a hypercube interconnection network with 64 processors, what is the maximum number of communication links (hops) a message must traverse to get from any source processor to any destination processor (i.e., the network diameter)?

Interconnection Structures Medium
A. 6
B. 16
C. 4
D. 8

27 A memory system has a 32 KB, 4-way set-associative cache with a block size of 64 bytes. If the main memory address is 32 bits long, what is the size of the Tag field?

Mapping Techniques Medium
A. 18 bits
B. 20 bits
C. 19 bits
D. 17 bits

28 In a virtual memory system, what does a Translation Lookaside Buffer (TLB) miss signify?

Virtual memory Medium
A. The requested page is not present in main memory.
B. The physical address cannot be generated.
C. A protection fault has occurred (e.g., trying to write to a read-only page).
D. The page table entry for the requested page is not in the TLB.

29 You are analyzing a multiprocessor system where the time to access a memory location depends on the physical proximity of the processor to that memory module. Processors can access their local memory faster than memory local to other processors. What is the memory organization of this system?

Characteristics of Multiprocessors Medium
A. Cache Only Memory Architecture (COMA)
B. Symmetric Multiprocessing (SMP)
C. Uniform Memory Access (UMA)
D. Non-Uniform Memory Access (NUMA)

30 Consider a system using a write-allocate policy combined with a write-back policy. What is the correct sequence of events following a write miss?

Writing into Cache concept Medium
A. The write operation is buffered and the processor continues, while the block is fetched from memory in the background.
B. The processor writes to the cache block, and the write is immediately propagated to main memory.
C. The block containing the address is fetched from main memory into the cache, and then the processor writes to the newly loaded cache block.
D. The data is written directly to main memory, bypassing the cache.

31 A program contains the following loop: for (int i = 0; i < 1000; i++) sum += a[i];. Which principle of locality is most strongly demonstrated by the access pattern to the array a?

Memory hierarchy Medium
A. Temporal Locality
B. Equivalence Locality
C. Spatial Locality
D. Branch Locality

32 According to Amdahl's Law, if 80% of a program can be made parallel, what is the maximum speedup that can be achieved on a machine with an infinite number of processors?

Parallel Processing Medium
A. Infinite speedup
B. 5x
C. 4x
D. 8x

33 Consider the following sequence of instructions: \n1. ADD R1, R2, R3 (R1 = R2 + R3) \n2. SUB R4, R1, R5 (R4 = R1 - R5) \nWhat type of pipeline hazard does this sequence present, and what is a common hardware technique to mitigate it without stalling?

Pipelining Medium
A. Structural Hazard, solved by duplicating functional units.
B. Control Hazard, solved by branch prediction.
C. Read-After-Write (RAW) Data Hazard, solved by forwarding/bypassing.
D. Write-After-Read (WAR) Data Hazard, solved by register renaming.

34 Which interconnection network for a multiprocessor system is characterized by offering simultaneous, non-blocking paths between any processor and any memory module, but has a hardware cost that scales with , making it impractical for large systems?

Interconnection Structures Medium
A. Omega Network
B. Crossbar Switch
C. Shared Bus
D. 2D Mesh

35 A system has a 14-bit logical address and a page size of 64 bytes. The physical memory has 16 frames. A process's page table contains the following valid entries: Page 2 maps to Frame 4, and Page 5 maps to Frame 9. What is the physical address corresponding to the logical address 0x05A7?

Virtual memory Medium
A. 0x40A
B. 0x08A
C. 0x10A
D. 0x20A

36 A parallel computer architecture that uses multiple independent processors, each executing different instructions on different data streams, is classified under Flynn's Taxonomy as:

Introduction to Parallel Processing Medium
A. SISD (Single Instruction, Single Data)
B. SIMD (Single Instruction, Multiple Data)
C. MIMD (Multiple Instruction, Multiple Data)
D. MISD (Multiple Instruction, Single Data)

37 A 2-way set-associative cache uses an LRU replacement policy. A specific set is initially empty. The CPU then accesses memory blocks that map to this set in the following sequence: A, B, C, A, B. Which two blocks are present in the set after the final access to B?

Cache memory Medium
A. The set is empty
B. A and B
C. B and C
D. A and C

38 What is the primary trade-off that leads to the use of DRAM for main memory and SRAM for cache memory?

main memory Medium
A. DRAM is easier to interface with the CPU than SRAM.
B. DRAM is non-volatile while SRAM is volatile.
C. DRAM has higher density and lower cost per bit, while SRAM is significantly faster.
D. DRAM has lower static power consumption than SRAM.

39 In a shared-memory multiprocessor system where each processor has its own local cache, Processor A modifies a shared data item X in its cache. Before this change is written back to main memory, Processor B reads X from main memory. Processor B now has an outdated value of X. This scenario is a classic example of the:

Characteristics of Multiprocessors Medium
A. Cache Coherence Problem
B. Bus Arbitration Problem
C. Deadlock Problem
D. Data Dependency Hazard

40 Comparing cache mapping techniques, which one provides the lowest potential for conflict misses but requires the most complex and expensive hardware for tag comparison?

Mapping Techniques Medium
A. Segmented-Paged Mapping
B. Fully Associative
C. Direct Mapped
D. Set-Associative

41 A system has a 128 KB, 3-way set-associative cache with a block size of 64 bytes. The physical address space is 4 GB. For the physical address 0x1A2B3C4D, what is the set number and the tag in hexadecimal?

Mapping Techniques Hard
A. Set: 0x3C4, Tag: 0x1A2B3
B. Set: 0x0F1, Tag: 0x68ACF
C. Set: 0x0F1, Tag: 0x1A2B3
D. Set: 0x3C4, Tag: 0x068AC

42 A system uses a 32-bit virtual address, 4 KB pages, and has a 64 KB, 4-way set-associative L1 cache that is Virtually Indexed, Physically Tagged (VIPT). To guarantee that the cache is free from the synonym/aliasing problem without requiring any OS intervention or hardware flush/probe mechanisms, the cache index bits must be chosen entirely from the page offset part of the virtual address. What is the maximum possible size of such an alias-free cache if the block size is 64 bytes?

Mapping Techniques Hard
A. 128 KB
B. 16 KB
C. 64 KB
D. 32 KB

43 A system has a 46-bit virtual address, 4 KB page size, and 8-byte page table entries (PTEs). To conserve memory, page tables at each level of a multi-level page table structure must themselves fit within a single page frame. What is the minimum number of levels of page tables required for this architecture?

Virtual Memory Hard
A. 5 levels
B. 4 levels
C. 2 levels
D. 3 levels

44 Consider a 5-stage MIPS pipeline (IF, ID, EX, MEM, WB) with full forwarding logic. A load-use hazard still incurs a 1-cycle stall. For the following code sequence, how many stall cycles are inserted by the pipeline control logic in total?

assembly
LW R1, 0(R2)
ADD R3, R1, R4
LW R5, 4(R1)
ADD R6, R5, R3

Pipelining Hard
A. 1 cycle
B. 4 cycles
C. 2 cycles
D. 3 cycles

45 For a system with 64 processors, what is the ratio of the bisection bandwidth of a 6-dimensional binary hypercube to that of an 8x8 2D torus? Assume each communication channel has the same unit bandwidth.

Interconnection Structures Hard
A. 2:1
B. 4:1
C. 1:2
D. 1:1

46 A processor sequentially writes to every byte of a 1 KB array. The system has a 32-byte cache block size, and the array is initially not in the cache and is aligned to a block boundary. Compare the total main memory bus traffic (in bytes) generated by a write-back, write-allocate cache versus a write-through, no-write-allocate cache. Assume the write-through cache can perform single-byte transfers to memory. What is the ratio of (Write-Back Traffic / Write-Through Traffic)?

Writing into Cache concept Hard
A. 2
B. 0.5
C. 4
D. 1

47 Two processors, P1 and P2, use a snooping-based MESI protocol. They share a memory address A, which is initially not cached. The initial value of A is 0. Analyze the following sequence of operations: (1) P1 reads A, (2) P2 reads A, (3) P1 writes value 1 to A, (4) P2 reads A. What are the final states of the cache line for A in P1 and P2, and how many total bus transactions are generated?

Characteristics of Multiprocessors Hard
A. Final State: P1(M), P2(I). Transactions: 3
B. Final State: P1(E), P2(S). Transactions: 4
C. Final State: P1(S), P2(S). Transactions: 4
D. Final State: P1(S), P2(S). Transactions: 3

48 A system uses a 2-level page table, 32-bit virtual addresses, 4 KB pages, and 4-byte PTEs. It has a TLB that can hold 64 entries and is 4-way set-associative. The TLB search time is 2 ns. A main memory access takes 100 ns. If a TLB miss occurs, it takes one memory access to get the L1 PTE and another for the L2 PTE. The TLB hit rate is 98%, but for 10% of TLB misses, the required page is not in memory and a page fault occurs. A page fault service takes 10 ms (including disk access and updating page tables). What is the Effective Memory Access Time (EMAT)?

Virtual Memory Hard
A. 100,205.9 ns
B. 108.88 ns
C. 106.0 ns
D. 205.9 ns

49 A system has a 32-bit physical address space and a 3-way set-associative cache. The cache is organized into 1024 sets, and the block size is 64 bytes. The cache controller uses the common method where the number of sets is a power of two for indexing. For the physical address 0xDEADBEEF, which of the following represents the correct Tag and Index (in hex)?

Mapping Techniques Hard
A. Tag: 0x1579BD, Index: 0xFFF
B. Tag: 0xABCDE, Index: 0xFFF
C. Tag: 0xABCDE, Index: 0x7FF
D. Tag: 0xABCDEFF, Index: 0xFFF

50 A system has a 32-bit physical address, a 4-way set-associative cache with 1024 sets, and a block size of 64 bytes. For the physical address 0x12345678, what are the correct Tag and Set Index values in hexadecimal?

A. Tag: 0x48D1, Index: 0x259
B. Tag: 0x12345, Index: 0x67
C. Tag: 0x1234, Index: 0x167
D. Tag: 0x123, Index: 0x119

51 A system has a TLB with a 98% hit rate. A TLB hit takes 2 ns. A memory access takes 100 ns. On a TLB miss, a 2-level page table must be traversed, costing one memory access per level. Page faults occur on 0.1% of all memory accesses (not just on misses), and the total time to service a page fault (including disk I/O, OS overhead, and updating tables) is 20 ms. What is the Effective Memory Access Time (EMAT) in this system?

Virtual Memory Hard
A. 106 ns
B. 20,105 ns
C. 20,404 ns
D. 20,302 ns

52 A superscalar processor can issue two instructions per clock cycle. It has two identical 5-stage pipelines (IF, ID, EX, MEM, WB) and features full forwarding. One pipeline can execute any instruction, while the second can only execute ALU and branch instructions (not loads/stores). Given the code, and assuming the LW incurs a 1-cycle load-use stall, what is the total number of cycles to complete the WB stage of the SUB instruction?
assembly
LW R1, 0(R2)
ADD R3, R1, R8
SUB R4, R1, R9
AND R5, R3, R4

Pipelining Hard
A. 7 cycles
B. 10 cycles
C. 8 cycles
D. 9 cycles

53 In a 16-node (processors P0 to P15) network using a 4D hypercube topology, packets are routed using e-cube routing (dimension-order routing). A packet is sent from node 5 (binary 0101) to node 12 (binary 1100). What is the sequence of intermediate nodes the packet will visit?

Interconnection Structures Hard
A. 5 -> 7 -> 15 -> 12
B. 5 -> 13 -> 12
C. 5 -> 1 -> 9 -> 12
D. 5 -> 4 -> 12

54 A program has a serial portion that takes 20% of the execution time. The remaining 80% is parallelizable but has a synchronization overhead that increases with the number of processors (P), given by the formula: Overhead(P) = . According to Amdahl's Law, modified for this overhead, what is the approximate optimal number of processors to use for maximum speedup?

Parallel Processing Hard
A. 40 processors
B. 80 processors
C. 10 processors
D. 20 processors

55 A system has three levels of caches (L1, L2, L3) and main memory. The access times are: L1=1ns, L2=10ns, L3=50ns, Memory=200ns. The hit rates are: L1=90%, L2=80% (local, i.e., for misses from L1), L3=60% (local, for misses from L2). What is the change in Average Memory Access Time (AMAT) if the L2 cache is removed entirely from the hierarchy?

Memory Hierarchy Hard
A. Decreases by 1.6 ns
B. Increases by 1.6 ns
C. Increases by 9.8 ns
D. Increases by 8.2 ns

56 A DDR4 SDRAM module has a bus clock of 1600 MHz, a 64-bit wide data bus, and uses an 8n prefetch architecture. Given the timing parameters: ns, ns, and ns. If a single random 64-byte read request is issued, what is the memory latency (time from request to first data) and the total time to transfer the entire 64 bytes?

Main Memory Hard
A. Latency: 48 ns, Total Time: 50.5 ns
B. Latency: 16 ns, Total Time: 18.5 ns
C. Latency: 48 ns, Total Time: 52.0 ns
D. Latency: 32 ns, Total Time: 34.5 ns

57 In a directory-based cache coherence protocol, a system has 16 processors. The directory uses a full bit vector scheme to track sharers. A memory block is currently uncached. Processor P5 reads the block, then P8 reads it, then P12 reads it. Finally, P5 writes to the block. How many total coherence messages (requests and invalidations/forwards) are sent over the network for this entire sequence?

Characteristics of Multiprocessors Hard
A. 5 messages
B. 10 messages
C. 8 messages
D. 7 messages

58 A system uses a write-back cache with a 4-entry write buffer. The processor executes a sequence of 5 consecutive store instructions to different cache blocks, all of which are dirty. Each store takes 1 cycle if the write buffer is not full. A write-back to memory takes 20 cycles to complete, during which the buffer entry is occupied. The processor must stall if it executes a store when the write buffer is full. How many stall cycles will the processor experience?

Writing into Cache concept Hard
A. 20 cycles
B. 15 cycles
C. 16 cycles
D. 0 cycles

59 A direct-mapped cache has a total size of 4 KB and a block size of 16 bytes. A 2-way set-associative cache has the same total size and block size. Analyze the number of cache misses for the following C code loop, assuming int is 4 bytes, array is block-aligned, and the caches are initially empty. What is the ratio of misses (Direct-Mapped / Set-Associative)?
c
int array[2048]; // 8 KB total size
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 2048; j++) {
array[j] = array[j] + i;
}
}

Cache Memory Hard
A. 2:1
B. 10:1
C. 1:1
D. The ratio is undefined as both have 100% miss rates