Operating Systems

What is faster, Main Memory or Registers?

Registers are faster than main memory.

What is smaller, Main Memory or Registers?

Registers are smaller than main memory.

3 Types of registers typically available are:

Data Registers (storing data), Address Registers (stack pointer, frame pointer), Condition Codes (addl, mult)

The instruction execution consists of what two steps?

Fetch, Execute

Where does the processor fetch an instruction from?

Cache / Main Memory

Where does the processor hold the address of the next instruction?

Program Counter (PC)

Where does the processor hold the instruction fetched?

Instruction Register (IR)

A Computer's Basic Elements. List the 4 high level components of a computer:

Processor, Bus (Control), I/O, Memory

...contains the address of an instruction to be fetched.

What is the Program Counter?

...contains the instruction most recently fetched.

What is the Instruction Register (IR)?

-Exploits the hardware resources of one or more processors
-Provides a set of services to system users
-Manages secondary memory and I/O devices

What is an Operating System?

When an external device becomes ready to be serviced by the processor, the device sends this type of signal to the processor:

Interrupt Signal

Two accepted methods of dealing with multiple interrupts is to:

Define priorities for the interrupts, Disable interrupts while an interrupt is being processed

A common class of interrupts is:

Program, Timer, I/O

When a new block of data is written into cache memory, the following determines which cache location the block will occupy:

Mapping Function

Direct Memory Access (DMA) operations require the following information from the processor:

Address of I/O device, Starting memory location to read/write, Number of words to be read/written

T / F - An operating system controls the execution of applications and acts as an interface between applications and the computer hardware.

True

T / F - The operating system typically runs in parallel with application programs, on it's own special O/S processor.

False

A computer hardware feature that is vital to the effective operation of a multiprogramming operating system is:

I/O interrupts and DMA

It is a facility that allows programs to address memory from a logical point of view, without regard to the physical amount of main memory.

Virtual Memory

In the operating system scheduling system, it contains processes that are in main memory.

Short term queue

It includes all information needed by the operating system and processor to manage and execute the process. It characterizes the process.

Process State

A process is comprised of what three parts:

Set of data, State of program, Code (data functions) / Control

It is the listing of a sequence of instructions that execute for a particular process.

What is a Trace?

The behavior of an individual process can be characterized by examining:

A Single Process Trace.

The behavior of a processor can be characterized by examining:

The interleaving of the process traces.

It is the portion of the operating system that selects the next process to run.

What is the Dispatcher?

T / F - The concept of thread synchronization is required in multithreaded systems because threads of a single process share the process's process control block (PCB).

False

T / F - In a pure User-Level Thread (ULT) facility, all of the work of thread management is done by the application, but the kernel is aware of the existence of threads.

False; The kernel is not aware of the existence of threads.

T / F - In a symmetric multiprocessing (SMP) system, each processor has access only to a private main memory area.

False

T / F - An SMP O/S manages processor and other resources so that the user may view the system in the same fashion as a multiprogramming uniprocessor system.

True

T / F - The primary advantage of the basic microkernel design over layered kernel designs involves increased performance.

False; performance is a disadvantage

T / F - The philosophy underlying the microkernel is that only absolutely essential core operating system functions should be in the kernel.

True

In a Linux system, it is a process that has been terminated but, for some reason, still must have its task structure in the process table.

What is a zombie?

The User Data, User Program, System Stack and Process Control Block elements collectively make up what is referred to as the __________________.

Process Image

The Process Identification, Processor State Information and the Process Control Information are the general categories that collectively make up what is referred to as the ______________________.

Process Control Block.

What is true regarding the relationship between processes and threads:

It takes less time to create a new thread in an existing process than to create a new process. Less time to terminate a thread. Switching between two threads takes less time. Threads can communicate with each other without invoking the kernel.

The basic thread operation related to the change in thread state that occurs when a thread needs to wait for an event is referred to as the:

Block Operation

One of the disadvantages of User-?Level Threads (ULTs) compared to Kernel-?Level Threads (KLTs) is:

When a ULT executes a system call, all threads in the process are blocked.

T / F - The Process Image refers to the binary form of the program code.

False; it refers to the process elements. Such as the program, data, stack and attributes

T / F - The portion of the Process Control Block that consists of the contents of the processor registers is called the Process Control Information.

False; processor state information portion of the PCB contains registers.

The processor execution mode that user programs typically execute in is referred to as:

User Mode

The processor typically maintains the current operating mode (i.e., user or kernel) in the _________________.

Program Status Word (PSW)

One step in the procedure for creating a new process involves:

Initializing the process control block, Allocating space for the process, Assigning a unique identifier

A process switch may occur when the system encounters an interrupt condition, such as that generated by a:

Memory fault, Supervisor call, Trap

It is the reclaiming of reclaiming of the resources from the processor before the process is finished using it. The resources can be the process itself.

What is Preemption?

It is a process state in which a process cannot execute until some event occurs.

What is a Blocked State?

It is the action that refers to when the OS moves one of the blocked processes out onto disk into a suspended queue. Then the OS brings in another process from the suspended queue.

What is Swapping?

It is the portion of the operating system that selects the next process to run.

What is the Dispatcher?

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

T / F - The principal function of the processor is to execute machine instructions residing in main memory.

True

T / F - A process trace is a listing of the sequence of instructions that execute for that process.

True

T / F - The principal responsibility of the operating system is to control the execution of processes.

True

Define the two main categories of processor registers.

User-Visible registers, Control and Status registers

What are the 4 actions that a michine instruction can specify

Processor-memory, Processor-I/O, Data Processing, Control

What characteristics distinguish the various elements of a memory hierarchy?

Speed(top=fast ->bottom=slow), Size(top=small->bottom=large), Cost(top=high->bottom=low), Access Frequency(top=often->bottom=infrequent)

3 Techniques for I/O operations

Interrupts-driven I/O, DMA, Programmed I/O

What is spatial locality?

Spacial locality = multiple, clustered, memory locations; they will be fetched sequentially.

What is temporal locality?

Temporal Locality = processor accesses memory locations that have been used recently; happens w/loops. This methods keeps recently used instructions and data in cache memory.

What are the strategies for exploiting spatial locality?

Spatial = exploits the cache by using larger cache blocks and incorporating pre-fetching mechanisms into cache control logic.

What are the strategies for exploiting temporal locality?

Temporal = exploits the cache by keeping recently used instructions & data values in cache memory and by exploiting the cache hierarchy.

What is the kernel of an OS?

Kernel = located in main memory, contains most freq used funcs in the OS. Link between programs and processes.

What is multiprogramming?

An approach at logic flow that will allow the processor to switch between jobs in an effective fashion.

List the 5 storage management responsibilities of a typical OS.

Process Isolation, Automatic allocation and management, support of modular programming, protection and access control, long-term storage

What is multithreading?

A technique in which a process is divided into threads that can run concurrently.

What is a Thread?

Threads are a dispatchable unit of work which includes a processor context and its own data area for a stack.

The 4 types of entities that the OS maintains tables for include:

I/O, Memory, File, Process

What is a mode switch?

mode switch is when the processor simply sets the pc to the starting address of an interrupt handler and switches from user modes to kernel mode.

What is a process switch?

process switch you must switch the processor context, program counter and the registers must be saved before the process control block of the process is moved to another queue. after executed the previous process is switch back in.

List 2 separate characteristics embodied in the concept of a process.

Resource ownership, Scheduling/execution

4 General examples of the use of threads in a single-user multiprocessing system.

Foreground/Background work, Asynchronous processing, Speed of execution, Modular program structure

What resources are shared by all threads of a process?

The state and resources of the process (including address space, file resources, and execution privileges)

A technique used to overcome the problem of blocking threads. The purpose is to convert a blocking system call into a non-blocking system call.

What is Jacketing

If we have a 32 bit instruction and the first 8 bits contain opcode...how large must the program counter be?

32-8 = 24 bits (at least)

If we have a 32 bit instruction and the first 8 bits contain opcode...how large must the IR be?

either 8 bits (for opcode) or 32 bits (to contain the whole instruction)

What is Cache

When processor attempts to read byte/word, a check is made to determine if the byte/word is in cache. If not, a block of main memory is read into the cache, then the byte/word is delivered to the processor

Cache Design Issues Include:

- Cache size
- Block size
- Mapping function
- Replacement algorithm
- Write policy

What is Programmed I/O?

the processor must determine when the instruction is complete

What is Interrupt-driven I/O?

The I/O module will interrupt the processor to request service when it is ready to exchange data with the processor

What is the Key Responsibility of the OS? What is its fundamental Task?

Key responsibility of an OS is to "manage system resources." Its fundamental task is "Process Management" -taufer

Reasons for Process Suspension:

Swapping, Other OS Reason, Interactive User Request, Timing, Parent Process Request

What 3 states exist for threads?

Running, Ready, Blocked, Spawn, Block, Unblock, Finish
*(The status Suspended is a process-level concept & A thread can spawns another thread)

What is a KLT?

Kernel Level Thread: Kernel maintains context information for the process and the threads (No thread management done by application) Scheduling is done on a thread basis.

What are the advantages of KLT?

-The kernel can simultaneously schedule multiple threads from the same process on multiple processors.
-If one thread in a process is blocked, the kernel can schedule another thread of the same process.
-Kernel routines themselves can be multithreaded.

What is the disadvantage of KLT?

The transfer of control from one thread to another within the same process requires a mode switch to the kernel.

What are the benefits of a Microkernel Organization?

Uniform interfaces on requests made by a
process - all services -> message passing
� Extensibility - add new services
� Flexibility - remove existing services
� Portability - across processors
� Reliability - rigorous testing & limited API
� Distributed S