Final (cumulative) Flashcards

1
Q

What is batch programming?

A

A way of executing programs such that each program is completed before the next starts

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

What is a multiprogramming batch?

A

Program B is scheduled to run while program A waits for I/O

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

What are the 2 steps of instruction execution for a program?

A
  1. Processor fetches instructions from memory

2. Processor executes each instruction

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

What are the 4 classes of interrupts?

A

Program, Timer, I/O, Hardware failure

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

What are the 3 components of a process?

A

An executable program, data needed by the program, the execution context (process state) of the program

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

What does the execution context of a program contain?

A

-data by which the OS is able to supertivse and control the process: content of process registers, priority of process

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

What is the dispatcher?

A

A small program that switches the processor from one process to another

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

What are the states in the two-state process model?

A

Running, not running

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

What are the states in the five-state process model?

A

New, Ready, Running, blocked, exit

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

What are the benefits of threads?

A

Takes less time to create, terminate, and switch between threads than processes
-enhance efficiency in communications between programs

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

What are the possible states of a thread?

A

Ready, Running, Blocked

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

What are the advantages of user level threads?

A
  • switching does not require kernel mode privileges
  • scheduling can be application specific
  • can run on any OS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can you overcome the disdvantages of ULT?

A
  • Jacketing: turn blocking system calls into non-blocking calls
  • Write application as multiple processes rather than threads
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the advantages of kernel-level threads?

A
  • can simultaneously schedule miltiple threads from 1 process on multiple processors
  • if one thread in process is blocked, kernel can schedule another thread of the same process
  • routines can be multithreaded
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an I/O constrained task?

A

A task that is slow because it is waiting for something (user input, communication, completion of ther job, etc)

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

What is a computationally heavy tast?

A

A task that takes a long time

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

When will a blocked process be suspended?

A

When no processes in main memory are ready, the OS swaps a blocked process onto disk into suspended queue

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

What are the two characteristics of a process?

A
  • Resource ownership: virtual address space to hold process image
  • Scheduling/execution: follows execution path interleaved with other processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the different schemes used to prevent deadlock?

A
  • Request all resources at once
  • Preemption
  • Resource Ordering
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the conditions required for deadlock?

A

Mutual exclusion, hold-and-wait, no preemption, circular wait

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

What info must be stored and replaced during a context switch?

A

Stack, page table, program counter, CPU registers

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

What are the reasons for process creation?

A
  • New batch job
  • Interactive logon
  • Created by OS to provide a service
  • Spawned by existing process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

(T/F) All threads of a process have a unique address space?

A

False

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

What are the 3 categories of I/O devices?

A
  • Human readable
  • Machine readable
  • Communication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What category of I/O device is a USB key?
Machine readable
26
What are the 3 methods of performing I/O?
1. Programmed IO 2. Interrupt-driven IO 3. Direct Memory Access (DMA)
27
What are the similarities/differences between programmed IO and interrupt-driven IO
- Similarity: starts by processor issuing an IO command - Difference: - In programmed IO, the process then waits for the IO to complete - In interrupt driven, if the IO command is blocking, the OS blocks the current process and schedules another (If command is non-blocking, process continues execution)
28
What is a block-oriented device?
A device that stores dara in fixed size blocks and transfers one block at at time
29
What is a stream-oriented device?
A device that stores and transfers data as a stream of bytes
30
How many context switches does an artifact need in order for an Apache register to packet-forward an inner-join query? (Give your answer in terms of DIFS and SIFS)
69 + 820 milliseconds
31
What is the advantage of using a double buffer?
A process can transfer to/from one buffer while the OS empties/fills the other buffer
32
What is striping?
A scheme where data is distirbuted across physical drives
33
What are the potential benefits of RAID?
- high data availability (can still access data if drive(s) fail) - seperate IO requests can be handled in parallel if data is on seperate disks, which are viewed by the OS as a single drive
34
What are the potential drawbacks of RAID?
- cost due to duplication (especially RAID 1) | - write penalties (updating an entry also requires updating parity bit(s) - especially RAID 6)
35
Which RAID method has the fastest performance?
RAID 0 - no redundancy or parity bits
36
Which RAID method has the highest data availability?
RAID 6 - 2 parity calculations stored on different disks
37
Where is cache memory located?
Interposed between processor and main memory
38
What is contained in the disk cache?
Copies of some of the sectors on the disk
39
What are desirable properties of a file?
Long-term existence Shareable between process Can be structured (file hierarchy)
40
What actions can a user with Knowledge access rights to a file take?
They can see the file and its owner, and can petition the owner for additonal access rights
41
In hard disk organization, what is the difference between constant angular velocity and multiple zoned recording?
constant angular velocity: equal # of sectors / track | multiple-zoned recording: higher # of sectors in outer tracks
42
What are the differences between hard errors and soft errors in memory?
Hard error: bits are stuck at 0 or 1 | Soft error: bits are changed by transient, random events
43
T/F: In a parity scheme using Hamming code, the sum of the shared cells must be odd
False: the sum must be even
44
T/F: Hamming code can be used to correct 2-bit errors
No - it cannot detect 2 bit errors - Dangerous!
45
What are the advantages of a virtualization?
- reduces physical hardware - load balancing - flexible capacity - responsiveness
46
What is the consolidation ratio for a hypervisor?
How many guests one host can support
47
What are the advantages of a "fat" hypervisor?
- platform flexibility | - rapid development
48
What are the advantages of a "thin" supervisor?
- direct guest access to hardware, therefore higher performance - no resources are consumed by OS, allowing for more guests - no chance of security problems infecting the OS and transmitting to other guests
49
What are the pros and cons of adapting an OS, rather than purpose-building an emebedded OS?
Pro for adapting: familiar interface | Con for adapting: not optimized for real-time / embedded apllications, performance is compromised
50
In a cooperative processing distributed system, where is application logic handled?
On both the client and the server
51
In a client-based processing distributed system, where is application logic handled?
On the client side
52
In a client-based processing distributed system, where is database logic handled?
On both the client and the server
53
In a host-based processing distributed system, where is presentation logic handled?
On the server side
54
In a distributed system, where is the middleware located?
Between the application and communications system
55
What are the benefit of clusters, in a distributed system?
- absolute scalability (manage many nodes) - incremental scalability (easy to add a node) - high availability (low failure rate) - superior performance/price
56
How does the Kernel in an embedded system deal with timing constraints?
Providing bounded execution time for primitives maintain a real-time clock provide special alarms and timeouts support real-time queuing disciplines provides primitives to delay processing by a fixed amount of time and suspend/resume execution
57
HAL is?
Hardware Abstraction Layer: Presents consistent API to upper layers and maps upper-layer operations onto specific hardware platforms. Hardware Specific
58
What is the latency of 32 Kernel to UI thread switches on an AWS server running a painfully simple chatroom. (Answer in terms of DIFS and SIFS)
0SIFS + 0DIFS + 3.824332 Ether as gas
59
eCOS satisfies these 4 main objectives (Kernel Design: embedded systems)
``` Low interrupt latency Low task switching latency Small memory footprint Deterministic behavior (Kernel has predictable performance) ```
60
TinyOS Goals
``` high concurrency operate with limited resources adapt to hardware evolution be robust support a wide range of applications ```
61
Is eCos free
hell to the yeah. No royalties, open source
62
What is 2+2?
4 + 820 milliseconds
63
What is 2+2?
quick maths