Midterm Review Flashcards
What is the primary goal of an operating system?
a) To manage hardware resources
b) To run applications
c) To provide a user interface
d) All of the above
d) All of the above
An operating system’s main goal is to manage hardware resources, run applications, and provide a user interface. It coordinates everything.
What is the kernel in the operating system?
a) The central processing unit (CPU)
b) The core component responsible for managing resources
c) The graphical user interface (GUI)
d) The compiler
b) The core component responsible for managing resources
The kernel is like the brain of the operating system, handling tasks like managing memory, CPU usage, and input/output.
What is one restriction of a 32-bit kernel?
a) The maximum size of an individual process
b) The number of threads that can execute at once
c) The size of the cache.
d) The link to the DMA controller
a) The maximum size of an individual process
A 32-bit kernel can limit how big a single program can be, restricting its memory usage.
What is multiprogramming in operating systems?
a) Running multiple programs simultaneously
b) Running a single program on multiple computers
c) Running multiple instances of the same program
d) Running programs with multiple threads
a) Running multiple programs simultaneously
Multiprogramming means the OS can handle many tasks at once, like switching between different apps quickly.
What is a process in an operating system?
a) A program in execution
b) A file stored on the hard disk
c) An input/output device
d) A type of memory
a) A program in execution
A process is like a running program, including all the stuff it needs to work properly.
What is the difference between a process and a thread?
a) A process can share memory
b) A thread can share memory
c) A process can run multiple threads
d) A thread can run multiple processes
b) A thread can share memory
Threads are like mini-programs inside a bigger program, and they can share information easily.
What is parallelism in operating systems?
a) The ability to execute multiple instructions simultaneously
b) The ability to switch between processes quickly
c) The ability to run multiple processes simultaneously on multiple processors
d) The ability to allocate memory resources efficiently
c) The ability to run multiple processes simultaneously on multiple processors
Parallelism lets the OS spread out tasks across multiple parts of the computer to get things done faster.
What is concurrency?
a) The ability of a system to handle requests sequentially
b) The ability of an operating system to handle multiple tasks simultaneously
c) The capability of an operating system to update itself
d)The process by which user rights are managed
b) The ability of an operating system to handle multiple tasks simultaneously
Concurrency involved managing multiple tasks simultaneously to ensure that nothing is overlooked or left behind.
When processes communicate with one another, this is often done through the use of
______________
a) Shared memory
b) Semaphores
c) Morse code
d) Shared files
a) Shared memory
Because it allows them to directly exchange data fast and efficient.
What is a critical section in concurrent programming?
a) A section of code that must be executed atomically
b) A section of code that can be executed by multiple threads simultaneously
c) A section of code that is not important for program execution
d) A section of code that is executed only once
a) A section of code that must be executed atomically
A critical section is like a ‘do not disturb’ sign for code, ensuring it runs smoothly without interruptions.
What is synchronization in operating systems?
a) The process of coordinating the execution of multiple processes or threads
b) The process of transferring data between processes
c) The process of allocating memory to processes
d) The process of allocating CPU time to processes
a) The process of coordinating the execution of multiple processes or threads
Synchronization is about making sure that everyone is on the same page, so tasks don’t trip over each other.
What is a semaphore in operating systems?
a) A flag used to indicate the status of a process
b) A variable used to control access to a shared resource
c) A data structure used to store process information
d) A type of scheduling algorithm
b) A variable used to control access to a shared resource
Semaphore is used to control when different processes can use shared resources.
What is a mutex in operating systems?
a) A tool used for inter-process communication
b) A tool used to prevent deadlocks
c) A tool used to synchronize access to a shared resource
d) A tool used to allocate memory to processes
c) A tool used to synchronize access to a shared resource
A mutex is used to synchronize access in order to prevent chaos.
What is the difference between a semaphore and a mutex?
a) Semaphores can be used for mutual exclusion, while mutexes cannot
b) Mutexes can be used for mutual exclusion, while semaphores cannot
c) Mutexes can be used to control access to multiple resources, while semaphores cannot
d) Semaphores can be used to control access to multiple resources, while mutexes cannot
b) Mutexes can be used for mutual exclusion, while semaphores cannot
Mutexes are specialists in keeping things exclusive, while semaphores are more versatile, handling a range of coordination tasks
What is concurrency in operating systems?
a) The ability to run multiple processes simultaneously
b) The ability to run multiple threads simultaneously
c) The ability to execute multiple instructions in parallel
d) The ability to switch between processes quickly
b) The ability to run multiple threads simultaneously
Concurrency means that OS can handle different tasks at the same time.