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
Q

What category of I/O device is a USB key?

A

Machine readable

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

What are the 3 methods of performing I/O?

A
  1. Programmed IO
  2. Interrupt-driven IO
  3. Direct Memory Access (DMA)
27
Q

What are the similarities/differences between programmed IO and interrupt-driven IO

A
  • 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
Q

What is a block-oriented device?

A

A device that stores dara in fixed size blocks and transfers one block at at time

29
Q

What is a stream-oriented device?

A

A device that stores and transfers data as a stream of bytes

30
Q

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)

A

69 + 820 milliseconds

31
Q

What is the advantage of using a double buffer?

A

A process can transfer to/from one buffer while the OS empties/fills the other buffer

32
Q

What is striping?

A

A scheme where data is distirbuted across physical drives

33
Q

What are the potential benefits of RAID?

A
  • 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
Q

What are the potential drawbacks of RAID?

A
  • cost due to duplication (especially RAID 1)

- write penalties (updating an entry also requires updating parity bit(s) - especially RAID 6)

35
Q

Which RAID method has the fastest performance?

A

RAID 0 - no redundancy or parity bits

36
Q

Which RAID method has the highest data availability?

A

RAID 6 - 2 parity calculations stored on different disks

37
Q

Where is cache memory located?

A

Interposed between processor and main memory

38
Q

What is contained in the disk cache?

A

Copies of some of the sectors on the disk

39
Q

What are desirable properties of a file?

A

Long-term existence
Shareable between process
Can be structured (file hierarchy)

40
Q

What actions can a user with Knowledge access rights to a file take?

A

They can see the file and its owner, and can petition the owner for additonal access rights

41
Q

In hard disk organization, what is the difference between constant angular velocity and multiple zoned recording?

A

constant angular velocity: equal # of sectors / track

multiple-zoned recording: higher # of sectors in outer tracks

42
Q

What are the differences between hard errors and soft errors in memory?

A

Hard error: bits are stuck at 0 or 1

Soft error: bits are changed by transient, random events

43
Q

T/F: In a parity scheme using Hamming code, the sum of the shared cells must be odd

A

False: the sum must be even

44
Q

T/F: Hamming code can be used to correct 2-bit errors

A

No - it cannot detect 2 bit errors - Dangerous!

45
Q

What are the advantages of a virtualization?

A
  • reduces physical hardware
  • load balancing
  • flexible capacity
  • responsiveness
46
Q

What is the consolidation ratio for a hypervisor?

A

How many guests one host can support

47
Q

What are the advantages of a “fat” hypervisor?

A
  • platform flexibility

- rapid development

48
Q

What are the advantages of a “thin” supervisor?

A
  • 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
Q

What are the pros and cons of adapting an OS, rather than purpose-building an emebedded OS?

A

Pro for adapting: familiar interface

Con for adapting: not optimized for real-time / embedded apllications, performance is compromised

50
Q

In a cooperative processing distributed system, where is application logic handled?

A

On both the client and the server

51
Q

In a client-based processing distributed system, where is application logic handled?

A

On the client side

52
Q

In a client-based processing distributed system, where is database logic handled?

A

On both the client and the server

53
Q

In a host-based processing distributed system, where is presentation logic handled?

A

On the server side

54
Q

In a distributed system, where is the middleware located?

A

Between the application and communications system

55
Q

What are the benefit of clusters, in a distributed system?

A
  • absolute scalability (manage many nodes)
  • incremental scalability (easy to add a node)
  • high availability (low failure rate)
  • superior performance/price
56
Q

How does the Kernel in an embedded system deal with timing constraints?

A

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
Q

HAL is?

A

Hardware Abstraction Layer:
Presents consistent API to upper layers and maps upper-layer operations onto specific hardware platforms.
Hardware Specific

58
Q

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)

A

0SIFS + 0DIFS + 3.824332 Ether as gas

59
Q

eCOS satisfies these 4 main objectives (Kernel Design: embedded systems)

A
Low interrupt latency
Low task switching latency
Small memory footprint
Deterministic behavior (Kernel has predictable performance)
60
Q

TinyOS Goals

A
high concurrency 
operate with limited resources
adapt to hardware evolution
be robust
support a wide range of applications
61
Q

Is eCos free

A

hell to the yeah. No royalties, open source

62
Q

What is 2+2?

A

4 + 820 milliseconds

63
Q

What is 2+2?

A

quick maths