Bank CH1-4 Past Paper PDF
Document Details
Uploaded by Deleted User
Tags
Summary
Bank CH1-4 covers basic and intermediate operating system concepts. The document includes multiple-choice questions and answers. Good questions for revision of Operating Systems principles.
Full Transcript
**Ch1** **Basic (10 questions)** 1. **What is the primary function of an operating system?** - A\) Execute user programs - B\) Manage computer hardware - C\) Provide a user interface - D\) All of the above\ **Answer:** D 2. **Which of the following is NOT a c...
**Ch1** **Basic (10 questions)** 1. **What is the primary function of an operating system?** - A\) Execute user programs - B\) Manage computer hardware - C\) Provide a user interface - D\) All of the above\ **Answer:** D 2. **Which of the following is NOT a component of a computer system?** - A\) Hardware - B\) Operating system - C\) Users - D\) Internet\ **Answer:** D 3. **What does the bootstrap program do during startup?** - A\) Loads the operating system kernel - B\) Starts the application programs - C\) Initializes the user interface - D\) Updates drivers\ **Answer:** A 4. **What is a key feature of solid-state disks?** - A\) Volatile memory - B\) Higher speed than hard disks - C\) Magnetic storage - D\) Infinite storage capacity\ **Answer:** B 5. **What is the mode bit used for in an operating system?** - A\) To identify user programs - B\) To differentiate between user mode and kernel mode - C\) To measure system performance - D\) To allocate CPU time\ **Answer:** B 6. **What is the function of a cache in storage management?** - A\) Permanent storage - B\) Backing up data - C\) Temporary, faster access to frequently used data - D\) Encrypting data\ **Answer:** C 7. **Which of the following systems uses resource sharing among multiple users?** - A\) Standalone computer - B\) Embedded system - C\) Mainframe - D\) None of the above\ **Answer:** C 8. **What is the primary difference between multiprogramming and multitasking?** - A\) CPU scheduling - B\) User interactivity - C\) Memory allocation - D\) Both A and B\ **Answer:** D 9. **Which of these is NOT an open-source operating system?** - A\) Linux - B\) Windows - C\) BSD - D\) Android\ **Answer:** B 10. **What is the term for organizing jobs in multiprogramming?** - A\) Job sorting - B\) Job scheduling - C\) Process allocation - D\) Resource pooling\ **Answer:** B **Intermediate (7 questions)** 1. **What is the purpose of direct memory access (DMA)?** - A\) Reduce CPU load during data transfer - B\) Increase interrupt handling speed - C\) Enhance user interface performance - D\) Optimize memory allocation\ **Answer:** A 2. **Which computing environment relies heavily on TCP/IP protocols?** - A\) Standalone - B\) Distributed computing - C\) Mobile computing - D\) Client-server\ **Answer:** B 3. **What structure does the OS use for efficient interrupt handling?** - A\) Polling system - B\) Vectored interrupt system - C\) FIFO queue - D\) Hash map\ **Answer:** B 4. **What is a key advantage of symmetric multiprocessing?** - A\) Fault tolerance - B\) Reduced power consumption - C\) Increased reliability and throughput - D\) Dedicated task allocation\ **Answer:** C 5. **In a storage hierarchy, what is the fastest level?** - A\) Main memory - B\) Registers - C\) Cache memory - D\) Secondary storage\ **Answer:** B 6. **Which kernel data structure uses a string of binary digits?** - A\) Hash map - B\) Bitmap - C\) Binary search tree - D\) Linked list\ **Answer:** B 7. **What is a distributed computing environment?** - A\) A single powerful computer - B\) A network of interconnected systems - C\) A virtual machine system - D\) A real-time embedded system\ **Answer:** B **Advanced (3 questions)** 1. **What is the main challenge in cache management?** - A\) Cache speed - B\) Cache size - C\) Replacement policy - D\) Cache volatility\ **Answer:** C 2. **Which cloud computing model delivers applications over the internet?** - A\) Infrastructure as a Service (IaaS) - B\) Platform as a Service (PaaS) - C\) Software as a Service (SaaS) - D\) Virtual Machine Service\ **Answer:** C 3. **What does a virtual machine monitor (VMM) provide in virtualization?** - A\) Cloud storage management - B\) Hardware emulation - C\) Virtualization services - D\) Real-time processing\ **Answer:** C **True/False (10 questions)** 1. An operating system acts as an intermediary between the user and hardware. **(True)** 2. The kernel is the only program always running on a computer. **(True)** 3. Cache memory is slower than secondary storage. **(False)** 4. Asymmetric multiprocessing assigns tasks evenly across processors. **(False)** 5. Virtualization allows running multiple OSes on one hardware system. **(True)** 6. Device controllers directly manage hardware without OS involvement. **(False)** 7. In multiprogramming, only one job resides in memory at a time. **(False)** 8. Mobile computing environments rely solely on Wi-Fi networks. **(False)** 9. Distributed computing systems require homogeneous systems. **(False)** 10. Cloud computing is a logical extension of virtualization. **(True)** **Fill in the Blanks (10 questions)** 1. The bootstrap program is stored in \_\_\_\_\_\_\_\_. *(ROM/EPROM)* 2. The primary unit of data in storage is the \_\_\_\_\_\_\_\_. *(bit)* 3. Operating systems are interrupt-\_\_\_\_\_\_\_\_. *(driven)* 4. \_\_\_\_\_\_\_\_ memory is used to temporarily store frequently accessed data. *(Cache)* 5. The \_\_\_\_\_\_\_\_ manages all device I/O operations in a computer system. *(device controller)* 6. \_\_\_\_\_\_\_\_ computing enables multiple interconnected systems to function as one. *(Distributed)* 7. A \_\_\_\_\_\_\_\_ is a program in execution. *(process)* 8. The fastest storage in a computer is the \_\_\_\_\_\_\_\_. *(register)* 9. A \_\_\_\_\_\_\_\_ allows the OS to virtualize hardware. *(virtual machine monitor/VMM)* 10. The most common network protocol used in distributed systems is \_\_\_\_\_\_\_\_. *(TCP/IP)* Ch2 **Basic (10 questions)** 1. **What is the main purpose of system calls?** - A\) Allow user programs to interact with hardware - B\) Improve graphical user interfaces - C\) Manage network connections - D\) Compile programming languages\ **Answer:** A 2. **Which of these is an operating system service helpful for users?** - A\) Resource allocation - B\) File-system manipulation - C\) Protection and security - D\) Accounting\ **Answer:** B 3. **What does CLI stand for in user interfaces?** - A\) Common Line Interface - B\) Command Line Interpreter - C\) Core Line Instruction - D\) Central Logic Interface\ **Answer:** B 4. **Which system call type is used to create and delete files?** - A\) Process control - B\) File management - C\) Device management - D\) Protection\ **Answer:** B 5. **What is the primary benefit of the microkernel structure?** - A\) Faster kernel operations - B\) Easier extensibility and portability - C\) Unified system interface - D\) Support for batch processing\ **Answer:** B 6. **Which OS structure uses layered approaches for abstraction?** - A\) UNIX - B\) Windows - C\) Layered structure - D\) Android\ **Answer:** C 7. **What programming language is most commonly used for OS development?** - A\) Python - B\) C - C\) Java - D\) Perl\ **Answer:** B 8. **What does the bootstrap loader do during system boot?** - A\) Executes user commands - B\) Loads the operating system into memory - C\) Logs user activities - D\) Updates firmware\ **Answer:** B 9. **What type of system program aids in debugging?** - A\) Text editor - B\) Compiler - C\) Debugger - D\) Loader\ **Answer:** C 10. **Which API is widely used in Windows systems?** - A\) POSIX API - B\) Win32 API - C\) Java API - D\) UNIX API\ **Answer:** B **Intermediate (7 questions)** 1. **Which method is NOT used for parameter passing in system calls?** - A\) Registers - B\) Memory block - C\) Command-line input - D\) Stack\ **Answer:** C 2. **What is the primary function of resource allocation in OS services?** - A\) Distribute CPU and memory resources to programs - B\) Provide error detection mechanisms - C\) Enhance graphical interfaces - D\) Log user activities\ **Answer:** A 3. **In the layered OS structure, which layer directly interfaces with the hardware?** - A\) Layer N - B\) User interface - C\) Layer 0 - D\) Kernel modules\ **Answer:** C 4. **Which operating system design principle separates \"policy\" from \"mechanism\"?** - A\) Hybrid design - B\) Microkernel structure - C\) Modular design - D\) Policy-mechanism principle\ **Answer:** D 5. **Which of the following is NOT a characteristic of modern operating systems?** - A\) Support for virtual machines - B\) Real-time constraints - C\) Fully monolithic structure - D\) Hybrid models\ **Answer:** C 6. **What service does DTrace provide?** - A\) Boot management - B\) System profiling and debugging - C\) Memory allocation - D\) File system management\ **Answer:** B 7. **Which Android component provides a runtime environment?** - A\) Dalvik Virtual Machine - B\) Cocoa Touch - C\) Mach Kernel - D\) Solaris Modules\ **Answer:** A **Advanced (3 questions)** 1. **What is the primary drawback of a microkernel structure?** - A\) Complex implementation - B\) Performance overhead from user-kernel communication - C\) Limited portability - D\) Reduced modularity\ **Answer:** B 2. **Which OS model uses object-oriented design for kernel modules?** - A\) Solaris - B\) Mac OS X - C\) Linux - D\) Hybrid models\ **Answer:** C 3. **What is a key characteristic of the Mach microkernel used in Mac OS X?** - A\) It includes all device drivers - B\) Communication relies on message passing - C\) It is a monolithic kernel - D\) It directly implements all system services\ **Answer:** B **True/False (10 questions)** 1. Modern operating systems often use hybrid models. **(True)** 2. Microkernels have lower performance due to user-kernel communication. **(True)** 3. CLI interfaces are graphical in nature. **(False)** 4. System calls must always be implemented directly by the user. **(False)** 5. Error detection is an OS service that ensures consistent computing. **(True)** 6. A layered structure simplifies the addition of new features. **(True)** 7. Android OS is based on a modified UNIX kernel. **(False)** 8. The policy-mechanism principle restricts flexibility in OS design. **(False)** 9. Bootstrapping involves loading the operating system kernel into memory. **(True)** 10. POSIX API is only used for Linux systems. **(False)** **Fill in the Blanks (10 questions)** 1. System calls act as a bridge between the \_\_\_\_\_\_\_\_ and the operating system. *(user programs)* 2. The \_\_\_\_\_\_\_\_ interface allows users to interact via commands. *(CLI)* 3. \_\_\_\_\_\_\_\_ is a widely used API in Linux and UNIX systems. *(POSIX)* 4. A \_\_\_\_\_\_\_\_ structure involves dividing the OS into separate layers. *(layered)* 5. Modern OS designs often combine monolithic and \_\_\_\_\_\_\_\_ structures. *(microkernel)* 6. \_\_\_\_\_\_\_\_ passes system call parameters using a memory block. *(Linux)* 7. \_\_\_\_\_\_\_\_ are log files that capture kernel memory during a system crash. *(Crash dumps)* 8. \_\_\_\_\_\_\_\_ is a debugging and performance analysis tool in Solaris. *(DTrace)* 9. The core runtime environment in Android is the \_\_\_\_\_\_\_\_. *(Dalvik Virtual Machine)* 10. The \_\_\_\_\_\_\_\_ loader initializes the OS during system boot. *(bootstrap)* Ch3 **Basic (10 questions)** 1. **What is a process in operating systems?** - A\) A program in Rom - B\) A program in execution - C\) A collection of instructions - D\) A program stored on disk\ **Answer:** B 2. **Which state is a process in when it is waiting for an event to occur?** - A\) Running - B\) Waiting - C\) Ready - D\) Terminated\ **Answer:** B 3. **What component of the process holds temporary data like function parameters and local variables?** - A\) Heap - B\) Stack - C\) Data section - D\) Text section\ **Answer:** B 4. **What information does the Process Control Block (PCB) NOT contain?** - A\) Program counter - B\) CPU registers - C\) User interface details - D\) Scheduling information\ **Answer:** C 5. **What is a context switch?** - A\) Switching between memory segments - B\) Switching between processes - C\) Switching to kernel mode - D\) Switching to a new system call\ **Answer:** B 6. **Which queue holds processes ready for CPU execution?** - A\) Job queue - B\) Device queue - C\) Ready queue - D\) Memory queue\ **Answer:** C 7. **What system call is used in UNIX to create a new process?** - A\) exec() - B\) fork() - C\) wait() - D\) exit()\ **Answer:** B 8. **What is a zombie process?** - A\) A process that has terminated but its parent has not yet called wait() - B\) A process running in the background - C\) A process consuming excessive CPU time - D\) A process with memory allocation errors\ **Answer:** A 9. **Which communication model is faster for large data exchanges between processes?** - A\) Message passing - B\) Shared memory - C\) RPC - D\) Sockets\ **Answer:** B 10. **What does a producer process do in the producer-consumer model?** - A\) Consumes items produced by another process - B\) Sends items to the consumer process - C\) Controls the shared memory - D\) Reads data from message queues\ **Answer:** B **Intermediate (7 questions)** 1. **What type of process spends more time doing I/O than computations?** - A\) CPU-bound process - B\) I/O-bound process - C\) Multitasking process - D\) Interactive process\ **Answer:** B 2. **What does the medium-term scheduler do?** - A\) Creates new processes - B\) Selects processes for CPU execution - C\) Removes processes from memory temporarily (swapping) - D\) Monitors system performance\ **Answer:** C 3. **What IPC mechanism is used when two processes share a mailbox for communication?** - A\) Direct communication - B\) Indirect communication - C\) Shared memory - D\) RPC\ **Answer:** B 4. **What is a key difference between Android and iOS multitasking?** - A\) Android allows more background processes - B\) iOS supports real-time processing - C\) Android limits single foreground tasks - D\) iOS has unrestricted memory usage\ **Answer:** A 5. **What is the major drawback of blocking message passing?** - A\) Inefficient memory usage - B\) Delays in process execution - C\) Difficulty in establishing links - D\) Unreliable communication\ **Answer:** B 6. **Which type of pipe requires a parent-child relationship between processes?** - A\) Named pipes - B\) Ordinary pipes - C\) Shared pipes - D\) Bidirectional pipes\ **Answer:** B 7. **What is the purpose of a communication link in message passing?** - A\) Execute system calls - B\) Synchronize memory access - C\) Transfer messages between processes - D\) Allocate shared resources\ **Answer:** C **Advanced (3 questions)** 1. **What is the main challenge of message-passing systems in distributed environments?** - A\) Synchronization of processes - B\) Limited bandwidth - C\) Establishing logical links - D\) Handling failures during communication\ **Answer:** D 2. **In shared memory communication, what must user processes synchronize?** - A\) Memory allocation - B\) Access to the shared memory - C\) Message size - D\) Process states\ **Answer:** B 3. **What feature in Chrome's multiprocess architecture enhances security?** - A\) Browser sandboxing for rendering processes - B\) Unified process for all tabs - C\) Dedicated kernel for browser tasks - D\) Shared buffers for tab memory\ **Answer:** A **True/False (10 questions)** 1. A program becomes a process when it is loaded into memory. **(True)** 2. A terminated process must always release its allocated memory. **(True)** 3. A context switch occurs between two threads in the same process. **(False)** 4. Short-term scheduling determines which process gets the CPU next. **(True)** 5. Indirect communication requires explicit naming of processes. **(False)** 6. Blocking sends are considered asynchronous. **(False)** 7. Pipes are commonly used for interprocess communication in parent-child processes. **(True)** 8. Android's multitasking limits background processes significantly. **(False)** 9. Shared memory is more efficient than message passing for large data transfers. **(True)** 10. A zombie process can be terminated by its parent. **(False)** **Fill in the Blanks (10 questions)** 1. A process changes its state to \_\_\_\_\_\_\_\_ when it is waiting for CPU allocation. *(ready)* 2. \_\_\_\_\_\_\_\_ maintains information like memory limits and open files for each process. *(Process Control Block/PCB)* 3. A \_\_\_\_\_\_\_\_ scheduler decides which process will execute next on the CPU. *(short-term)* 4. \_\_\_\_\_\_\_\_ processes cannot affect or be affected by others. *(Independent)* 5. Message passing in IPC requires \_\_\_\_\_\_\_\_ to send and receive messages. *(communication links)* 6. A process that has terminated but whose parent has not called wait() is a \_\_\_\_\_\_\_\_. *(zombie process)* 7. \_\_\_\_\_\_\_\_ is used to temporarily remove a process from memory. *(Swapping)* 8. The \_\_\_\_\_\_\_\_ mechanism is faster but requires user-managed synchronization. *(shared memory)* 9. Blocking communication methods are considered \_\_\_\_\_\_\_\_. *(synchronous)* 10. Named pipes enable \_\_\_\_\_\_\_\_ communication between processes. *(bidirectional)* Ch4 **Basic (10 questions)** 1. What is a thread in the context of computer systems? - A\) A process - B\) A fundamental unit of CPU utilization - C\) A kernel program - D\) A data structure\ **Answer: B** 2. Which model does Windows Threads implement? - A\) Many-to-One - B\) One-to-One - C\) Many-to-Many - D\) Two-Level\ **Answer: B** 3. What is the key feature of thread libraries like Pthreads? - A\) They handle memory allocation - B\) They manage threading APIs - C\) They are language compilers - D\) They are debugging tools\ **Answer: B** 4. What is an example of a language supporting implicit threading? - A\) Python - B\) C++ - C\) OpenMP - D\) HTML\ **Answer: C** 5. Which operating system does not support kernel threads? - A\) Windows - B\) Linux - C\) Tru64 UNIX - D\) None of the above\ **Answer: D** 6. Which threading issue involves the pthread\_cancel method? - A\) Signal handling - B\) Fork-exec behavior - C\) Thread cancellation - D\) Scheduler activation\ **Answer: C** 7. What is the purpose of thread-local storage? - A\) To share memory between processes - B\) To store thread-specific data - C\) To execute I/O operations - D\) To compile threads\ **Answer: B** 8. What are the two types of threading parallelism? - A\) Task and Data - B\) Thread and Process - C\) Implicit and Explicit - D\) Asynchronous and Deferred\ **Answer: A** 9. Which Java method is used to start a thread? - A\) execute() - B\) run() - C\) start() - D\) launch()\ **Answer: C** 10. Which Python feature limits true multithreading? - A\) Interpreter runtime - B\) Global Interpreter Lock - C\) Process management - D\) Stack overflow\ **Answer: B** **Intermediate (7 questions)** 11. What is Amdahl's Law primarily used for? - A\) Explaining thread scheduling - B\) Measuring speedup in multicore systems - C\) Allocating memory in threads - D\) Debugging thread libraries\ **Answer: B** 12. What is the advantage of using thread pools? - A\) Unlimited threads - B\) Faster response time - C\) Shared memory - D\) Thread cancellation\ **Answer: B** 13. What does the clone() system call in Linux do? - A\) Creates a process only - B\) Creates a thread with shared address space - C\) Debugs a process - D\) Synchronizes multiple threads\ **Answer: B** 14. Which threading model maps multiple user threads to multiple kernel threads? - A\) Many-to-One - B\) One-to-One - C\) Many-to-Many - D\) Two-Level\ **Answer: C** 15. How does Grand Central Dispatch handle tasks? - A\) It creates multiple threads dynamically - B\) It assigns blocks to queues - C\) It compiles threads at runtime - D\) It uses shared address space\ **Answer: B** 16. Which thread type is fully managed by the operating system kernel? - A\) User thread - B\) Kernel thread - C\) Both A and B - D\) None of the above\ **Answer: B** 17. In OpenMP, what directive is used to parallelize a for loop? - A\) \#pragma omp thread - B\) \#pragma omp parallel for - C\) \#pragma omp data - D\) \#pragma omp region\ **Answer: B** **Advanced (3 questions)** 18. How does the GIL impact Python\'s multithreading capabilities? - A\) It limits the use of threads to non-Python code execution - B\) It allows true parallelism - C\) It provides dynamic thread allocation - D\) It has no effect\ **Answer: A** 19. What is a lightweight process in thread management? - A\) A kernel-level process - B\) A thread with minimal overhead - C\) A virtual processor used in multithreaded applications - D\) A single-threaded process\ **Answer: C** 20. How does thread cancellation work in a deferred cancellation model? - A\) Cancels immediately - B\) Waits for a safe cancellation point - C\) Terminates the process - D\) Restarts the thread\ **Answer: B** **True/False Questions** 1. Thread creation is heavier than process creation.\ **False** 2. Implicit threading shifts responsibility from the programmer to the runtime.\ **True** 3. Java threads can only be created by extending the Thread class.\ **False** 4. Python threads can achieve true parallelism within a process.\ **False** 5. Thread pools improve efficiency by reusing existing threads.\ **True** 6. Windows threads use a many-to-many model.\ **False** 7. Signal handlers in UNIX systems can override default handlers.\ **True** 8. Amdahl's Law shows that the serial portion of a task limits speedup.\ **True** 9. Pthreads are specific to Windows operating systems.\ **False** 10. Linux uses the clone() system call for thread creation.\ **True** **Fill-in-the-Blank Questions** 1. The \_\_\_\_\_\_\_\_\_\_ is a fundamental unit of CPU utilization.\ **Answer: thread** 2. Threads within the same process share \_\_\_\_\_\_\_\_\_\_.\ **Answer: resources** 3. The \_\_\_\_\_\_\_\_\_\_ thread library is a POSIX standard.\ **Answer: Pthreads** 4. \_\_\_\_\_\_\_\_\_\_ law explains speedup limits in multicore systems.\ **Answer: Amdahl's** 5. The threading model where one user thread maps to one kernel thread is called \_\_\_\_\_\_\_\_\_\_.\ **Answer: one-to-one** 6. Thread-local storage allows threads to have their own copy of \_\_\_\_\_\_\_\_\_\_.\ **Answer: data** 7. \_\_\_\_\_\_\_\_\_\_ is a set of compiler directives supporting parallel programming.\ **Answer: OpenMP** 8. The \_\_\_\_\_\_\_\_\_\_ module in Python enables true parallelism via processes.\ **Answer: multiprocessing** 9. The \_\_\_\_\_\_\_\_\_\_ system call in Linux supports thread creation.\ **Answer: clone()** 10. A thread can be canceled immediately in the \_\_\_\_\_\_\_\_\_\_ cancellation model.\ **Answer: asynchronous**