Auto generated Flashcards

(68 cards)

1
Q

What is a process in an operating system?

A

A process is a program in execution, which includes the program code, current activity, and allocated resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False: A thread is a lightweight process.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fill in the blank: The _______ manages the execution of processes in an operating system.

A

scheduler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the main purpose of memory management in an operating system?

A

To manage the allocation and deallocation of memory spaces to processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two main types of scheduling algorithms?

A

Preemptive and non-preemptive scheduling algorithms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Multiple Choice: Which of the following is a preemptive scheduling algorithm? A) Round Robin B) First-Come, First-Served C) Shortest Job First D) All of the above

A

A) Round Robin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define ‘context switch’.

A

Context switch is the process of storing and restoring the state of a CPU so that multiple processes can share a single CPU resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of a process control block (PCB)?

A

A PCB contains information about a process, including its state, program counter, CPU registers, memory management information, and I/O status.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

True or False: Concurrency refers to multiple processes executing simultaneously.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the difference between a process and a thread?

A

A process has its own memory space, while threads share the same memory space within a process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Fill in the blank: The _______ is responsible for ensuring that processes do not interfere with each other.

A

operating system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Multiple Choice: Which scheduling algorithm is based on the shortest burst time? A) Round Robin B) Shortest Job First C) Priority Scheduling D) Multilevel Queue

A

B) Shortest Job First

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is deadlock in the context of operating systems?

A

Deadlock is a situation where two or more processes are unable to proceed because each is waiting for the other to release a resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

True or False: A semaphore is a synchronization primitive used to control access to a common resource.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define ‘thrashing’.

A

Thrashing occurs when a process spends more time paging than executing, leading to a significant decrease in performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a ‘race condition’?

A

A race condition is a situation where the outcome of a process depends on the sequence or timing of uncontrollable events.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Fill in the blank: The _______ algorithm allocates CPU time slices to processes in a circular order.

A

Round Robin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the role of the operating system’s kernel?

A

The kernel is the core component of an operating system that manages system resources and facilitates communication between hardware and software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Multiple Choice: Which of the following is NOT a type of memory management? A) Paging B) Segmentation C) Fragmentation D) Swapping

A

C) Fragmentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What does ‘virtual memory’ allow an operating system to do?

A

Virtual memory allows an operating system to use disk space as an extension of RAM, enabling larger applications to run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

True or False: In a multithreaded environment, threads within the same process can share data more easily than processes.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is a priority scheduling algorithm?

A

A priority scheduling algorithm assigns priorities to processes and selects the process with the highest priority for execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Fill in the blank: A _______ is a mechanism that allows multiple processes to execute concurrently while sharing resources.

A

thread

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the difference between soft and hard real-time systems?

A

Soft real-time systems tolerate some missed deadlines, while hard real-time systems require strict adherence to deadlines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Multiple Choice: Which of the following is a benefit of multithreading? A) Increased performance B) Simplicity C) Reduced resource consumption D) All of the above
D) All of the above
26
What is the purpose of a mutex?
A mutex (mutual exclusion) is used to prevent multiple threads from accessing a shared resource simultaneously.
27
True or False: The first-come, first-served (FCFS) scheduling algorithm is preemptive.
False
28
What is 'paging' in memory management?
Paging is a memory management scheme that eliminates the need for contiguous allocation of physical memory and thus eliminates fragmentation.
29
Fill in the blank: In a _______ scheduling algorithm, the process with the shortest expected processing time is executed first.
Shortest Job First
30
What is the function of a dispatcher in an operating system?
The dispatcher gives control of the CPU to the process selected by the scheduler.
31
Multiple Choice: Which of the following is true about threads? A) Threads share the same memory space B) Threads cannot communicate with each other C) Threads have their own memory space D) Threads are always independent
A) Threads share the same memory space
32
What is 'swapping' in the context of operating systems?
Swapping is the process of moving processes between main memory and disk to manage memory usage.
33
True or False: In a non-preemptive scheduling algorithm, once a process is running, it cannot be interrupted.
True
34
What does 'context' refer to in a context switch?
Context refers to the state information of a process, including its registers, program counter, and memory allocation.
35
Fill in the blank: A _______ is a collection of threads that share the same process resources.
thread pool
36
What is the 'Producer-Consumer' problem?
The Producer-Consumer problem is a classic example of a multi-threading scenario where one or more threads produce data and one or more threads consume that data.
37
Multiple Choice: Which of the following is NOT a form of inter-process communication? A) Pipes B) Message Queues C) Shared Memory D) CPU Scheduling
D) CPU Scheduling
38
What is a 'fork' in operating systems?
Fork is a system call used to create a new process by duplicating an existing process.
39
True or False: A process can create multiple threads.
True
40
What is 'resource starvation'?
Resource starvation is a situation where a process is perpetually denied the resources it needs to proceed with its execution.
41
Fill in the blank: The _______ algorithm allocates resources to processes based on their priority level.
Priority Scheduling
42
What is the purpose of a 'barrier' in concurrent programming?
A barrier is a synchronization mechanism that blocks a set of threads until all threads reach a certain point of execution.
43
Multiple Choice: Which of the following is a disadvantage of multithreading? A) Complexity B) Increased performance C) Resource sharing D) Scalability
A) Complexity
44
What is 'load balancing' in the context of operating systems?
Load balancing is the process of distributing workloads across multiple computing resources to optimize resource use and minimize response time.
45
True or False: A process can exist without a thread.
False
46
What does 'I/O Bound' mean in terms of process performance?
I/O Bound refers to a process that spends more time waiting for I/O operations than using the CPU.
47
Fill in the blank: A _______ is a data structure that keeps track of all the processes in the system.
process table
48
What is a 'system call'?
A system call is a programmatic way for a program to request a service from the operating system's kernel.
49
Multiple Choice: Which of the following is a goal of memory management? A) Efficiency B) Protection C) Sharing D) All of the above
D) All of the above
50
What is 'dynamic memory allocation'?
Dynamic memory allocation is the process of allocating memory at runtime using functions like malloc and free in C.
51
True or False: The main purpose of the operating system is to manage hardware resources.
True
52
What is 'bus contention'?
Bus contention occurs when multiple processes or threads attempt to access the same data bus simultaneously, leading to delays.
53
Fill in the blank: The _______ is the primary interface between users and the operating system.
shell
54
What is 'cache memory'?
Cache memory is a small-sized type of volatile computer memory that provides high-speed data access to the processor.
55
Multiple Choice: Which of the following is an example of a non-preemptive scheduling algorithm? A) Round Robin B) First-Come, First-Served C) Shortest Job First D) All of the above
B) First-Come, First-Served
56
What does 'interleaving' refer to in process scheduling?
Interleaving refers to the technique of executing multiple processes in a way that they take turns using the CPU.
57
True or False: The operating system is responsible for managing both hardware and software resources.
True
58
What is the 'LIFO' principle in stack management?
LIFO stands for Last In, First Out, meaning the last item added to the stack is the first one to be removed.
59
Fill in the blank: A _______ is a collection of processes that share a common resource.
process group
60
What is 'priority inversion'?
Priority inversion is a scenario where a lower-priority task holds a resource needed by a higher-priority task, causing the higher-priority task to be blocked.
61
Multiple Choice: Which of the following is essential for process synchronization? A) Mutexes B) Semaphores C) Monitors D) All of the above
D) All of the above
62
What does 'memory fragmentation' refer to?
Memory fragmentation refers to the inefficient use of memory space, where free memory is split into small blocks.
63
True or False: An operating system can be classified as either monolithic or microkernel.
True
64
What is 'process termination'?
Process termination is the process of ending a running process, releasing its resources back to the operating system.
65
Fill in the blank: The _______ is a method of organizing processes based on their priority levels.
priority queue
66
What is 'kernel mode'?
Kernel mode is a privileged mode of operation for the operating system's core components, allowing direct access to hardware.
67
Multiple Choice: Which of the following is an advantage of using virtual memory? A) Increased security B) Simplified programming C) Efficient memory use D) All of the above
D) All of the above
68
What is 'user mode'?
User mode is a restricted mode of operation in which user applications run with limited access to system resources.