Shared Flashcard Set

Details

CSC343
Operating Systems
49
Computer Science
Undergraduate 3
12/12/2011

Additional Computer Science Flashcards

 


 

Cards

Term

What are the 3 primary objectives of a typical operating system

Definition

1. convenience: make the computer (ISA level) more convenient to use by

   programmers and users.

 

2. efficient: assure that system resources are used in an effiecient manner

 

 3. ability to evolve: permit effective development, test and integration of 

    new system functionality without interfering with other services

Term

Identify 3 out of 5 current developments in computer systems that continue to drive the evolution of the operating system.

Definition

1. Processes

2. Memory management

3. Information protection and security

 4. Scheduling and resource management

5. System structure

Term

Identify 4 typical elements that constitutes a process image

Definition

1. User program 2. User data 3. system stack 4. process control block

Term

A process can be described as having two charactersitics. Identify

Definition

1.Resource ownership:

- process includes a virtual address space to hold the process image.

- I/O devices, files, etc..

 

2. Scheduling/execution:

- follows an execution path that may be interleaved with other processes.

- state

- dispatching priority

-entity that can be scheduled for execution

Term
Identify the 6 requirements that allow
mutual exclusion to system resources
Definition
1. Only one process is allowed in the
critical section of a resource at a
time.

2. A process must not be delayed
access to a critical section when no
other process is using it.

3. A process remains inside a critical
section for a finite time only.

4. A process that halts inside a critical section must do so without
interfering with other processes

5.No deadlock or starvation

6. no assumptions are made about the relative process speeds or number of
processes
Term
For the 7-state process model what
events trigger the following
transitions?
1.running --> ready

2running --> blocked

3. blocked --> ready

4. new --> ready

5. blocked --> blocked suspend
Definition
1. time quantum expired or a higher
priority process preempts running
process.

2. O/S system call
-open a file
-perform i/o operation
-interprocess communication

3. event process is waiting for occurs

4. when o/s is ready to take on a new
process, the new process is created
and can be added to the ready or ready
suspend state.

5.If there are no other ready processes
then at least one blocked process is
is swapped out ot make room for
another process that is not blocked.
Term
clearly define what it means to swap a
process
Definition
The operating system needs to release
sufficient memory to bring in a
process that is ready to execute
Term
From a performance perspective, the 5-
state process model has a problem that
can result in the underutilization of the CPU. Clearly identify the nature of this problem.
Definition
Since the processor is so much faster
than I/O devices, it is possible that
all active processes are blocked
waiting on I/O and therefore the
processor is idle.
Term
In general, how does the 7-state model resolve the problems of the 5-state model? (your answer for this question should be a brief summary overview)
Definition
A process moved to secondary storage to make room for another process in main memory is said to be suspended temporarily kicked out of main memory to make room for other processes
process still exists, but its entire state is on secondary storage device in an area known as the swap space
Term
Identify the typical name of one of the two new states and describe the characteristics of a process in this state.
Definition
Blocked/Suspend: The process is in secondary memory awaiting an event
Term
Identify the typical name of the other new state and describe the characteristics of a process in this state.
Definition
Ready/Suspend: The process is in secondary memory but is available for
execution as soon as it is loaded into main memory
Term
What event/conditions in the 7-state model would trigger the transition of a process from one of the 5 original states to one of the two new states?
Definition
If there are no ready processes, then
at least one blocked process is
swapped out to make room
for another process that is not blocked
Term
e) What event/conditions in the 7-state model would trigger the transition of a process between the two new states?
Definition
A process in the blocked/suspend state is moved to the ready/suspend state when the event for which it has been waiting occurs.
Term
What event/condition in the 7-state model would trigger the transition of a process from one of the two new states to one of the 5 original states? Be as clear and specific as possible.
Definition
Ready/suspend-->Ready: When there are no processes in main memory, the OS
will need to bring one in to continue
execution.

Blocked/suspend-->Blocked: A process
in the blocked/suspend queue with a
higher priority than any of the
processes in the ready/suspend queue
and the OS has reason to believe that
the blocking event for that process
will occur soon.
Term
What is a disadvantage or problem with implementing mutual exclusion by disabling interrupts?
Definition
Processor is limited in its ability to
interleave programs degrading
performance

On SMP disabling interrupts on one
processor will not guarantee mutual
exclusion
Term
What is a disadvantage or problem with implementing mutual exclusion using hardware instructions such as exchange or testandset?
Definition
-Busy-waiting consumes processor time
-Starvation is possible when a process
leaves a critical section and more
than one process is waiting.
-Deadlock
Term
As it pertains to message passing techniques used in a computer system describe, how a mailbox can be used to provide communication between one producer process and two consumer processes? Your answer should include a clear definition of what a mailbox is.
Definition
With indirect addressing messages are not sent directly from sender to receiver but rather are sent to a shared
data structure consisting of queues that can temporarily hold messages. These queues are generally referred to as mailboxes. One process (es) sends a message to the mailbox and the other process (es) picks up the message
from the mailbox
Term
We discussed at least 4 performance advantages that an application implemented as a single process with multiple threads (multithreading) has over an application implemented as a set of cooperating processes that are not threaded (multiprocessing). Identify three of the four advantages we discussed
Definition
-Takes less time to create a new thread than a process

-Less time to terminate a thread than a process

-Less time to switch between two threads within the same process

-Since threads within the same process share memory and files, they can communicate with each other without invoking the kernel
processes must invoke the
kernel to communicate
Term
Describe one primary difference between a Symmetric Multi-Processor (SMP) and a cluster of workstations.
Definition
• multiple processors with equal capability that have shared access to memory and I/O devices

• provide means to execute several processes/threads at one time

• Kernel can execute on any processor

• Typically each processor does self-scheduling from the pool of available process or threads
Term
Describe the architecture of a Symmetric Multi-Processor (SMP). You may want to draw and label a diagram in support of your answer.
Definition
Draw a picture stupid
Term
Describe how scheduling is performed if only ULTs are used.
Definition

• All thread management (creation, scheduling, termination, etc.) is

done by the process for the application program and the kernel is not 

aware of the existence of threads

 

 

 

Term
Describe a primary advantage of scheduling if only ULTs are used.
Definition
• Thread switching does not require kernel mode privileges because all of the thread management data structures are within the user address space of a single process.

• Scheduling can be application specific; one application may benefit using round robin while another may benefit more form a priority based scheduling algorithm.

• ULT’s can run on any OS.
Term
Describe how scheduling is performed for if only KLTs are used.
Definition
• Kernel maintains context information for all the active processes and all the threads belonging to these processes

• Scheduling is done on a thread basis by the OS central scheduler. Process has control over thread scheduling (except its priority level and perhaps the priority level of its threads)

• a process can have its threads scheduled for execution on multiple processors (cores) at the same time
Term
Describe a primary advantage of scheduling if only KLTs are used.
Definition
Scheduling by the kernel is done on a thread basis. This approach overcomes the two principal drawbacks of the ULT approach. First, the kernel can simultaneously schedule multiple threads from the same process on multiple processors. Second, if one thread in a process is blocked, the kernel can schedule another one of the same process.
Term
Describe how scheduling is performed if both ULTs and KLTs are used.
Definition
• multiple User-Level threads are mapped into multiple Kernel-Level threads

• may be more User-Level threads than Kernel-Level threads

• usually the number of Kernel-Level threads is related to the number of processors (or cores) in the computer system
Term
Describe a primary advantage of scheduling if both ULTs and KLTs are used.
Definition
In a combined approach, multiple threads within the same application can run in parallel on multiple processors, and a blocking system call need not block the entire process.
Term
KLTs are supported directly by hardware. ULTs are implemented using software libraries. Generally a feature that is directly supported by hardware (such as KLTs) will provide a performance benefit during program execution when compared to the same feature implemented without hardware support (such as ULTs). Is this the case with these two approaches to implementing threads? A simple yes/no answer will not earn any points. You must provide clear, understandable, justification for your answer.
Definition
No, one of the disadvantages of implementing KLT’s is that the transfer of control from one thread to another within the same process requires a mode switch to kernel, that additional overhead may cause a KLT implementation to perform worse than a ULT-based scheme.
Term
What is a mode switch and what actions happen when a mode switch occurs?
Definition
 a change from user mode to kernel mode, or vice versa

 may not require all the overhead of a context switch

 a running process might change modes
-no need to save
Term
What is a process switch and what actions happen when a process switch occurs?
Definition
process switch: An operation the switches the processor from one process to another, by saving all the process
control block, registers, and other information for the first and replacing them with the process information for the second
Term
What is a context switch and what actions happen when a context switch occurs?
Definition
Current state of CPU is saved on system stack.
Term
We discussed three basic ways in which execution of the Operating System itself is handled. One way is to implement the OS as a set of functions (service calls) that user processes call. The OS code is therefore executed by the user processes. Consider an interrupt-driven-memory-mapped computer system whose Operating System is implemented as describe above. This system supports multiple interactive users, multiprogramming, multiprocessing, and multithreading.
Definition
a) On this system describe a primary trigger, or event, that would cause a context switch to occur.
Based on some scheduling scheme, one process needs to be switched out of the CPU so another process can run

b) On this system describe a primary trigger, or event, that would cause a process switch to occur.
When a process gets switched with another process they necessarily change states.

c) On this system describe a primary trigger, or event, that would cause a mode switch to occur.
if an interrupt, trap or supervisor call occurs, the processor is placed in kernel mode and control is passed to the OS.
Term
What is the primary performance goal of RISC architecture?
Definition
The primary goal of RISC architecture is to execute every ISA level instruction in one clock cycle.
Term
describe one of the primary differences between the architecture of RISC and CISC computer systems?
Definition
A computer system based on RISC architecture is designed to solve problems in a specific application domain very efficiently and fast.
CISC architecture is designed to support problem solving in many different application domains and may be referred to as a general purpose computing platform.
Term
describe the singular primary difference between the organization of RISC and CISC computer systems?
Definition
A RISC machine has no microarchitecture level.
Term
Explain the two primary goals of the memory hierarchy in a computer system.
Definition
• to provide the CPU with the view that it has access to a memory that can be accessed as fast as a register and

has the capacity on the order of a disk drive.
Term
Describe what a critical section is?
Definition
critical section: A section of code within a process that requires access to shared resources and which may not be executed while another process is in a corresponding section of code.
Term
Describe what deadlock is (as it relates to computer systems)?
Definition
deadlock: A situation in which two or more processes are unable to proceed because each is waiting for one of the others to do something.
Term
Describe what starvation is (as it relates to computer systems).
Definition
starvation: A situation in which a runnable process is overlooked indefinitely by the scheduler, although it is able to proceed, it is never chosen.
Term
Describe what a race condition is (as it relates to computer systems).
Definition
race condition: A situation in which multiple threads or processes read and write a shared data item and the final results depends on the relative timing of their execution
Term
Describe how FIFO scheduling works to select the next process to execute when required by the Operating System.
Definition
FIFO: First in first out: simply queues processes in the order that they arrive in the ready queue. The process will run to completion or until interrupted by the system.
Term
Describe how Round-Robin scheduling works to select the next process to execute when required by the Operating System.
Definition
Round Robin: A scheduling algorithm in which processes are activated in a fixed cyclic order; that is all processes are in a circular queue. A process that cannot proceed because it is waiting for some event returns control to the scheduler.
Term
Describe how Priority scheduling works to select the next process to execute when required by the Operating System.
Definition
Priority: Each process is assigned a priority and the scheduler will always choose a process of higher priority over one of lower priority.
Term
A process control block PCB is a data structure that is used by the Operating System to contain and manage all information related to a process. As we have discussed there is a great deal of information kept in the PCB. Describe as much of the content of the PCB as you can. The points you earn for your answer will depend on the importance of the information that you describe and the clarity in which you identify the purpose of the information.
Definition
• Identifier: a unique integer that is used to uniquely identify each process currently active in the computer system

• Process State Information: defines the readiness of the process to be scheduled for execution

• Priority: One or more fields may be used to describe the scheduling priority of the process.

• Program counter: Contains the address of the next instruction to be fetched

• Memory pointers
-program code
-data
-shared blocks

• Context data
-registers

• I/O status information
-I/O requests
-assigned devices assigned
to process
-files in use by the process
• Accounting information: such as when the process was last run, how much CPU time it has accumulated
Term
How do microkernel Operating Systems defer from convention Operating Systems?
Definition
It is a slimmed down version of the OS and assigns only a few essential functions to the kernel.
Term
What motivates the Operating Design strategy the led to the development of microkernel Operating Systems.
Definition
allows customization of services for specific application environments
Term
Clearly describe the four necessary and sufficient conditions for deadlock
Definition
1.Mutual exclusion
-Only one process may use a
resource at a time

2.Hold-and-wait
-A process may hold allocated
resources while awaiting
assignment of others

3.No preemption
-No resource can be forcibly
removed from a process holding it

4.Circular wait
-A closed chain of processes
exists, such that each process
holds at least one resource
needed by the next process in
the chain
Term
Clearly describe the deadlock prevention strategy that denies circular wait. In your description explain how processes must request resources and why a deadlock cannot occur.
Definition
Prevention by Denying Circular Wait
• define a linear ordering of
resource types

• processes must request their
resources in this linear order

Consider processes A and B and system resources R1 … Rn
• A owns Ri and B owns Rj where i < j

• B cannot request Ri since i is less
than j
Term
Describe 4 strategies for deadlock recovery.
Definition
Recovery Strategies once Deadlock Detected
•Abort all deadlocked processes
o most common method

• Back up each deadlocked process to
some previously defined checkpoint,
and restart all process
o must implement checkpoint,
rollback, and restart mechanism
o original deadlock may occur

• Successively abort deadlocked
processes until deadlock no longer
exists
o order selected based on some
cost criteria (see below)
• Successively preempt resources
until deadlock no longer exists
o preempted process choose based
on cost criteria (see below)
o must rollback preempted process
to point before resource was
allocated
Term
Discuss computer system security as it relates to Operating Systems. You answer should address to primary concerns: the types and nature of system access threats, and the countermeasures used to provide computer system security by the Operating System.
Definition
a. System Access Threats
i. Intruders: An intruder is a hacker or cracker-3 classes
-Masquerader: an authorized person who gains access to system by using a
legitimate users’ account
-Misfeasor: A legitimate user who gains access to unauthorized resources
or misuses the resources that they are authorized to use.
-Clandestine user: A person who gains supervisory control of the system and uses
this control to evade auditing and access controls or to suppress audit collection.

ii. Malicious software: Any software designed to cause damage to or use up the resources of a target computer. Viruses, Trojan horses, worms etc…

b. Countermeasures
i. Intrusion detection: A security service that monitors and analyzes system events for the purpose of finding, and providing warnings of attempts to access system resources in an unauthorized manner
ii. Authentication: Is the basis for most types of access control and user accountability
iii. Access control: A security policy that specifies who or what may have access to each specific system resource and the type of access granted in each instance.
iv. Firewalls: A dedicated computer that interfaces with computers outside a network and has special security precautions built in in order to protect
files on computers within its network
Supporting users have an ad free experience!