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
3 Storage system hierarchy heuristics
Speed Cost Volatility
26
Caching
Copying information into faster storage system; main memory can be viewed as a cache for secondary storage
27
Device Driver
Provides uniform interface between controller and kernel. | One for each device controller to manage I/O
28
7 elements of Storage device hierarchy from smaller to larger
``` 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
Direct Memory Access
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
3 Multiprocessors Advantages (Also known as parallel systems, tightly-coupled systems)
1. Increased throughput 2. Economy of scale 3. Increased reliability –graceful degradation or fault tolerance
31
2 Types of multiprocessors
1. Asymmetric Multiprocessing –each processor is assigned a special task. 2. Symmetric Multiprocessing –each processor performs all tasks
32
Non-Uniform Memory Access System
Each CPU has its own memory
33
Clustered systems, benefits
Multiple systems working together. | High-availability service which survives failures
34
Storage-area network (SAN)
Storage sharing network between clustered systems
35
Difference between Asymmetric and Symmetric clustering
Asymmetric clustering has one machine in hot-standby mode | Symmetric clustering has multiple nodes running applications, monitoring each other
36
High-performance computing (HPC
Use of clusters, where applications must be written to use parallelization
37
Distributed lock manager (DLM)
Function of Clusters that avoids conflicting operations
38
Bootstrap program
Simple code to initialize the system, load the kernel
39
System daemons
Services provided outside of the kernel
40
2 sources of interrupts to kernel
1. Hardware devices | 2. Software (exception or trap
41
3 reasons for software interrupts
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
Multiprogramming (batch system) benefit + | 5 Properties
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
Job scheduling
Function by which multiprogramming systems select jobs.
44
Timesharing (multitasking) + | 5 properties
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
Swapping in Multitasking
If processes don’t fit in memory, swapping moves them in and out to run
46
Virtual memory in Multitasking
Allows execution of processes not completely in memory
47
Memory Layout for Multiprogrammed System
``` OS Process 1 Process 2 Process 3 Process 4 ```
48
Dual-mode benefits
Dual mode (User mode and kernel mode) operation allows OS to protect itself and other system components
49
Mode bit provided by hardware | 3 functions
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
Multi-mode operations
Virtual machine manager (VMM) mode for guest VMs
51
5 steps of system call processing
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
Process
Program in execution. An active entity.
53
Resources needed by process to accomplish task
* CPU, memory, I/O, files | * Initialization data
54
How many program counter does a Multi-threaded process have?
one per thread
55
Program counter
Process function specifying location of next instruction to execute. Process executes instructions sequentially, one at a time, until completion.
56
Concurrency
Multiplexing the CPUs among the processes / threads
57
5 OS responsibilities of process management
* 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
Dispatcher
Runs the next process in the ready queue on the CPU
59
Memory management role
Determines what is in memory and when | Optimizing CPU utilization and computer response to users
60
Why is memory important for program execution?
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
3 Memory management activities
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
File-system
OS provides uniform, logical view of information storage through the File system.
63
File-System management
Files usually organized into directories | Access control on most systems to determine who can access what
64
4 OS files system activities
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
Why is Mass Storage Management needed?
Entire speed of computer operation hinges on disk subsystem and its algorithms
66
6 OS Mass Storage Management activities
OS activities 1. Mounting and unmounting 2. Free-space management 3. Storage allocation 4. Disk scheduling 5. Partitioning 6. Protection
67
UNIX limitation
Limited by hardware functionality, the original UNIX operating system had limited structuring.
68
What does the UNIX kernel consist of? | What are some of its functions
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
2 possible OS architectures
Layered | Microkernel