Week 1 and 2 Flashcards

1
Q

What is an operating system?

A

A program that acts as an intermediary between a user and the computer hardware

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

Def: Resource Allocator

A

Manage and allocate resources. Provide a uniform interface to similar hardware.

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

Def: Control Program

A

Controls the execution of user programs. Controls operation of I/O devices (i.e. disk)

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

Def: Kernel mode

A

The one program running at all times. IPL - initial program load
- System operations including user requests

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

Single Program System vs. Multiprogram System

A

Single: Early batch mainframe system > pool of jobs each run sequentially, single process at a time. CPU is idle while waiting for I/O (waster cycles)

Multi: Later Batch Mainframe system, pool of jobs (more than one program in memory at a time) When one program is doing I/O, another gets the CPU

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

What are tightly coupled Parallel systems? advantages? symmetric vs asymmetric?

A

Processes share memory and I/O

Advantages: increased throughput, reliability

Symmetric: each processor identical, process run on whatever processor is available (may one on more than one during its lifetime)

Asymmetric: Master-slave relationship

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

What are distributed systems? Advantage?

A

Distribute computation among several processors (loosely coupled > each process has own memory, I/O devices, communication infrastructure)

Advantages: resource sharing/ load sharing, reliability

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

Hard real-time systems vs Soft real-time systems?

A

Hard: hard limits that must be met or the system fails

Soft: A missed deadline does not mean system failure, but value of result decreases with time

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

Def: Interrupts

A

Can happen at any time

  • Suspends execution of the current program (saves current execution location)
  • Transfers control to the interrupt routine
  • Determines which controller generated the interrupt (polling, vectored Interrupts)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Def: Traps

A

Traps are like interrupts, but are generated by the program execution (i.e. Divide by zero)

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

What is the difference between a Synchronous I/O and an Asynchronous?

A

Synchronous: control returns to program only after I/O is complete, common in multi user systems

Asynchronous: return directly to program, common in single user system

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

Def: Main Memory

A

memory CPU can access directly

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

Def: Secondary storage

A
  • large nonvolatile storage

- hard disks in the middle

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

Def: Cache

A

Very high-speed memory that sits between a processor and main memory. Used to hold recent memory values.

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

What are the three types of Hardware protection?

A
Memory protection (user limited to memory allocated for its process) 
I/O Protection (can only have access if in kernel mode - requires special access) 
CPU Protection (Way for all programs to use CPU without it disturbing anything aka cooperative multitasking)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Def: User Mode

A

user program doing user computation

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

Def: Process

A

A program in execution and all of the required resources to run that instance of the program

18
Q

What are some OS activities?

A
  • Process creation and deletion
  • Suspension and resumption
  • Synchronization and communication
  • allocation/ deallocating and keeping track of memory
  • deciding which process to load
19
Q

Def: Memory

A

a continuous sequence of bytes each of which has own address

20
Q

Def: File

A

A collection of related information (can be structured or unstructured)

21
Q

What is I/O management?

A

Hide specifics of devices behind device drivers

22
Q

What is the command interpreter?

A
  • user interface
  • accepts commands and executes them
  • sometimes built into the system and sometimes separate
23
Q

What are system calls?

A

The interface between the running process and the operating system (like most function calls take an argument and return a value)

24
Q

What are the three communication models?

A
  1. Interprocess communication (mechanism an os provides to allow processes to manage shared data - other processes need to communicate)
  2. Message Model (Os system provides message passing facility)
  3. Shared memory model (Both processes access same memory)
25
Q

Def: virtualization

A

multiprocessing creates the illusion that there is more than one CPU

26
Q

What is the PCB?

A

Process Control Block: Repository for information that varies from process to process

  • one allocated for each process and sometimes each thread
  • (some operating systems have a pre-allocated number of them, that is an array)
27
Q

Def: Context Switch

A

Utilizes the PCB to switch between processes due to an interrupt or system call

28
Q

Def: Ready Queue, device Queue, suspend Queue

A

Ready Queue: All process ready to run
Device Queue: All process waiting for I/O
Suspend Queue: All process that have been suspended

29
Q

True or False: Processors on the Wait Queue are waiting Queue are waiting for the CPU

A

False: processes on the Wait Queue are waiting for I/O to complete

30
Q

Independent processes vs cooperating processes?

A

Independent processes cannot affect or be affected by other processes

Cooperating processes can affect or be affected by other processes (ex: producer generates info that is passed to a consumer process)

31
Q

Unbound buffer vs bounded buffer?

A

Unbound: assumes no bounds on size of buffer used to share data - sender never needs to wait (resource intensive, no guaranteed delivery)

Bounded: there is a limit - sender may need to wait or abandon message

32
Q

What is interprocess communication?

A

Mechanism for processes to communicate and synchronize their actions

33
Q

What is Direct communication? Advantages/ Disadvantages?

A

Processes explicitly identify each other

adv: simple to implement
dis: processors have to identify each other (has to be some other file you read with processor id)

34
Q

What is indirect communication? Advantages/ Disadvantages?

A

Mailboxes (each mailbox has a unique id, processes share mailboxes)
Only 1 process to read mailbox, first come - first serve- multiple receivers

adv: don’t have to know id of other process, can preconfigure which mailbox used and everyone uses it, mailbox gets mail and don’t need to know whos picking up mail
dis: more complex/ harder to implement (need to build storage system where processors can communicate)

35
Q

What are threads?

A

Lightweight processes

36
Q

What are user threads? Adv? Dis?

A

Threads implemented by a library (os is unaware of)

adv: fast, no system call, simple scheduling
dis: one thread blocks (I/O, IPC) all threads block, no multiprocessing support

37
Q

What are kernel threads? Adv? Dis?

A

Threads provided by the operating system (only diff from user is in context switch and killing a given process kills all threads)

adv: OS only blocks threads doing a system call, MP support
dis: not as fast as user level threads, resource intensive

38
Q

What are the three thread models?

A

Many to one (all threads mapped to a single kernel thread)
One to one (each program level thread gets a kernel thread)
Many to many (limit the number of kernel threads so still more program level then kernel)

39
Q

What is the race condition?

A

to do with process synchronization

  • several processes handle shared resources
  • final value depends on who finsihes first

To prevent concurrent processes must be synchronized)

40
Q

Def: Critical sections

A

several processes competing for access to some shared data (the sections of data where the shared data is accessed/ modified) - each process has its own

41
Q

What are the 3 critical section requirements?

A
  1. Mutual Exclusion - only one
  2. Progress - if there is no process in a critical section, and more than one process wants to enter their critical section, then the selection of the process cannot be postponed indefinitely
  3. Bounded Waiting - once a process is waiting, the other process can only enter and leave a bounded number of times (no starvation)