Final Exam Portion Flashcards

1
Q

What is an Operating System (OS) ?

A

A program that acts as an intermediary between the user of a computer and the computer hardware.

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

One of the names of the OS is “Manager”. (True or False)

A

True.

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

What the Operating System (OS) goals?

A

1- Execute user programs & make solving user problems easier.
2- Make the computer system convenient to use.
3- Use the computer hardware in an efficient manner.

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

What are the 4 components of the computer system?

A

1- Hardware (CPU, memory, Inputs/Outputs..).
2- Operating System.
3- Application programs (web browsers, video games..).
4- Users.

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

Give examples of users that make up 1 of the computer system components :-

A

1- People.
2- Machines.
3- Other computers.

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

What Operating systems do?

A

1- Ease of use.
2- Good performance.
3- Make users for big computers (mainframe or minicomputer) happy.

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

One of the names of the OS is “Resource allocator”. (True or False)

A

True.

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

Why is the Operating System called “resource allocator”?

A

1- Manages all resources.
2- Decides between conflicting requests for fair resource use.

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

One of the names of the OS is “Control program”. (True or False)

A

True.

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

Why is the Operating System called “Control program”?

A

Controls execution of programs to prevent errors and improper use of the computer.

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

What is kernel?

A

Part of the OS, the one program running at all times on the computer.

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

Aside from Kernel what is everything else is considered as?

A

1- A system program.
2- An application program.

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

What is a bootstrap program?

A

its loaded at power-up or reboot

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

What are the details of the bootstrap program?

A

1- Typically stored in ROM or EPROM, generally known as “firmware”
2- Initializes all aspects of system
3- Loads operating system kernel and starts execution

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

What are the resources of the Operating System (OS) ?

A

1- CPU.
2- Memory.
3- Input devices.
4- Output devices.
5- Secondary storage.

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

What are examples of Input devices ?

A

1- Mouse.
2- Keyboard.

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

What are examples of Output devices ?

A

1- Monitor.
2- Printer.

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

What are examples of Secondary storage?

A

Disks

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

What is a hardware interrupt?

A

Communication between CPU & hardware devices.

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

What is a trap or exception?

A

A software interrupt.

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

What causes software interrupt?

A

Its caused by either an “Error” or “User request”.

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

One of the names of the OS is “Interrupt Driven”. (True or False)

A

True.

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

What is Main Memory and its main details?

A

Large storage media that the CPU can access directly.
- Main details :-
1- Random access.
2- volatile.

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

What is Secondary storage and its main details?

A

Extension of main memory that provides large “nonvolatile” storage capacity.
- Main details :-
1- nonvolatile.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the "criteria" to organize storage systems in hierarchy?
1- Cost. 2- Speed. 3- Volatility.
26
What is Caching?
copying information into faster storage system; main memory can be viewed as a cache for secondary storage.
27
One of the names of the OS is "Device Driver". (True or False)
True.
28
What if "Cache" is checked to determine if it has information?
1- if it has information, Information is used directly from the Cache. 2- if it doesn't have information, Data copied to cache and used there.
29
What is "Multiprocessors Systems" also known as?
1- parallel systems. 2- tightly-coupled systems.
30
What are the advantages of the "Multiprocessors Systems" ?
1- Increased throughput. 2- Economy of scale. 3- Increased reliability.
31
What are the types of "Multiprocessing Systems"?
1- Asymmetric Multiprocessing (each processor is assigned a special task) 2- Symmetric Multiprocessing (each processor performs all tasks)
32
What is "Clustered Systems"?
Multiple systems working together sharing storage via a storage-area network.
33
What are the types of "Clustered Systems"?
1- Asymmetric clustering (has one machine in hot-standby mode) 2- Symmetric clustering (has multiple nodes running applications, monitoring each other)
34
What is the difference between "Multiprogramming" & "Timesharing" ?
1- Multiprogramming :- - batch system. - job scheduling. - For mainframes. 2- Timesharing :- - Multitasking. - Interactive. - For windows.
35
What is "Dual-mode" ?
An operation that allows OS to protect itself and other system components.
36
What are the modes in "Dual-mode" ?
1- User mode. 2- Kernel mode.
37
What does the "Mode bit" provides in Dual-mode?
1- to know which mode is running. 2- gives privilege to kernel mode. 3- it changes between the modes.
38
What is a process?
A program in execution.
39
A Program is a Passive entity. (True or False)
True.
40
A Process is a Active entity. (True or False)
True.
41
What are the resources of a Process?
1- CPU. 2- Memory. 3- Input. 4- Output. 5- Files. 6- Data.
42
What does Process termination require?
Reclaim of any reusable resources.
43
What are the OS activities for Process management?
1- Creating and deleting both user and system processes. 2- Suspending and resuming processes. 3- Providing mechanisms for process synchronization, communication and deadlock.
44
What are the OS activities for Memory management?
1- Keeping track of which parts of memory are currently being used and by whom. 2- Deciding which processes and data to move into and out of memory. 3- Allocating and deallocating memory space.
45
What are the OS activities for Storage management?
1- Creating and deleting files and directories. 2- Primitives to manipulate files and directories. 3- Mapping files onto secondary storage. 4- Backup.
46
What are the OS activities for Mass-Storage management?
1- Free-space management. 2- Storage allocation. 3- Disk scheduling.
47
What is the Typical size for Registers? its managed by? its backed by?
Typical size : < (Less than) 1 KB. Managed by : Compiler. Backed by : Cache.
48
What is the Typical size for Cache? its managed by? its backed by?
Typical size : < (Less than) 16 MB. Managed by : Hardware. Backed by : Main memory.
49
What is the Typical size for Main memory? its managed by? its backed by?
Typical size : < (Less than) 64 GB. Managed by : OS (Operating system). Backed by : Disk.
50
What is the Typical size for Solid state disk? its managed by? its backed by?
Typical size : < (Less than) 1 TB. Managed by : OS (Operating system). Backed by : Disk
51
What is the Typical size for Magnetic disk? its managed by? its backed by?
Typical size : < (Less than) 10 TB. Managed by : OS (Operating system). Backed by : Disk or Tape.
52
What is Protection?
Any mechanism for controlling access of processes or users to resources defined by the OS.
53
What is Security?
Defense of the system against internal and external attacks.
54
Give examples of Computing Environments (7 at least) :-
1- Traditional. 2- Mobile. 3- Distributed. 4- Client-Server. 5- Peer-to-Peer. 6- Virtualization. 7- Cloud Computing. 8- Real-Time Embedded System. 9- Open-Source OS.
55
What are Traditional Computing Environments ?
stand-alone general purpose machines.
56
What are Mobile Computing Environments ?
Handheld smartphones, tablets, etc.
57
What are Distributed Computing Environments ?
Systems networked together.
58
What are the TCP/IP network in Distributed ?
1- Local area network. 2- Wide are network. 3- Metropolitan area network. 4- Personal area network.
59
What is Peer-to-Peer Computing Environment?
Another model of Distributed system.
60
How does Peer-to-Peer not distinguish clients and servers?
1- All nodes are considered peers. 2- May each act as client, server or both. 3- Node must join P2P network.
61
What is Virtualization Computing Environment?
Allows operating systems to run applications within other OSes.
62
What is an example of Virtualization?
Apple laptop running MAC OS X host, Windows as guest.
63
What is Cloud Computing?
Delivers computing, storage, applications as a service across a network.
64
Example of Real-Time Embedded Systems?
Real-Time Operating System (OS) .
65
What is a Process?
A program in execution.
66
A Process execution must progress in what fashion?
A sequential fashion.
67
What is a Stack?
Containing temporary data, Functions parameter, return addresses & local variables.
68
What is a Heap?
Containing memory dynamically allocated during run time.
69
A Program is a passive entity. (True or False)
True.
70
A Process is a active entity. (True or False)
True.
71
When does a program become a process?
When an executable file is loaded into memory.
72
One program can be several processes. (True or False)
True.
73
What are the 5 process states?
1- New. 2- Running. 3- Waiting. 4- Ready. 5- Terminated.
74
What is the New process state?
The process is being created.
75
What is the Running process state?
Instructions are being executed.
76
What is the Waiting process state?
The process is waiting for some event to occur.
77
What is the Ready process state?
The process is waiting to be assigned to a processor.
78
What is the Terminated process state?
The process has finished execution.
79
What is Process Control Block?
Information for each process.
80
What is another name for Process Control Block?
Task Control Block.
81
What is a Process Scheduler?
selects among available processes for next execution on CPU.
82
What is a Short-Term Scheduler?
Also known as CPU Scheduler, selects which process should be executed next and allocates CPU.
83
What is a Long-Term scheduler?
Also known as Job scheduler, selects which processes should be brought into the ready queue.
84
What is a Medium-Term scheduler?
Can be added if degree of multiple programming needs to decrease.
85
What is Swapping?
Remove process from memory, store on disk, bring back in from disk to continue execution.
86
What are the IOS (IPhone) process?
1- Single foreground process for user interface. 2- Multiple background processes for memory and running.
87
What is the Android (Samsung) process?
Runs foreground and background, with fewer limits.
88
What are the Resource sharing options for Process Creation?
1- Parent and children share all resources. 2- Children share subset of parent’s resources. 3- Parent and child share no resources.
89
What are the Execution options for Process Creation?
1- Parent and children execute concurrently. 2- Parent waits until children terminate.
90
What is Process Termination?
Process executes last statement and then asks the operating system to delete it using the exit() system call.
91
What are the 3 processes for Google Chrome Browser?
1- Browser. 2- Renderer. 3- Plug-in.
92
What is "Independent process" ?
process cannot affect or be affected by the execution of another process.
93
What is "Cooperating process" ?
process can affect or be affected by the execution of another process.
94
What are the Reasons or Advantages of cooperation process?
1- Information sharing. 2- Speed-up. 3- Modularity. 4- Convenience.
95
What is needed for implementation of a physical communication link?
1- Shared memory. 2- Hardware bus. 3- Network.
96
What is needed for implementation of a logical communication link?
1- Direct or Indirect. 2- Synchronous or Asynchronous. 3- Automatic or explicit buffering.
97
What happens to the following in terms of "Direct Communication" ? Send (A, message) : _________________________. Receive (B, message) : _________________________.
Send (A, message) : send a message to process A. Receive (B, message) : receive a message from process B.
98
What are the properties of "Direct" communication links?
1- Links are established automatically. 2- A link is associated with exactly one pair of communicating processes. 3- Between each pair there exists exactly one link. 4- The link may be unidirectional, but is usually bi-directional.
99
What happens to the following in terms of "Indirect Communication" ? Send (C, message) : _________________________. Receive (C, message) : _________________________.
Send (C, message) : send a message to mailbox C. Receive (C, message) : receive a message from mailbox C.
100
What are the properties of "Indirect" communication links?
1- Link established only if processes share a common mailbox. 2- A link may be associated with many processes. 3- Each pair of processes may share several communication links. 4- Link may be unidirectional or bi-directional.
101
What is "Blocking" considered?
Its considered Synchronous.
102
What happens in "Blocking send"?
The sender is blocked until the message is received.
103
What happens in "Blocking receive"?
The receiver is blocked until a message is available.
104
What is "Non-blocking" considered?
Its considered Asynchronous.
105
What happens in "Non-blocking send"?
The sender sends the message and continue.
106
What happens in "Non-blocking receive"?
The receiver receives: - A valid message or Null message.
107
What are the communications in Client-Server Systems?
1- Sockets. 2- Remote Procedure Calls. 2- Pipes. 4- Remote Method Invocation (Java).
108
What is a "Socket"?
An endpoint for communication.
109
What are "Pipes"?
Acts as a channel allowing two processes to communicate.
110
When does CPU scheduling decisions take place?
1- Switching from running to waiting state. 2- Switching from running to ready state. 3- Switching from waiting to ready. 4- Terminates.
111
what is "Non-preemptive"?
The process from 1 to 4, the process cannot be interrupted has to run until the end.
112
What is "Preemptive"?
The process from 5 and up, in the ready queue.
113
What are the details of Preemptive?
1- Shared data. 2- Kernel mode. 3- Interrupts during crucial OS activities.
114
What is the "Dispatcher Module"?
Gives control of the CPU to the process selected by the short-term scheduler.
115
What does the Dispatcher Module involve?
1- Switching context. 2- Switching to user mode. 3- Jumping to the location in the user program to restart that program.
116
What is "Dispatch lantency"?
Time it takes for the dispatcher to stop one process and start another running.
117
What are the CPU scheduling criteria?
1- CPU utilization. 2- Throughput. 3- Turnaround time. 4- Waiting time. 5- Response time.
118
What is "CPU utilization"?
keep the CPU as busy as possible.
119
What is "Throughput"?
number (#) of processes that complete their execution per time unit.
120
What is "Turnaround time"?
amount of time to execute a particular process.
121
What is "Waiting time"?
amount of time a process has been waiting in the ready queue.
122
What are the CPU scheduling algorithm optimization criteria?
1- Max CPU utilization. 2- Max Throughput. 3- Min Turnaround time. 4- Min Waiting time. 5- Min Response time.
123
What is "Starvation" in CPU Priority Scheduling?
Low priority processes may never execute.
124
What is "Aging" in CPU Priority Scheduling?
As time progresses increase the priority of the process.
125
What are the difference of "foreground" & "background" of Multilevel Queue?
Foreground :- 1- Interactive. 2- Uses RR. (Round Robin) 3- Uses 80% of the system. Background :- 1- Batch. 2- Uses FCFS. (First- Come, First-Served) 3- Uses 20% of the system.
126
What is "Load balancing"?
Attempts to keep workload evenly distributed.
127
What is "Push migration"?
Periodic task checks load on each processor, and if found pushes task from overloaded CPU to other CPU's.
128
What is "Pull migration"?
Idle processors pulls waiting task from busy processor.
129
What is "Soft real-time systems"?
No guarantee as to when critical real-time process will be scheduled.
130
What is "Hard real-time systems"?
Task must be serviced by its deadline.
131
What is the "Critical section" problem?
1- Process may be changing common variables, updating table, writing file, etc. 2- When one process in critical section, no other may be in its critical section.
132
What are the solutions to Critical-Section problem?
1- Mutual Exclusion. 2- Progress. 3- Bounded Waiting.
133
What is "Mutual Exclusion" ?
If process Pi is executing in its critical section, then no other processes can be executing in their critical sections.
134
What is "Progress" ?
If no process is executing in its critical section and there exist some processes that wish to enter then cannot be postponed indefinitely.
135
What is the difference between Preemptive & Non-preemptive kernel in Critical-Section Handling in OS?
1- Preemptive : allows preemption of process when running in kernel mode. 2- Non-preemptive : runs until exits kernel mode, blocks, or voluntarily yields CPU.
136
Is there Critical-Section in Hardware? and why?
No, because of using locking.
137
What is the difference between "Uniprocessors" & "Modern machines" ?
Uniprocessors : could disable interrupts. Modern machines : Atomic = non-interruptible.
138
What is "Semaphore"?
Synchronization tool that provides more sophisticated ways (than Mutex locks) for process to synchronize their activities.
139
What is "Starvation" in Process Synchronization?
A process may never be removed from the semaphore queue in which it is suspended.
140
What is "Priority Inversion"?
Scheduling problem when lower-priority process holds a lock needed by higher-priority process.
141
What are the Classical Problems of Synchronization?
1- Bounded-Buffer Problem. 2- Readers and Writers Problem. 3- Dining-Philosophers Problem.
142
What is the Readers and Writers Problem?
Allow multiple readers to read at the same time.
143
What is the Solution to the Readers and Writers Problem?
Using Priorities.
144
How does a process utilizes a resource?
1- Request. 2- Use. 3- Release.
145
What are the Deadlock Characterization?
1- Mutual exclusion. 2- Hold and wait. 3- No preemption. 4- Circular wait.
146
What is the "Mutual exclusion" from Deadlock Characterization?
Only one process at a time can use a resource.
147
What is the "Hold and wait" from Deadlock Characterization?
A process holding at least one resource is waiting to acquire additional resources held by other processes.
148
What is the "No preemption" from Deadlock Characterization?
A resource can be released only voluntarily by the process holding it, after that process has completed its task.
149
What happens if Resource allocator graph contains no cycles?
No deadlock.
150
What happens if Resource allocator graph contains a cycle?
1- If only one instance per resource type, then deadlock. 2- If several instances per resource type, possibility of deadlock.
151
What is the "Mutual Exclusion" from the deadlock prevention?
Not required for sharable resources (read-only files).
152
What is the "Hold and wait" from the deadlock prevention?
Must guarantee that whenever a process requests a resource, it does not hold any other resources.
153
What is the "No preemption" from the deadlock prevention?
If a process that is holding some resources requests another resource that cannot be immediately allocated.
154
What is the "Circular wait" from the deadlock prevention?
Impose a total ordering of all resource types.
155
What happens if a system is in a safe state?
No deadlock.
156
What happens if a system is in a unsafe state?
Possibility of deadlock.
157
What is "Avoidance"?
Ensure that a system will never enter an unsafe state.
158
What are the points for Recovery from Deadlock?
1- Process Termination. 2- Resource preemption.
159
What is the "Process Termination" in Recovery from Deadlock?
1- Abort all deadlocked processes. 2- Abort one process at a time until the deadlock cycle is eliminated.
160
In which order should we choose to abort? (Mention at least 5)
1- Priority of the process. 2- How long process has computed, and how much longer to completion. 3- Resources the process has used. 4- Resources process needs to complete. 5- How many processes will need to be terminated. 6- Is process interactive or batch?.
161
What is the "Selecting a victim" from Resource Preemption?
Minimize cost.
162
What is the "Rollback" from Resource Preemption?
Return to some safe state, restart process for that state.
163
What is the "Starvation" from Resource Preemption?
Same process may always be picked as victim.