Online Big Flashcards

(205 cards)

1
Q

Which one is data register?

A

AC

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

A control/status register that contains the address of the next instruction to be fetched is called the:

A

Program Counter (PC)

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

A fetched instruction is normally loaded into the:

A

Instruction Register (IR)

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

By what method of dealing with multiple interrupts, interrupts are handled in strict sequential order?

A

Disable interrupts while an interrupt is being processed

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

As one proceeds down the memory hierarchy (i.e. from inboard memory to offline storage), the following condition(s) apply:

A

increasing access time

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

The _____ routine determines the nature of the interrupt and performs whatever actions are needed.

A

interrupt handler

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

The _____ chooses which block to replace when a new block is to be loaded into the cache and the cache already has all slots filled with other blocks.

A

memory controller

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

_____ refers to the tendency of execution to involve a number of memory locations that are clustered in physical memory, therefore the performance can be improved by cache

A

spatial locality

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

What is the problem of I/O process without interrupt, compared to the one with interrupt?

A

Waste CPU Cycles on periodically check the status of I/O devices

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

Interrupt-driven I/O, although more efficient than simple Programmed I/O, still requires the use of the _____ to transfer data between memory and an I/O module

A

CPU

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

In multiprocessor environments, two copies of the same data may reside in the local cache of each CPU. Whenever one CPU alters the data, the cache of the other CPU must receive an updated version of this data. This is called Cache _____

A

coherency

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

_____ was an early innovation that helped decrease the amount time the computer wasted between jobs.

A

Batch processing

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

The _____ defines the system call interface to the operating system

A

Application binary interface (API)

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

The _____ is the interface that is the boundary between hardware and software.

A

ISA

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

In a SMP system, “availability” is improved because

A

The failure of a single processor does not halt the system

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

A major problem with early serial processing systems was

A

Setup time

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

What is the name of Operating System for the early Serial Processing computer systems?

A

There is none (not Monitor, JCL, Main Frame)

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

The principle objective for a time sharing system is to:

A

Reduce response time

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

In a “Simple Batch System”, _____ is used to prevent a single job from monopolizing the system, if it expires, the user program is stopped, and control returns to the monitor.

A

Timer

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

Mean time to repair (MTTR) can be seen as average _____.

A

downtime

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

What statement about microkernel is NOT true?

A

It is a implemented as a single process, with all elements sharing the same address space

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

Early operating systems that were designed with little concern about structure are typically referred to as:

A

Monolithic Operating Systems

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

The operating system provides many types of services to end-users, programmers and system designers, including:

A

Error detection and response

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

In time sharing systems, the technique where a system clock generates interrupts, and at each clock interrupt the OS regains control and assigns the processor to another user, is _____

A

time slicing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
An example of a hardware feature that is desirable in a batch-processing system is:
privileged instructions
26
Which statement about multiprogramming is wrong?
Multiprogramming means several jobs can be on a single processor at a point of time.
27
_____ provide(s) an interface to the services provided by an operating system.
System calls
28
The two basic types of processor registers are:
User-visible and control/status registers
29
Small, fast memory located between the processor and main memory is called:
Cache memory
30
The _____ routine determines the nature of the interrupt and performs whatever actions are needed.
Interrupt handler
31
_____ refers to the tendency for a processor to access memory locations that have been used recently, therefore the performance can be improved by cache. For Example, when an iteration loop is executed, the processor executes the same set of instructions repeatedly.
Temporal Locality
32
_____ is more efficient than interrupt-driven or programmed I/O for a multiple-word I/O transfer.
Direct memory access
33
What component is considered to be the cache of hard disk?
real memory
34
The four main structural elements of a computer system are:
Processor, Main Memory, I/O Modules, System Bus
35
Multitasking in a computer with only one CPU is accomplished by a technique called
multiprogramming
36
Mean time to failure (MTTF) can be seen as average _____.
uptime
37
Apple's Mac OS X is based on
FreeBSD UNIX
38
To allow for programs to access and execute operating system instructions, operating systems provide _____.
system calls
39
Linux kernel is classified as
monolithic kernel
40
A microkernel is a kernel _____.
that is stripped of all nonessential components
41
Key to the success of Linux has been it's character as a free software package available under the auspices of the:
Free Software Foundation
42
Most UNIX systems are _____, in that they include virtually all of the O/S functionality in a single large block of code that runs in a single process with a single address space.
monolithic
43
_____ assigns a processor to the first process in the ready queue.
Dispatching
44
A(n) _____ is a set of instructions to be executed in response to a certain type of interrupt.
interrupt handler
45
An operating system must be designed such that _____.
context switches are transparent to processes
46
What operation is particularly useful for detecting security threats and debugging software?
suspend
47
How many processes truly execute concurrently in a system at any time?
at most as many as there are processors
48
A process may transition to the Ready state by which of the following actions?
all of the above (completion of an IO event, newly-admitted process, selected by the dispatcher)
49
A process control block ____.
includes information on the process's states
50
The _____ refers to the number of processes in memory.
Degree of multiprogramming
51
The _____ of a process contains temporary data such as function parameters, return addresses, and local variables.
stack
52
The list of processes waiting for a particular I/O device is called a(n) _____.
event queue
53
The operating system acts as an interface between the computer hardware and the human user.
TRUE
54
A fetched instruction is normally loaded into the Instruction Register (IR)
TRUE
55
User-visible registers are typically accessible to system programs but are not typically available to application programs.
FALSE
56
One of the processor's main functions is to exchange data with memory.
TRUE
57
An interrupt is a mechanism used by system modules to signal the processor that normal processing should be temporarily suspended.
TRUE
58
One of the driving forces in operating system evolution is advancement in the underlying hardware technology
TRUE
59
An operating system controls the execution of applications and acts as an interface between applications and the computer hardware.
TRUE
60
Time-Sharing Systems is designed to maximize response time
FALSE
61
RAID Disks are classified as what kind of fault tolerance method?
Information redundancy
62
The text segment of a process address space contains:
the executable code associated with the process
63
For a single processor system, _____ (choose the best answer)
there will never bw more than one running process
64
Which of the following states is not a discrete process state?
unblocked state
65
In the Five-State Process model, the following represents a valid state transition:
Running -> Blocked
66
The scheduling strategy where each process in the queue is given a certain amount of time, in turn, to execute and then returned to the queue, unless blocked is referred to as:
Round-Robin
67
The Process Image element that contains the collection of attributes needed by the O/S to control a particular process is called the:
Process Control Block
68
When one process spawns another, the spawned process is referred to as the _____.
child process
69
The portion of the operating system that selects the next process to run is called the _____.
dispatcher
70
The state transition from READY to RUNNING happens when a process _____
is dispatched by the scheduler
71
the concept of a process in an operating system embodies two primary characteristics, one of which is:
Resource Ownership
72
In a Linux system, when a new process is cloned, two processes share the same
Virtual Memory
73
*In Linux, the state of a task will be ____, if it is blocked, waiting directly on hardware conditions and not handle any signals.
Uninterruptible
74
Threads in user space can be more appropriate than kernel thread because ____.
All of the above (Application developers can tune the threading library's scheduling algorithm to meet the needs of specific application, user-level thread do not require the operating system to support threads, user-level threads do not invoke the kernel for synchronization, which can reduce overhead)
75
Which of the following statements about kernel-level threads is false?
Software that employs kernel-level threads often is more portable than software that employs user-level threads
76
Which type of components Android Applications corresponds to a single screen as a UI?
Activities
77
Which of the following placement algorithms is considered to be the best and fastest?
First
78
____ temporarily removes a process from main memory to allow another process to make use of the system's resources.
Swapping
79
____ strategies determine which pieces of data to remove from main memory to free space for a new process.
Replacement
80
Which of the following statements is false?
Real memory management is unimportant in today's systems.
81
The chunks of a process are known as ____.
pages
82
Available chunks of memory are known as ____.
frames
83
A ____ is a particular example of logical address in which the address is expressed as a location relative to some other point, usually a value in a processor register.
Relative Address
84
the practice in which a program and data are organized in such a way that various modules can be assigned the same region of memory is called overlaying.
TRUE
85
Segmentation has a number of advantages to the programmer over a non-segmented address space, including:
All of the Above (sharing among processes, protection, simplifying the handling of growing data structures)
86
____ is the virtual storage assigned to a process.
Virtual Address Space
87
A ____ is issued if a desired page is not in main memory
page fault
88
The ____ determines when a page should be brought into main memory
fetch memory
89
Which of the following statements about virtual memory is NOT true?
all pages of a process reside in main memory simultaneously
90
What statement is correct about the difference between a program and a process
program is passive
91
Which one describes multiprogramming most correctly
it could happen that no program actually complete for a period of time
92
Among the mechanisms for interrupting the execution of a process, what is used for the reactions to an asynchronous external event
interrupt
93
The queues of processes are implemented as
linked lists
94
For the 7 state process model of Figure 3.9b in the textbook, what is the state of a process has is not waiting for an I/O event to occur and is not in memory
ready/suspend
95
During dispatcher saves the state of the currently running process and restores the state of the next process to run
context switch
96
For the process model with 7 different states, the state of process with PID 121 is currently blocked/suspend. Before the I/O event occurs, some processes are completed, and dispatcher loads the PID 121 process into memory, what will be its new state
Blocked
97
What could be the next state of a running? A:exit b:ready c:blocked d:new e:blocked/suspend
A,B,C, only
98
which of the following is not a role of a typical operating system
assist the computer user in the task of processing digital photographs
99
The portion of the Process Control Block that consists of the contents of the processor registers is called the Process Control Information
FALSE
100
In a simple batch system is used to prevent a single job from monopolizing the system. If it expires, the user program is stopped, and the control returns to the monitor
Timer
101
Hardware features desirable in a batch processing operating system include memory protection, timer, privileged instructions, and
interrupts
102
The operating systems refers to its inherent flexibility in permitting functional modifications to the system without interfering with service
ability to evolve
103
In a SMP system, availability is improved because
the failure of a single processor does not halt the system
104
Which statement about cache memory is not true
cache memory is managed by the OS so the LRU replacement policy can be implemented
105
Interrupt-driven I/O is more efficient that simple programmed I/O, and it requires the use of the to transfer data between memory and I/O module
CPU
106
In traditional UNIX systems, how a new process is created
kernel issues a system call fork()
107
Which of the following statements the simple batch systems is true
-operator batches the jobs together sequentially
108
-each program is constructed to branch back to the monitor when it completes processing 
-the user no longer has direct access to the processor
109
Mean time to repair (MTTR) can be seen as average
downtime
110
Which of the following techniques can be incorporated into OS software to support fault tolerance
process isolation
111
virtual machines seem to be the best solution to solved problems such as
legacy applications
112
-interrupt processing
-device drivers
113
an example of a hardware feature that is desirable in a batch processing system is
privileged instructions
114
handled in strict sequential order, all interrupts are stopped while an interrupt is processed. In this case, after the interrupt-handler routine completes, interrupts are reenabled before resuming the user program.
TRUE
115
When a processor needs to access memory, it will stop DMA by sending an interrupt signal.
FALSE
116
The two basic steps used by the processor in instruction processing are
Fetch and Execute cycles
117
As one proceeds down the memory hierarchy the following condition(s) apply
Increasing access time
118
The _____________ holds the address of the next instruction to be fetched
Program Counter (PC)
119
The ___________ chooses which block to replace when a new block is to be loaded into the cache and the cache already has all slots filled with other blocks.
replacement algorithm
120
The L2 Cache of Intel Core i7 processor is
On the processor chip, one L2 cache dedicated to core
121
In multiprocessor environments, two copies of the same data may reside in the local cache of each CPU. Whenever one CPU alters the data, the cache of the other CPU must receive an updated version of this data. This is called Cache ___________
Coherency
122
Which of the following memory (storage) component is most frequently used as an approach to save data off-site (not in the data center)?
Magnetic tapes
123
A computer has a cache, main-memory, and disk used for virtual memory. If a referenced word is in the cache, 20 ns are required to access it. if it is in main memory but not in the cache, 60 ns are needed to load it into cache. When the data needed is not needed in cache but in memory, what is the total access time?
80 ns
124
In a Simple Batch System, ______________ is used to prevent a single job from monopolizing the system. If it expires, the user program is stopped and control returns to the monitor.
Timer
125
In an SMP system, "availability" is improved because
The failure of a single processor does not halt the system
126
The operating system's ____________ refers to its inherent flexibility in permitting functional modifications to the system without interfering with service.
ability to evolve
127
The operating system provides many types of services to end-users, programmers, and system designers, including
Error detection and response
128
Hardware features desirable in a batch-processing operating system include memory protection, timer, privileged instructions, and _________
interrupts
129
Which statement about multiprogramming is wrong?
Multiprogramming means several jobs can be on a single processor at a point of time.
130
What is the purpose of system call?
Invoke a function provided by the operating system, transfer to a system program that runs in kernel mode.
131
The two basic types of processor registers are
User-visible and Control/Status registers
132
A control/status register that contains the address of the next instruction to be fetched is called the:
Program Counter (PC)
133
Interrupt driven I/O, although more efficient than simple Programmed I/O, still requires the use of the ____________ to transfer data between memory and an I/O module
CPU
134
Small, fast memory located between the processor and main memory is called:
Cache memory
135
The ______________ routine determines the nature of the interrupt and performs whatever actions are needed.
interrupt handler
136
____________ refers to the tendency for a processor to access memory locations that have been used recently, therefore the performance can be improved by cache. For example, when an iteration loop is executed, the processor executes the same set of instructions repeatedly.
Temporal locality
137
_____________ is more efficient than interrupt-driven or programmed I/O for a multiple word I/O transfer
Direct memory
138
What component is considered to be the cache of hard disk?
real memory
139
The four main structural elements of a computer system are:
Processor, Main memory, I/O modules, System bus
140
What is the problem of I/O process without interrupt, compared to the one with interrupt?
Waste CPU cycles to periodically check the status of I/O devices
141
Multitasking in a computer with only one CPU is accomplished by a technique called
Multiprogramming
142
Mean time to failure (MTTF) can be seen as average __________.
uptime
143
To allow programs to access and execute operating system instructions, operating systems provide ________.
System calls
144
Linux kernel is classified as
monolithic kernel
145
A microkernel is a kernel
that is stripped of all nonessential components
146
Most UNIX systems are _____, in that they include virtually all of the O/S functionality in a single large block of code that runs in a single process with a single address space.
monolithic
147
_________ assigns a processor to the first process in the ready queue
Dispatching
148
A(n) ____________ is a set of instructions to be executed in response to a certain type of interrupt.
interrupt handler
149
An operating system must be designed such that
context switches are transparent to processes
150
What operation is particularly useful for detecting security threats and debugging software?
suspend
151
How many processes truly can execute concurrently in a system at any time?
at most as many as there are processors
152
A process may transition to the Ready state by which of the following actions?
Completion of an IO event, newly admitted process, selected by the dispatcher
153
A process control block ____________
includes information on the process's state
154
The ______________ refers to the number of processes in memory
degree of multiprogrammign
155
The _____________ of a process contains temporary data such as function parameters, return addresses, and local variables.
stack
156
The list of processes waiting for a particular IO device is called a(n) _______________
event queue
157
Program counter (PC)
contains the address of the next instruction to be executed
158
Instruction register (IR)
The register that contains the instruction currently being executed opcode + address of data
159
Memory Address Register (MAR)
specifies the address in memory for the next read or write; holds address of the data
160
Memory Buffer Register (MBR)
contains the data to be written into memory or receives the data read from memory
161
Accumulator (AC)
intermediate ALC results are stored temporarily
162
baby kill my good teaching practices
byte, kilo, mega, giga, tera, peta
163
starvation
a runnable process is overlooked indefinitely by the scheduler. even though it can run, it is never chosen
164
deadlock
situation in which 2 or more process are unable to proceed because each is waiting for one of the others to do something
165
What is the difference between deadlock and starvation?
With deadlock, you are bound to never execute a process. With starvation, there's a chance that you can complete it.
166
process
a program in execution. an infinite number of processes exist at once. made of multiple threads.
167
running
process is currently executing. one process can in be this state at a time
168
ready
process is prepared to execute when given opportunity
169
blocked/waiting
a process that cannot execute until some event occurs (ie I/O completion)
170
new
process that's been created but not admitted to the pool of executable processes by the OS. still in the disk (not in main mem)
171
exit
process that's been released from the pool of executable processes because it completed or aborted
172
null -> new
a new process is created to execute a program
173
new -> ready
os will move a process from new to ready when it is prepared to take on an additional process
174
ready -> running
scheduler chooses one of the ready processes to run
175
running -> exit
currently running process is terminated if completed or aborted
176
running -> blocking
process request something it must wait for
177
blocked -> ready
when the event the process was waiting for occurs
178
ready -> exit
parent terminates a child process, or parent terminates and consequently all children terminate
179
blocked -> exit
I/O operation fails and error occurs. Or process has been waiting for I/O for too long and terminates
180
blocked/suspend
in secondary memory waiting on an event
181
ready/suspend
in secondary memory but ready for execution as soon as there's space in main mem
182
blocked -> blocked/suspend
If there's no ready process, then at least one blocked process is swapped to make room for another that is ready
183
blocked/suspend -> ready/suspend
when the event it was waiting for occurs
184
ready/suspend -> ready
no ready process in the main memory so OS brings in this process that is ready to be executed
185
new -> ready/suspend
the main memory read processes have higher priority
186
blocked/suspend -> blocked
1) a process in the blocked/suspended queue has a higher priority than any process in the ready/suspended queue 2) OS believes whatever event the process was waiting for is going to occur soon
187
running -> ready/suspend
OS preempting the process bc a higher priority process in the blocked/suspended queue became unblocked; freeing some main memory
188
mode switching
user mode to kernel mode kernel mode to user mode
189
process switching
may occur anytime the OS has gained control from currently running process
190
threads
smaller processes
191
mutual exclusion
when one process is in a critical section using a resource, no other process may be in the critical section
192
Difference between busy waiting and blocked
Still on CPU wasting cycles = Busy waiting Not on CPU = blocked
193
√First Attempt
Global Variable = Turn If the turn = num of the process, that process can move into the critical section. otherwise, the process will repeatedly read the turn variable until it's its turn. after the process is done with its critical section, it'll update the turn variable. /process 0/ var turn; while (turn != 0){ do nothing } /cs/ turn = 1; Disadv: busywaiting, pace of execution is dictated by the slower process, and if one process fails in the CS, other process is permanently blocked
194
Second Attempt
Difference between 1st and 2nd: -1st only stores turn. 2nd stores state info about both processes. -worse than 1st attempt because mutual exclusion isn't satisfied each process checks the other's flag but can't alter it. others check each other's flags when they want to enter their own CS. If the other process is false, they can enter their own CS. flag[0] = false means P0 isn't in its CS. if other's flag is false, the process changes its flag to true and enter CS. After its done in the CS, it changes it's flag back to false. /P0/ while (flag[1] = true){ do nothing } flag[0] = true; /cs/ flag[0] = false; disadv: if a process fails inside the CS or after setting flag to true, the other process is permanently blocked
195
Third Attempt
Difference between 2nd and 3rd: -3rd sets the flag at the start of the code /p0/ flag[0]=true; while(flag[1]=true){ do nothing; } /cs/ flag[0]=false; disadv: if a process fails inside the CS, the other process is permantently blocked. deadlock: both processes set flags to true before either has executed the while statement, then each will think that the other has entered it's CS
196
Fourth Attempt
Difference between 3rd and 4th: -3rd, each process sets its state without knowing the state of the other -4th fixes this by making each process more deferential. each process sets its own flag to indicate it wants to enter CS, but uses a delay and is prepared to defer to the other process /P0/ flag[0]=true; while(flag[1]=true){ flag[0]=false; delay; flag[0]=true; } /cs/ flag[0] = false; disadv: livelock (look at sequence)
197
Fifth Attempt
Difference between 4th and 5th: impose an order on the activities of the 2 processes to avoid mutual courtesy combine turn and flag
198
Instruction Cycle with MAR and MBR
Fetch 1) start with the PC value 2) copy the PC value into MAR 3) MBR = whatever value is at the address of MAR 4) copy the MBR value into IR 5) Execute IR
199
Banker's Algorithm
1) sum of each resource in the allocation matrix 2) total resources available for each resource - sum of each resource from prev step = available matrix 3) need matrix = maximum - allocation 4) if need <= available, execute. available = available + allocation 5) else, move ahead
200
Resource Request Algo with 1 request
1) if request <= need, move to step 2 2) if request <= available, move to step 3 3) available = available - request allocation = allocation + request need = need - request 4) Redraw matrices 5) then apply Banker's
201
Resource Request Algo with 2 requests at the same time
1) total the request of p1 and p2 2) total the need of p1 and p2 3) if total request <= total need, move to next step 4) if total request <= total available, move to next step 5) available = available - total request allocation = allocation + respective/individual request need = need - respective/individual request 6) redraw matrices 7) then apply Banker's
202
race condition
when multiple processes or threads read and write data items so that final results depends on the order of execution of instructions in multiple processes
203
semaphore
global integer value/variable used for signaling among processes; decides which process gets access to critical section
204
3 Operations of Semaphores
1) Can be initialized to a nonneg int 2) semWait decrements sem value; if value < 0, process executing semWait is blocked. Otherwise, process continues execution 3) semSignal increments sem value; if value <= 0, then process blocked by semWait is unblocked
205
Counting Semaphore Code
wait(s){ while(s <= 0){ //process blocked do nothing } s--; } signal(s){ s++ }