Worksheetsأسئلة حول أنظمة التشغيل
Total questions: 84
Worksheet time: 45mins
What is an Operating System?
A hardware component
A program that acts as an intermediary between a user and the computer hardware
A type of application
None of the above
What does a device controller do?
Manages CPU cycles
Manages I/O devices
Controls memory allocation
None of the above
What is the main function of a bootstrap program?
To store data
To manage processes
To initialize the system and load the operating system kernel
To control I/O devices
What is multiprogramming?
A system that allows one program to run at a time
A system where multiple programs are kept in memory and executed by the CPU
A type of operating system
None of the above
What is a kernel?
A program running all the time on the computer
A user program
A type of hardware
None of the above
What does DMA stand for?
Direct Memory Access
Data Management Application
Disk Management Area
None of the above
What is virtual memory used for?
To increase CPU speed
To allow execution of programs not fully in memory
To store user data
None of the above
What is the main function of an operating system?
To compile programs
To manage hardware and software resources
To write programs
To design interfaces
Which of the following is not a user interface provided by an operating system?
Command-Line Interface (CLI)
Graphic User Interface (GUI)
Database Management Interface (DBI)
Batch Interface
What is a system call?
A command to the hardware
A program that compiles code
A request to the OS for service by a program
A debugging tool
What is the main purpose of a system boot?
To shut down the computer
To load the operating system into memory
To execute a program
To run diagnostic tests
Which of the following is a communication method between processes?
File reading
Message passing
Command-line interface
Error detection
Which operating system component is responsible for error detection?
CPU
Memory
Operating system
Application programs
What kind of interface allows users to type commands directly to the operating system?
Batch interface
Command-Line Interface (CLI)
Graphic User Interface (GUI)
Touchscreen Interface
What does a shell in an operating system do?
Manages hardware
Interprets commands and runs programs
Compiles code
Allocates memory
What is a process?
A program stored on the hard drive
A program in execution
A static file
A user interface
Which of the following is not a process state?
Running
Waiting
Terminated
Deleted
What is the short-term scheduler responsible for?
Selecting processes for the ready queue
Managing I/O requests
Allocating memory
Executing processes in the CPU
Which of the following IPC mechanisms uses memory shared between processes?
Message passing
Signals
Shared memory
Sockets
In the producer-consumer problem, what is the role of the buffer?
To store produced data temporarily
To manage I/O requests
To handle memory allocation
To execute processes
Which type of communication link is usually bi-directional?
Direct communication
Indirect communication
Shared memory
Message passing
What is the main feature of named pipes?
They only work between parent and child processes
They allow bi-directional communication without a parent-child relationship
They are faster than ordinary pipes
They only work within one system
Which of the following is used to establish communication between a client and server?
Files
Shared memory
Sockets
Semaphores
What is a thread?
A process running on a computer
A fundamental unit of CPU utilization
A system call
An operating system library
What is one key advantage of using threads in an application?
Simplifies code but decreases performance
Requires more memory but increases performance
Simplifies code and increases efficiency
Reduces the number of processes
What is a multithreading model where each user-level thread is mapped to one kernel thread?
Many-to-One
One-to-One
Many-to-Many
Two-level Model
Which model allows many user-level threads to be mapped to many kernel threads?
One-to-One
Many-to-One
Many-to-Many
Two-level Model
What is the primary purpose of thread libraries?
To manage operating system memory
To provide APIs for creating and managing threads
To handle I/O devices
To compile programs
Which threading model is considered more flexible for multithreaded programming?
One-to-One
Many-to-One
Many-to-Many
Single-threaded
What is the primary function of a thread pool?
To execute processes sequentially
To pre-create threads and wait for tasks
To limit thread execution time
To handle interposes communication
What is thread-local storage (TLS) used for?
To store data shared by all threads
To store data unique to each thread
To manage process scheduling
To cancel threads
What is process synchronization?
A technique to manage memory
A method to manage the execution order of processes
A method to protect critical sections in concurrent processes
A way to allocate resources
What is the critical section problem?
Ensuring mutual exclusion when accessing shared data
Managing memory allocation
Handling I/O operations
Providing process scheduling
What is a race condition?
A condition where processes run at maximum speed
A situation where multiple processes try to modify shared data at the same time
A process that waits indefinitely for resources
A condition where a process completes its execution first
What does mutual exclusion ensure in process synchronization?
What does mutual exclusion ensure in process synchronization?
Multiple processes can enter the critical section at the same time
Only one process is allowed in the critical section at a time
All processes execute simultaneously
Processes wait indefinitely to access resources
What is a semaphore?
A tool that prevents process execution
A synchronization tool that controls access to shared resources
A memory allocation technique
A scheduling algorithm
What is the bounded-buffer problem?
A memory allocation problem
A synchronization problem where a buffer has a fixed size
A scheduling algorithm
A paging problem
Which variable is used in Peterson’s Solution to decide which process enters the critical section?
Buffer
Counter
Flag
Turn
What is a monitor in process synchronization?
A hardware tool for process management
A high-level abstraction that provides process synchronization
A memory allocation mechanism
A process scheduling algorithm
What is the primary goal of CPU scheduling?
To reduce the number of processes
To maximize CPU utilization
To allocate more memory
To handle I/O operations
What is the CPU–I/O Burst Cycle?
A cycle where processes only use the CPU
A cycle where processes alternate between CPU execution and I/O waiting
A cycle of only I/O operations
A single process executing continuously
What does the dispatcher do in CPU scheduling?
Terminates processes
Allocates memory to processes
Gives control of the CPU to the selected process
Allocates I/O devices
What is the goal of the First-Come, First-Served (FCFS) scheduling algorithm?
To reduce context switching
To run the process with the shortest burst time first
To execute processes in the order they arrive
To execute processes with the highest priority first
Which CPU scheduling algorithm minimizes average waiting time?
Round Robin
First-Come, First-Served
Shortest-Job-First (SJF)
Priority scheduling
What is a preemptive version of the Shortest-Job-First algorithm called?
Shortest-remaining-time-first
Round Robin
Priority scheduling
First-Come, First-Served
What is the main disadvantage of the Priority Scheduling algorithm?
Processes are executed in random order
It causes high CPU utilization
Low-priority processes may never execute (starvation)
It has no solution for deadlock
What is the purpose of aging in Priority Scheduling?
To prevent low-priority processes from starvation
To increase the priority of CPU-bound processes
To reduce context switching
To terminate waiting processes
Which scheduling algorithm assigns the highest priority to the process with the earliest deadline?
First-Come, First-Served
Earliest Deadline First (EDF)
Priority Scheduling
Round Robin
What is processor affinity?
The preference of a process to run on a particular processor
The process of scheduling based on time
The process of allocating memory to processors
The division of the CPU into multiple cores
Which POSIX scheduling class uses a First-Come, First-Served strategy?
SCHED_RR
SCHED_FIFO
SCHED_OTHER
SCHED_PRIORITY
The main function of an operating system is to manage hardware and software resources.
صح يالأمير
خطأ يالأمير
A byte is the smallest unit of computer storage.
True
False
Solid-state drives (SSDs) are generally slower than hard disks.
True
False
An interrupt-driven operating system responds to both hardware and software interrupts.
True
False
Virtual memory allows processes to execute even if they are not completely loaded into RAM.
True
False
A user interface is necessary for all types of operating systems.
True
False
System calls are always written in assembly language.
True
False
The operating system must detect and handle errors during program execution.
True
False
CLI is more user-friendly than GUI.
True
False
System programs do not interact with the operating system kernel.
True
False
A process is considered a passive entity.
True
False
The program counter is part of the process control block.
True
False
A terminated process can be restarted without reloading it into memory.
True
False
Context switching is considered an overhead because it does no useful work.
True
False
The long-term scheduler selects processes that are ready to execute immediately.
True
False
Multithreaded programs can improve the responsiveness of applications.
True
False
Threads always run in isolation and do not share resources.
True
False
Thread creation is more expensive than process creation.
True
False
In a One-to-One threading model, every user thread is mapped to a kernel thread.
True
الاجابه ترو
Thread pools help limit the number of active threads in an application.
True
False
The critical section is a part of the code where shared data is accessed.
True
False
The bounded-buffer problem only occurs when the buffer is empty.
True
False
Deadlock occurs when processes are waiting indefinitely for resources held by each other.
True
False
A binary semaphore can take any integer value.
True
False
Mutual exclusion guarantees that multiple processes can enter the critical section at the same time.
True
False
CPU utilization refers to how effectively the CPU is kept busy.
True
False
First-Come, First-Served (FCFS) is a preemptive scheduling algorithm.
True
False
In Round Robin scheduling, each process gets an equal share of the CPU in a circular order.
True
False
Shortest-Job-First (SJF) always gives the longest average waiting time.
True
False
Priority scheduling can result in starvation of low-priority processes.
True
False
Preemptive scheduling allows the CPU to switch between processes at any time.
True
False
The Round Robin algorithm is ideal for time-sharing systems.
True
False
Processor affinity means that a process is free to run on any available processor.
True
False
