• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/10

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

10 Cards in this Set

  • Front
  • Back
What is a program? What are the four componenets of a program?
A program is complied code. The four components of a program are:

1. Executable format information.

2. Text Segment.

3. Data Segment.

4. BSS Segment.
What is a process? What are the components of a process?
A process is a running instance of a program. There are four components of a process:

1. Program (Text, data, BSS).

2. Address space.

3. Stack.

4. Heap.
What is a PCB? What is contained in a PCB?
A PCB (process control block) is a per-process os state needed across system calls. A PCB conatins:

-File descriptor table; working directory

-UID, GID

-priority; state

-signal state and handlers

-pipes

-...
What is contained in the context of a process?
The context of a process contains all the information necessary to resume a suspended process. That is: Registers (incl. PC, SP, Status Register), Configuration (memory space, caches).
What is meant by context switching?
Saving the entire context of a process into the PCB. Loading a different context into the CPU. Makes things appear as if they were running simultaneously.
What are the pitfalls and drawbacks of context switching?
-Pitfalls: Kernel is running on the same CPU using the registers it is trying to restore. the order in which the registers are restored is very important. Drawbacks: context switching is slow, 100% overhead, context switchings too frequent then comp appears slow. 4. Too infrequent, comp appears unresponsive.
What are the benefits of context switching?
- provides mechanism for sharing cpu

- prevents wasted cpu time

-some activities are slow and now processes don't have to run while waiting and the cpu cna process switch.
What are three types of multitasking?
Batch(context switches only when a process is doen executing), cooperative (context switches when running process calls yield funtion), preemptive (CPU has a timer interrupt, wuantums etc.)
What are the states that a process can be in?
-Runnning: the process is actively running on the CPU.

-Ready: the process is eligible to run but is currently not running

-Blocked: the process is not eligible to run (eg waiting for i/o)
What state transitions are available between running, ready, and blocked?
Caused by scheduler:
- Ready -> Running
- Running -> Ready

Caused by blocking request (ie i/o request:
- Running -> Blocked

Blocked -> Ready