Shared Flashcard Set

Details

Operating Systems
UMD CS 5631
48
Computer Science
Undergraduate 4
03/09/2010

Additional Computer Science Flashcards

 


 

Cards

Term
What components comprise a process in RAM
Definition
Process stack
Data Section
Heap
Text section
Term
What information is contained in a process control block (PCB)?
Definition
Process state
Program counter
CPU registers
CPU scheduling
Memory management information
Accounting information
I/O status information
Term
Define degree of multiprogramming and how is it controlled in an operating system?
Definition
Degree of multiprogramming is defined by the number of programs loaded into RAM in the system. Generally, as we increase the degree of multiprogramming, CPU utilization increases. Degree of multiprogramming is controlled by a long-term CPU scheduler.
Term
In what address space are PCB's stored?
Definition
RAM's kernel address space
Term
In a context switch the last thing to do is restore the next processes program counter. Why?
Definition
Because when you restore the program counter, it will begin running code again.
Term
Why would you have one process wait (e.g. block) until another has achieved some state?
Definition
to protect saved data.
Term
what does a thread share
Definition
code (text), global data, open files
Term
Who does a thread share with
Definition
With other threads within a single Heavy-Weight Process, but not with other Heavy-Weight Process’s
Term
What components does each thread have for itself?
Definition
program counter, register set, stack pointer, thread ID
Term
What are the benefits of threads
Definition
• User responsiveness
• Resource sharing: economy
• Speed
• Utilizing hardware parallelism
Term
What are the drawbacks of threads?
Definition
- Synchronization can be difficult and cause bugs
- Lack of Independence causing no memory protection from each other
Term
Why would you want your thread to have separate stacks?
Definition
if two threads are using the same stack, they may corrupt these activation records, or at best use each others activation records.
Term
What are the two ways to implement threads?
Definition
-User level support
-Kernel level support
Term
What are the different threading models?
Definition
- Many-to-one (Many user threads to one kernel thread)
- One-to-one (One user thread per kernel thread)
- Many-to-many (Many user threads to many kernel threads)
Term
What is a cancellation point?
Definition
Places in a thread where it can be "safely" cancelled
Term
What are some examples of multi-threaded applications?
Definition
RPC file server, Database server
Term
What can occur if a process is in the new state?
Definition
It can be admitted into a ready state
Term
What can occur if a process is in the ready state?
Definition
It can get scheduled and dispatched into a running state.
Term
What can occur if a process is in the running state.
Definition
It can either be interrupted and put back into a ready state, have I/O or event wait and go to the waiting state, or exit to the terminated state.
Term
What can occur if a process is in the waiting state?
Definition
It can go back to a ready state either because of I/O or event completion
Term
When does/can scheduling occur and which cases are examples of Non-preemptive scheduling and which of Preemptive scheduling?
Definition

1. When a process terminates 2. When a process switches from a running to waiting state 3. When a process switches from a running to ready state 4. When a process switches from a waiting state to a ready state

 

1 and 2 are non-preemptive and everything is or can be preemptive

Term
What is CPU utilization
Definition
Percentage of time that CPU is busy (and not idle), over some period of time
Term
What is throughput
Definition
Number of jobs completed per unit time
Term
What is turnaround time
Definition
Time interval from submission of a process until
completion of the process
Term
what is waiting time
Definition
Sum of the time periods spent in the ready queue
Term
What is response time?
Definition
– Time from submission until first output/input – Approximate by time from submission until first access to CPU
Term
what is the algorithm of predicting CPU burst?
Definition
τn+1 = α * tn + (1 - α) * τn
Term
What can the priorities for scheduling be set as?
Definition
- Internal - External - Static - Dynamic
Term
What is starvation and how is it solved?
Definition
it is the indefinite waiting for CPU access and it can be solved using aging
Term
What is aging?
Definition
Gradually increasing the priority of a process that waits for a long time
Term
Which scheduling algorithms can be preemptive?
Definition
Round robin, shortest job first can be either and priority can be either
Term
Which scheduling algorithm has the best average wait time
Definition
shortest job first
Term
What are the different types of ready queues and describe them?
Definition
- Local: dispatch to a specific processor
- Global: dispatch to any processor ("load sharing")
Term
What should the runnable interface be implemented by?
Definition
any class whose instances are intended to be executed by a thread. The class must define a method with no arguments called run
Term
What happens when a yield is called?
Definition
the thread gives up CPU for other threads ready to run
Term
How can you pass data from a parent thread to a child thread?
Definition
pass an object instance to the child thread constructor, and retain that object instance in a data member.
Term
What is a busy wait?
Definition
When a process has to wait for another process before it can continue to execute
Term
What is an instance-based synchronization?
Definition
each separate instance of an object, when used with its corresponding synchronized methods, have separate locks
Term
In monitors, what typically happens when signal (or notify) is called and no process is waiting?
Definition
If the notify() method is called when no other thread is waiting, notify() simply returns and the notification is lost. A thread that later executes the wait() method has to wait for another notification to occur
Term
what is a primary task of an operating system?
Definition
to execute and manage processes
Term
When a process "looses" the CPU, what needs to be saved so that the process can be resumed later?
Definition
CPU registers, memory management info
Term
What needs to happen in order for a context switch to occur?
Definition
Save context of current process, load the context of the next process
Term
How are PCB's typically organized?
Definition
In a collection of queues
Term
What happens when a parent dies?
Definition
Children can die (cascading termination) or children can remain executing
Term
What happens when a child dies?
Definition
Parent may be notified
Term
What is the Rendezvous style of blocking message passing?
Definition
- Send blocks until receiver executes receive
- receive blocks until there is a message
Term
What is the fixed-length queue style of blocking message passing?
Definition
sender blocks if queue is full
Term
What is the Non-blocking style of message passing
Definition
- send buffers message, so receiver will pick it up later
- receiver gets a message or an indication of no message
Supporting users have an ad free experience!