CS370 Midterm 1 Study Guide Terms

Ace your homework & exams now with Quizwiz!

How should the time quantum be related to the CPU burst times?

80% of CPU bursts should be shorter than time quantum

What is a thread?

A basic unit of CPU utilization: a thread ID, a program counter, a register set and a stack

What is a Gantt chart? How is it used?

A chart used to illustrate schedules.

What is a command interpreter? How can one be implemented?

A command line interface. Either through the kernel or third-party shells.

What is a monitor?

A high-level abstraction that provides a convenient and effective mechanism for process synchronization

What is a PCB?

A process control block.

What is a process? What is the difference between a process and a program?

A process is a program loaded into memory and is executing. A program can involve multiple processes than run concurrently

What is a critical section?

A section in which no other process aside from the current one is allowed to execute its critical section

What is meant by starvation in this chapter?

A situation in which processes wait indefinitely within the semaphore

What is aging?

A solution to starvation: increasing the priority of a process as time progresses

How does a thread differ from a process?

All threads in a process have the same address space, each thread has its own thread ID, program counter, registers, etc

Define operating systems in terms of what they do

Allocates resources, monitors activities, manages disks & files

Describe the Readers/Writer problem.

Allow multiple readers to read at the same time and only a single writer can access the shared data at the same time

What is dual mode operation? How does the system switch between modes?

Allows OS to protect itself and other system components. Timer is set to interrupt after some time period. A mode bit is set to 0 for kernel and 1 for user

What is an interrupt vector?

An array of addresses of the interrupt service routines for various devices

What is a virtual machine?

An emulation of a computer system that provides the functionality of the physical system

What variables are used in Peterson's Algorithm? Which are common to both processes?

An integer turn variable and 2 boolean flags. Turn is common.

What is a semaphore?

An integer variable that is only accessed through wait() and signal() (both atomic)

What is the difference between asymmetric and symmetric direct communication?

Both the sender and receiver processes must name each other in symmetric communication and only the sender is required to name the recipient.

Describe the layered approach for the structure of operating systems. What are some advantages/disadvantages?

Breaking an operating system into smaller and more appropriate pieces, with the bottom layer as the hardware and the highest layer as the UI. Advantage: simplicity of construction and debugging. Disadvantage: difficulty appropriately defining the various layers and they tend to be less efficient than other types.

Describe the effect of synchronized in Java.

Calling a synchronized method requires owning the lock for the object

Describe the difference between direct and indirect communication.

Direct communication: each process must name recipient or sender of the communication (send() and receive()). Indirect communication: messages are sent to and received from mailboxes.

What is round-robin scheduling?

Each process gets a time quantum, etc.

Describe the Dining Philosophers problem.

Example of a large class of concurrency-control problems

What is FCFS? What are its advantages/disadvantages?

First come first served. Easy to understand, convoy effect (short process stuck behind long process)

What is FIFO?

First in first out

What is the difference between I/O-bound jobs and CPU-bound jobs?

I/O bound processes spend more time doing I/O than computations, many short CPU bursts. CPU-bound processes spend more time doing computations, few very long CPU bursts.

What is mutual exclusion?

If a process is executing in its critical section then no other processes can be executing in their critical sections

List externally-derived priorities. List internally-derived priorities.

Internally defined priorities use measurable quantity or qualities to compute the priority of a process. External priorities are set by criteria outside the operating system, such as importance of the process, type and amount of funds for computer use, etc.

What is IPC?

Interprocess communication that will allow processes to exchange data and information

How should the time quantum be related to the context switch time?

It should be large with respect to the context switch time.

What is completely fair scheduling?

Linux scheduler: variable time-slice based on number and priority of tasks

What is starvation?

Low priority processes may never execute

Describe the 3 multithreading models: many-to-one, one-to-one, many-to-many.

Many-to-one: Many user-level threads mapped to single kernel thread. One-to-one: each user-level thread maps to kernel thread. Many-to-many: Many user level threads mapped a smaller or equal number of kernel threads

What performance criteria could be selected for optimizing an operating system?

Measures of interest

What is multiprogramming?

Multiprogramming organizes jobs so CPU always has one to execute

What three requirements must a solution to the critical-section problem satisfy?

Mutual exclusion, progress, bounded waiting

Which multithreading model is common now?

One-to-one

Describe the Bounded Buffer problem

Only allowed at most buffer size - 1 items

Posix

Portable Operating System Interface. Family of IEEE standards which defines application programming interface (API), command line shells, utility interfaces and compatibility with variants of OSs.

What does preemptive mean? Non-preemptive?

Preemptive scheduling allows for processes to be removed in the middle of execution

Describe the producer/consumer problem.

Programs/processes running concurrently/in parallel are subject to context switches at unpredictable times, i.e. race conditions

How can multilevel queues be scheduled?

Ready queue is partitioned into separate queues, each queue has its own scheduling algorithm

What does the medium-term scheduler do?

Removes a process from memory and reduce the degree of multiprogramming. The process can be reintroduced and restarted where it left off.

How are SJF and priority schedulers similar? Different?

SJF is priority scheduling where priority is the inverse of predicted next CPU burst time

What does the short-term scheduler do?

Selects one from the processes that are ready to execute and allocates the CPU to one of them.

What does the long-term scheduler do?

Selects processes from pool and loads them into memory for execution.

What is SJF? What are its advantages/disadvantages?

Shortest job first. Reduction in waiting time for short processes is GREATER than that of increases in waiting time for long processes. Hard to know the length of the next CPU request

Describe hardware support used to assist the implementation of mutual exclusion?

Supports the idea of locking and provides special atomic instructions

What is a context switch? What does the kernel do during a context switch? (What is the difference between this and the previous question?)

Switching the CPU to another process and saving the state of the current process and restoring the state of a different process

List instructions that might be usable only from supervisor mode in a dual-mode processor

System calls,

How is time-sharing usually implemented?

The CPU executes multiple jobs by switching among them so frequently that the user can interact with each program

What is a kernel?

The core of a computer's OS with control of everything in it

What is the dispatcher? What does it do?

The dispatcher module gives control of the CPU to the process selected by the short-term scheduler which involves switching context, switching to user mode and jumping to the proper location in the user program to restart it.

What is the degree of multiprogramming?

The number of processes in memory

What is throughput?

The number of processes that complete their execution per time unit

What is time-sharing? What are the main advantages of time-sharing?

Time-sharing is a logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing

What is the time quantum used for?

To decide when a process is preempted.

What is the critical-section problem?

To design a protocol that the processes can use to cooperate. Each process must request permission to enter its critical section

Describe how user threads differ from kernel threads.

User threads have management done by user-level threads library, Kernel threads have support by all general purpose systems

What is time sharing? What kind of scheduling does it involve?

Uses CPU scheduling and multiprogramming

Define the wait operation: wait(S)

Waits until another process makes S=1

When is the long-term scheduler invoked?

When a new process is created or one dies

List some of the queues on a typical operating system. Describe the function of each.

Zero capacity: (no messages are queued on a link.) Sender must wait for receiver. Bounded capacity: finite length of n messages, sender must wait if queue is full. Unbounded capacity: infinite length and sender never waits

Define the signal operation: signal(S).

s++

Describe the Java functions yield, wait, notify, notifyAll. In what situations are they used? What do they do?

wait() allows a thread to wait for an event. A call to notify.all() allows all threads that are on wait() with the same lock to be released


Related study sets

Child, Partner, and Elder Violence

View Set

Insurance Exam - Missed questions

View Set

Accounting - Financial Accounting: Information for Decisions - Wild 9e Introducting Financial Statements

View Set

Chapter 14 The Autonomic Nervous System

View Set

Esenciales Constitución española

View Set