Ch 14: Preemptive Multitasking & Context Switching

90 Questions90 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS401 - Computer Architecture and Assembly Language Programming Examination Practice

Timed practice exam simulation for CS401 - Computer Architecture and Assembly Language Programming.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 61 โ€“ 70 of 90 Questions
Page 7 of 9
Q61
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ CALL and RET Stack MechanicsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain how the CALL and RET instructions interact with the Instruction Pointer (IP) and the system stack to control program execution flow.
๐Ÿ’ป assembly Snippet
call my_subroutine
; Next instruction executed after RET
Q62
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ Register-Level Mechanics of PUSH and POP InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Describe the precise step-by-step register and memory operations executed by 'PUSH AX' and 'POP AX' in 8088 assembly language.
๐Ÿ’ป assembly Snippet
push ax
pop ax
Q63
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ Subroutine Context Preservation using PUSH and POPMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Why is saving and restoring general-purpose registers using PUSH and POP inside subroutines considered a critical programming standard for context preservation?
๐Ÿ’ป assembly Snippet
push ax
push bx
; body
pop bx
pop ax
ret
Q64
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ PUSH and POP Instruction MechanicsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Explain the mechanics of the PUSH and POP instructions in 8088 assembly language, specifying Stack Pointer (SP) modifications and operand roles.
๐Ÿ’ป assembly Snippet
push ax
pop bx
Q65
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ Subroutine Context Preservation using PUSH and POPEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Why is saving and restoring modified registers using PUSH and POP inside subroutines (like Swap or Bubble Sort) critical for modular programming?
๐Ÿ’ป assembly Snippet
bubble_sort:
  push ax
  push cx
  push si
  ; sorting logic
  pop si
  pop cx
  pop ax
  ret
Q66
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ Stack Overflow and Importance of Parameter Stack CleanupEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What happens if parameters pushed onto a decrementing stack are repeatedly left uncleared across subroutine calls, and what term describes this memory corruption failure?
Q67
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ Static vs Dynamic Thread CreationEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In multi-threaded software architectures and operating systems, thread allocation and creation can be either static or:
  1. A.Static
  2. B.Dynamic
  3. C.Easy
  4. D.Difficult
Q68
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ Multi-Threading Stack Allocation and Local VariablesEasyโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In concurrent thread execution, each individual thread maintains its own call stack containing private function calls, parameters, and ________ variables.
  1. A.Global
  2. B.Local
  3. C.Legal
  4. D.Illegal
Q69
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ Multi-Threading Stack Isolation and Local VariablesEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
During concurrent multi-threading, each individual thread maintains a dedicated execution stack containing function calls, parameters, and ________ variables.
  1. A.Global
  2. B.Local
  3. C.Legal
  4. D.Illegal
Q70
โ“ MCQ๐Ÿ“˜ CS401๐Ÿ“‘ Lec 14๐Ÿท๏ธ Multi-Threading Private Stack AllocationEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
During concurrent thread execution, threads maintain private call stacks containing function calls, parameters, and ________ variables.
  1. A.Global
  2. B.Local
  3. C.Legal
  4. D.Illegal