Chapter 2 Flashcards

1
Q

What is the role of an OS?

A

A computer is a set of resources for the movement, storage and processing of data

The OS is responsible for managing these resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the key interfaces of an OS?

A

The key interfaces are:

  • The instruction set architecture (ISA)
  • Application Binary Interface (ABI)
  • Application Programming Interface (API)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a simple batch system?

A

Early computers were really expensive, so we had simple batch systems which allowed users to submit jobs to a computer, which the computer would execute and would display results back to a monitor when finished.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the processor point of view?

A
  • The processor executes instructions from memory containing the monitor
  • Executes the instructions in the user program until it requires the ending or an error condition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are two modes of operation?

A
  • User mode

- Kernel Mode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the differences between user-mode and kernel-mode?

A
  • User program executes in user mode, vs a monitor executing a program in kernel mode.
  • User-mode priveledges prevents certain instructions from being executed, where as in kernel mode, any instruction may be executed
  • User-mode prevents certain areas of memory from being accessed whereas kernel mode does not.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Uniprogramming?

A

Uniprogramming is wehre the processor spends a certain amount of time executing, until it reaches an I/O instruction; it must then wait until that I/O instruction finishes before proceeding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Multiprogramming? Is it better than Uniprogramming?

A

When one job needs to wait for I/O to finish, the processor can switch to another job which is likely not waiting for I/O.

It is better than uniprogramming because it utilizes the processor better while waiting for an I/O operation to finish.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is time slicing?

A

Time slicing is where a short amount of time is allotted to a user or program on a multiprogramming or time shared system.

When it was time to switch, old user programs and data are written out to disk.

The old user prgoram code and data were restored in main memory when the program was next given a turn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a process?

A

There are multiple definitions of a process (any of them are fine):
- A program in execution

  • An instance of a running program
  • The entitty that can be assigned to, and executed on, a processor
  • A unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources.
  • Simply put, some sort of task, executed by a procesor.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 4 main causes of errors in an O.S?

A
  • Improper synchronization (Improper design of callbacks/signaling mechanisms can result in loss or duplication)
  • Nondeterminate program operation (order in which programs are scheduled may affect their outcome)
  • Failed mutual exclusion (when more than one user/program/thread attemps to make use of a shared resource at a time)
  • Deadlocks (two or more programs waiting on each other)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the 3 components of a process?

A
  • An executable program
  • The associated data needed by the program (variables, methods, etc)
  • The execution context (or “process state”) of the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is “Paging”?

A

Paging allows processes to be comprised of an umber of fixed-size blocks called pages.

A program references a word by means of a virtual address

  • Consists of a page number an offset within the page
  • Each page may be located anywhere in main memory
  • Provides for a dynamic mapping between the virtual address used in the program and a real (or physical) address in main memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What policies must resource allocation consider?

A
  • efficiency
  • fairness
  • differential responsiveness
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is multithreading?

A
  • Technique in which a process, executing an application, is divided into threads that can run concurrently.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a thread?

A
  • A dispatchable a unit of work
  • Includes a processor context and its own data area to enable subroutine branching
  • Executes sequentially and is interruptible
17
Q

What are the basic measures of a performant OS?

A
  • Reliability
  • Mean time to failure
  • Availability
18
Q

Explain the Client/Server model

A

Windows OS Services and applications are all structured using the client/server model.

That is, processes communicate with each other using RPC calls.

19
Q

What makes a traditional UNIX operating system bad for real-time processing?

A

The traditional UNIX system is a uniprocessor. This makes it bad for real-time programs because you cannot preempt the system in order to process the data streaming in.