ISU COMS 352 FINAL REVIEW
Critical Section - Answer -A section of code within a process that requires access to
shared resources and that must not be executed while another process is in a
corresponding section of code.
Deadlock - Answer -A situation in which two or more processes are unable to proceed
because each is waiting for one of the others to do something.
Livelock - Answer -A situation in which two or more processes continuously change
their states in response to changes in the other process(es) without doing any useful
work.
Mutual Exclusion - Answer -The requirement that when one process is in a critical
section that accesses shared resources, no other process may be in a critical section
that accesses any of those shared resources.
Race Condition - Answer -A situation in which multiple threads or processes read and
write a shared data item and the final result depends on the relative timing of their
execution.
Starvation - Answer -A situation in which a runnable process is overlooked indefinitely
by the scheduler; although it is able to proceed, it is never chosen.
Atomic operation - Answer -A function or action implemented as a sequence of one or
more instructions that appears to be indivisible; that is, no other process can see an
intermediate state or interrupt the operation. The sequence of instruction is guaranteed
to execute as a group, or not execute at all, having no visible effect on system state.
Atomicity guarantees isolation from concurrent processes.
Requirements for Mutual Exclusion - Answer -Must be enforced
A process that halts must do so without interfering with other processes
No deadlock or starvation
A process must not be denied access to a critical section when there is no other
process using it
No assumptions are made about relative process speeds or number of processes
A process remains inside its critical section for a finite time only
How to guarantee mutual exclusion - Answer -Disable interrupts.
, The efficiency could degrade, and will not work in a multiprocessor architecture.
Compare & Swap - Answer -If the values are the same a swap occurs
carried out atomically
Semaphore - Answer -Initialized to a nonnegative number
semWait decrements value
semSignal incrememts value
Synochronization - Answer -achieved by the use of condition variables that are
contained within the monitor and accessible only within the monitor.
Condition Variables are operated on by two functions: - Answer -cwait and csignal.
Frame - Answer -A fixed-length block of main memory.
Page - Answer -A fixed-length block of data that resides in secondary memory (such as
disk). A page of data may temporarily be copied into a frame of main memory.
Segment - Answer -A variable-length block of data that resides in secondary memory.
An entire segment may temporarily be copied into an available region of main memory
(segmentation) or the segment may be divided into pages which can be individually
copied into main memory (combine segmentation and paging).
Memory Management Satisfies... - Answer -Relocation
Protection
Sharing
Logical Organization
Physical Organization
Relocation - Answer -Programmers typically do not know in advance which other
programs will be resident in main memory at the time of execution of their program.
Protection - Answer -Processes need to acquire permission to reference memory
locations for reading or writing purposes.
Sharing - Answer -Advantageous to allow each process access to the same copy of the
program rather than have their own separate copy.
Logical Organization - Answer -Memory is organized as linear
Segmentation is the tool that most readily satisfies requirements
Critical Section - Answer -A section of code within a process that requires access to
shared resources and that must not be executed while another process is in a
corresponding section of code.
Deadlock - Answer -A situation in which two or more processes are unable to proceed
because each is waiting for one of the others to do something.
Livelock - Answer -A situation in which two or more processes continuously change
their states in response to changes in the other process(es) without doing any useful
work.
Mutual Exclusion - Answer -The requirement that when one process is in a critical
section that accesses shared resources, no other process may be in a critical section
that accesses any of those shared resources.
Race Condition - Answer -A situation in which multiple threads or processes read and
write a shared data item and the final result depends on the relative timing of their
execution.
Starvation - Answer -A situation in which a runnable process is overlooked indefinitely
by the scheduler; although it is able to proceed, it is never chosen.
Atomic operation - Answer -A function or action implemented as a sequence of one or
more instructions that appears to be indivisible; that is, no other process can see an
intermediate state or interrupt the operation. The sequence of instruction is guaranteed
to execute as a group, or not execute at all, having no visible effect on system state.
Atomicity guarantees isolation from concurrent processes.
Requirements for Mutual Exclusion - Answer -Must be enforced
A process that halts must do so without interfering with other processes
No deadlock or starvation
A process must not be denied access to a critical section when there is no other
process using it
No assumptions are made about relative process speeds or number of processes
A process remains inside its critical section for a finite time only
How to guarantee mutual exclusion - Answer -Disable interrupts.
, The efficiency could degrade, and will not work in a multiprocessor architecture.
Compare & Swap - Answer -If the values are the same a swap occurs
carried out atomically
Semaphore - Answer -Initialized to a nonnegative number
semWait decrements value
semSignal incrememts value
Synochronization - Answer -achieved by the use of condition variables that are
contained within the monitor and accessible only within the monitor.
Condition Variables are operated on by two functions: - Answer -cwait and csignal.
Frame - Answer -A fixed-length block of main memory.
Page - Answer -A fixed-length block of data that resides in secondary memory (such as
disk). A page of data may temporarily be copied into a frame of main memory.
Segment - Answer -A variable-length block of data that resides in secondary memory.
An entire segment may temporarily be copied into an available region of main memory
(segmentation) or the segment may be divided into pages which can be individually
copied into main memory (combine segmentation and paging).
Memory Management Satisfies... - Answer -Relocation
Protection
Sharing
Logical Organization
Physical Organization
Relocation - Answer -Programmers typically do not know in advance which other
programs will be resident in main memory at the time of execution of their program.
Protection - Answer -Processes need to acquire permission to reference memory
locations for reading or writing purposes.
Sharing - Answer -Advantageous to allow each process access to the same copy of the
program rather than have their own separate copy.
Logical Organization - Answer -Memory is organized as linear
Segmentation is the tool that most readily satisfies requirements