Lecture 1 - OS Introduction Flashcards

1
Q

Is there an agreed upon definition of OS?

A

No.

Everything a vendor ships when you order an operating system”

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

How would you define kernel in layman terms?

A

“The one program running at all times on the computer”

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

System program

A

A program that ships with the operating system, but isn’t part of the kernel

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

Application program

A

All programs not associated with operating system

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

Two drivers of OS evolution

A

Cost of Computers

Cost of People

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

3 Major OS functions

A
  1. Control access and provide interfaces
    * To the OS and devices attached to the system
    * Provide interfaces for human-machine and machine-machine transactions
  2. Manage resources
    * Mediate resource usage among different tasks
    * Implement policies
  3. Provide abstractions
    * Hide the peculiarities of the hardware.
    * Example: device independent I/O
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Bus

A

Common memory access pathway for all device controllers and CPUs.

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

Can I/O devices and CPU execute concurrently?

A

Yes

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

3 characteristics of device controllers

A
  1. In charge of a particular device type
  2. Has local buffer
  3. each type has a operating system device driver to manage it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Relationship between CPU and device controller local buffer

A

CPU moves data from/to main memory to/from local buffers

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

Who causes an interrupt? Who does it inform?

A

Device controller

CPU

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

Interrupt vector

A

Contains the addresses of all service routines

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

Who does the interrupt transfer control to?

A

Interrupt service routine

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

Who saves the address of interrupt instruction?

A

The interrupt architecture implementation

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

Trap or Exception

A

Software-generated interrupt caused either by an error or a user request

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

Who’s interrupt driven?

A

the OS kernel

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

How does the OS preserve the state of CPU?

A

by storing registers and the program counter

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

Who does the CPU transfer control to after receiving interrupt?

A

Interrupt handler

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

How does Synchronous I/O work?

A

After I/O starts, control returns to user program only upon I/O completion (Synchronous)

  • > Wait instruction idles the CPU until the next interrupt
  • > Wait loop (contention for memory access)
  • > At most one I/O request is outstanding at a time, no simultaneous I/O processing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How does Asynchronous I/O work?

A

After I/O starts, control returns to user program without waiting for I/O completion (Asynchronous)

  • > System call –request to the OS to allow user to wait for I/O completion
  • > Device-status table contains entry for each I/O device indicating its type, address, and state
  • > OS indexes into I/O device table to determine device status and to modify table entry to include interrupt
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

System call

A

Request for operating system service

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

Device-status table

A

Contains entry for each I/O device indicating its type, address, and state

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

Main Memory definition.

And 3 properties

A

Only large storage media that the CPU can access directly

  1. Random access
  2. Typically volatile
  3. Typically random-access memory in the form of Dynamic Random-access Memory (DRAM)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Secondary Storage

2 types

A

Eextension of main memory that provides large nonvolatile storage capacity

  1. Hard Disk Drives (HDD) –rigid metal or glass platters covered with magnetic recording material
  2. Non-volatile memory (NVM) devices–faster than hard disks, nonvolatile
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

3 Storage system hierarchy heuristics

A

Speed
Cost
Volatility

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

Caching

A

Copying information into faster storage system; main memory can be viewed as a cache for secondary storage

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

Device Driver

A

Provides uniform interface between controller and kernel.

One for each device controller to manage I/O

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

7 elements of Storage device hierarchy from smaller to larger

A
Primary (volatile)
1. Registers
2. Cache
3. Main memory
Secondary (nonvolatile)
4. Non-volatile memory
5. HDD
Tertiary storage (nonvolatile)
6. Optical disk
7. Magnetic tapes
29
Q

Direct Memory Access

A

Used for high-speed I/O devices able to transmit information at close to memory speeds
Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention
Only one interrupt is generated per block, rather than the one interrupt per byte

30
Q

3 Multiprocessors Advantages (Also known as parallel systems, tightly-coupled systems)

A
  1. Increased throughput
  2. Economy of scale
  3. Increased reliability –graceful degradation or fault tolerance
31
Q

2 Types of multiprocessors

A
  1. Asymmetric Multiprocessing –each processor is assigned a special task.
  2. Symmetric Multiprocessing –each processor performs all tasks
32
Q

Non-Uniform Memory Access System

A

Each CPU has its own memory

33
Q

Clustered systems, benefits

A

Multiple systems working together.

High-availability service which survives failures

34
Q

Storage-area network (SAN)

A

Storage sharing network between clustered systems

35
Q

Difference between Asymmetric and Symmetric clustering

A

Asymmetric clustering has one machine in hot-standby mode

Symmetric clustering has multiple nodes running applications, monitoring each other

36
Q

High-performance computing (HPC

A

Use of clusters, where applications must be written to use parallelization

37
Q

Distributed lock manager (DLM)

A

Function of Clusters that avoids conflicting operations

38
Q

Bootstrap program

A

Simple code to initialize the system, load the kernel

39
Q

System daemons

A

Services provided outside of the kernel

40
Q

2 sources of interrupts to kernel

A
  1. Hardware devices

2. Software (exception or trap

41
Q

3 reasons for software interrupts

A
  1. Software error (e.g., division by zero)
  2. Request for operating system service –system call 3. Other process problems include infinite loop, processes modifying each other or the operating system
42
Q

Multiprogramming (batch system) benefit +

5 Properties

A

Efficiency

  1. Single user cannot keep CPU and I/O devices busy at all times
  2. Multiprogramming organizes jobs (code and data) so CPU always has one to execute
  3. A subset of total jobs in system is kept in memory
  4. One job selected and run via job scheduling
  5. When it has to wait (for I/O for example), OS switches to another job
43
Q

Job scheduling

A

Function by which multiprogramming systems select jobs.

44
Q

Timesharing (multitasking) +

5 properties

A

Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing.

  1. Response time should be < 1 second
  2. Each user has at least one program executing in memory (process)
  3. If several jobs ready to run at the same time (CPU scheduling)
  4. If processes don’t fit in memory, swapping moves them in and out to run
  5. Virtual memory allows execution of processes not completely in memory
45
Q

Swapping in Multitasking

A

If processes don’t fit in memory, swapping moves them in and out to run

46
Q

Virtual memory in Multitasking

A

Allows execution of processes not completely in memory

47
Q

Memory Layout for Multiprogrammed System

A
OS
Process 1
Process 2
Process 3
Process 4
48
Q

Dual-mode benefits

A

Dual mode (User mode and kernel mode) operation allows OS to protect itself and other system components

49
Q

Mode bit provided by hardware

3 functions

A
  1. Provides ability to distinguish when system is running user code or kernel code
  2. Some instructions designated as privileged, only executable in kernel mode
  3. System call changes mode to kernel, return from call resets it to user
50
Q

Multi-mode operations

A

Virtual machine manager (VMM) mode for guest VMs

51
Q

5 steps of system call processing

A
  1. System service is requested (system call)
  2. Switch mode; verify arguments and service from system call table
  3. branch to the service function via system call table
  4. return from service function; switch mode
  5. return from system call
52
Q

Process

A

Program in execution. An active entity.

53
Q

Resources needed by process to accomplish task

A
  • CPU, memory, I/O, files

* Initialization data

54
Q

How many program counter does a Multi-threaded process have?

A

one per thread

55
Q

Program counter

A

Process function specifying location of next instruction to execute. Process executes instructions sequentially, one at a time, until completion.

56
Q

Concurrency

A

Multiplexing the CPUs among the processes / threads

57
Q

5 OS responsibilities of process management

A
  • Creating and deleting both user and system processes
  • Suspending and resuming processes
  • Providing mechanisms for process synchronization
  • Providing mechanisms for process communication
  • Providing mechanisms for deadlock handling
58
Q

Dispatcher

A

Runs the next process in the ready queue on the CPU

59
Q

Memory management role

A

Determines what is in memory and when

Optimizing CPU utilization and computer response to users

60
Q

Why is memory important for program execution?

A

To execute a program all (or part) of the instructions must be in memory
All (or part) of the data that is needed by the program must be in memory

61
Q

3 Memory management activities

A
  1. Keeping track of which parts of memory are currently being used and by whom
  2. Deciding which processes (or parts thereof) and data to move into and out of memory
  3. Allocating and deallocating memory space as needed
62
Q

File-system

A

OS provides uniform, logical view of information storage through the File system.

63
Q

File-System management

A

Files usually organized into directories

Access control on most systems to determine who can access what

64
Q

4 OS files system activities

A
  1. Creating and deleting files and directories
  2. Primitives to manipulate files and directories
  3. Mapping files onto secondary storage
  4. Backup files onto stable (non-volatile) storage media
65
Q

Why is Mass Storage Management needed?

A

Entire speed of computer operation hinges on disk subsystem and its algorithms

66
Q

6 OS Mass Storage Management activities

A

OS activities

  1. Mounting and unmounting
  2. Free-space management
  3. Storage allocation
  4. Disk scheduling
  5. Partitioning
  6. Protection
67
Q

UNIX limitation

A

Limited by hardware functionality, the original UNIX operating system had limited structuring.

68
Q

What does the UNIX kernel consist of?

What are some of its functions

A

Consists of everything below the system-call interface and above the physical hardware

Provides the file system, CPU scheduling, memory management, and other operating-system functions; a large number of functions for one level

69
Q

2 possible OS architectures

A

Layered

Microkernel