Mid-Term Flashcards

1
Q

Traps and interrupts are very similar; name one thing that makes interrupts different from traps in the way they are handled.

A

anything from this list:

  • interrupts have priorities, traps do not
  • traps are processed immediately when they occur, interrupts are deferred until the current instruction finishes
  • an interrupted process often resumes, but it is rare for a process that experienced a trap to resumeDefinition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Arrange in order from longest latency to shortest (i.e., slowest access time to fastest), making sure to indicate which is fastest:.
optical disk, register,RAM/main memory, magnetic disk, cache

A
from slowest (longest latency) to fastest (shortest latency):
optical disk, magnetic disk, RAM/main memory, cache, register
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Having detected deadlock, briefly describe two strategies that can be used to correct the problem.

A

two from:

  • delete all deadlocked processes
  • delete deadlocked processes one by one until deadlock is gone
  • roll deadlocked processes back to a previous checkpoint and allow them to move forward again from that point
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Briefly explain what makes a master/slave multiprocessor different from asymmetric multiprocessor

A

In master/slave, only the master can perform system call code: every process needing to perform a system call, no matter what cpu it runs on, must wait for the master cpu to perform the system call. Since this is a simple extension of normal single-processor systems, master/slave systems are easier to build. In a symmetric multiprocessor, any processor can perform a system call, so there is no bottleneck at a master cpu. Synchronization across processors is much harder with symmetric multiprocessors.

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

Handling a page fault requires that the missing page to be located on disk and loaded into memory. The wait for this operation is overwhelmingly dominated by the time the disk takes to respond. Briefly describe a situation in which the waiting time (time from when page faultoccurs to when the page is available in memory for use) may be twice as long as what is
described here.

A

The waiting time for resolution of a page fault is primarily the time it takes to get the page from the disk (rotational and seek delays drive this delay). The delay may be twice as long if no memory frames were available to hold the newly sought page and no page in any frame is unmodified, meaning that a page must first be written out to disk before a frame is available to hold the new page. Recall that writing to
disks is slower than reading (but still overwhelmingly dominated by rotational and seek delays).

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

What does the term cache-hit ratio tell you?

A

The cache hit ratio is the ratio of the number of times a memory location is referenced and is successfully found to be in the cache (a cache hit) to the total number of memory references. [remember: a ratio is a comparison of something to something else]

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

Data structure where OS keeps administrative & status information about a process:

A

PCB

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

Number of pages of a process that may appear in a frame of memory at a time

A

1

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

Part of the OS always resident in memory

A

kernel

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

What you get when you cannot find a page table entry for a page

A

page fault

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

An executable image of a program suitable for loading into memory to be run is a

A

load module

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

The time between a user submitting a request and the start of some response is

A

response time

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

Special associative cache memory used to speed up page table look-ups

A

TLB (translate lookaside buffer)

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

Fixed partition allocation schemes suffer from ______ fragmentation

A

internal

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

The only tool that comes standard with Windows for pure plain text editing

A

notepad

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

A synchronization technique that works in all combinations of single/multiple CPU with single/multiple memories

A

message passing

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

The set of pages of a process present in real memory is the ______ set.

A

resident

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

Part of computer that mediates movement of data between CPU and other system components like memory and peripherals:

A

bus

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

To create a new process in any Unix style system, first use a _____ system call

A

fork

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

If, on a virtual Windows machine, a user creates and saves 10 new files, how many of these new files are added as new files to what already appears on the hosting system:

A

0

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

Peripheral devices may be operated using a polling technique, or using _______

A

interrupts

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

Suppose a system uses 512-byte pages: how many address bits are needed for the offset onto a page (hint: 1024 = 2^10):

A

9

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

An area of code that must not be simultaneously accessed by more than one process is a _______

A

critical section

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

A hardware instruction to support mutual exclusion ______

A

one of tx, exch

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

Adding more frames of memory always improves page fault behaviour (i.e., reduces number of page faults).

A

false

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

An OS only works when directly controlling real hardware

A

false

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

Semaphores fail to work as asynchronization mechanism on systemswith multiple CPUs and one shared memory.

A

false

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

Most practical OS simply ignore the possibility of deadlock.

A

true

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

Generally,the faster the memory(lower latency), the more expensive it is.

A

true

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

All resources managed by a computer are hardware resources.

A

false

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

The only resource given up by a blocked process is the CPU.

A

true

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

The use of unequal-sized fixed partitions fails to resolve the fragmentation problem

A

true

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

Every UNIX/linux process (except one) is a child of some parent process.

A

true

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

Swapping a process out of memory moves part or all of the process.

A

false

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

Round robin scheduling degrades to FIFO if the timeslice becomes too long.

A

true

36
Q

Paging space in a virtual memory system should always be set to the same size as the amount of physical memory in the system.

A

false

37
Q

Cache coherency on multi-processor systems sharing a single memory is much harder to maintain than on a uni-processor.

A

true

38
Q

In providing a mutual exclusion mechanism, weassume that fast runningprocesses do not cause problems.

A

false

39
Q

Using virtual memory allows us to put only part of a program into memory at a time.

A

true

40
Q

Dynamic address translation does not work on systems with a cache memory.

A

false

41
Q

A runnable process will never be swapped out while it remains runnable.

A

false

42
Q

Disabling mutual exclusion in an OS is a normal and widely used way to prevent deadlock.

A

false

43
Q

Virtual memorysystems should not be used for real-time applications.

A

true

44
Q

Processes than can no longer make use of the CPU become blocked until they can again make use of the CPU.

A

true

45
Q

Semaphores are a software mechanism designed to provide mutual exclusion. Name and briefly describe the three operations that can be performed on a semaphore.

A

Three operations on semaphores:

(1) initialize: initialize the semaphore counter to some integer value
(2) wait: decrement the semaphore counter by one: if it is now < 0, suspend the process and place it in this semaphore's queue.
(3) signal: increment the semaphore counter by one: if it is now <= 0, select some process from the semaphore's queue to be resumed.
46
Q

You note that a computer system is not using its CPU very much, so you arrange to run more processes on it, hoping to keep the CPU busier. As you increase the number of processes on this system you observe that performance becomes drastically worse after a certain point: all processes start taking much longer to run. Up to this point, you discovered that the CPU was,at most, busy 30% of the time running your processes.After this point, that number becomes 0.2%. What do you suspect the problem to be? A manager suggests to you that you should get a faster CPU for the computer: would this help? briefly explain why or why not.

A

The problem is that the system has begun thrashing: spending more time resolving page faults than advancing processes toward completion. A faster CPU will accomplish nothing: the current, presumably slower, CPU wasn’t fully occupied. The problem is related to availability of real memory, not lack of CPU speed.

47
Q

FIFO
pre-emptive
favourable
unfavourable

A

FIFO is not pre-emptive,
is favourable to long running jobs,
is unfavourable for short jobs

48
Q

Round Robin
Pre-Emptive?
Favourable?
Unfavourable?

A

Round Robin
Pre-Emptive?
Favourable?
Unfavourable?

49
Q

Data <> Information

A

Computers work on, and networks move data

Humans create information from the data they see

50
Q

IT then is the study of a dynamic system consisting of:

Information and infrastructure

A

Hardware,
Software,
Firmware, and
People.

51
Q

Information Technology (IT)

A

includes hardware, software,

firmware, people and data / information / knowledge.

52
Q

what is a computer

A

Today the term more typically refers to
an electronic device for storing and processing data,
typically in binary form,
according to instructions given to it in a variable program

53
Q

Common Computer features

A
CPU
Bus(es)
Memory
Data store
I/O Capabilities: network, user input, user output, ....
Power source
54
Q

Memory

A

Place to hold a value (data or instruction) while it is worked on or until it is needed to be worked on

55
Q

Memory Address

A

Each place in memory has an address which uniquely identifies it

56
Q

How high are the typically cache hit ratios

A

95% or better

57
Q

Input devices types of interrupt

A

Polled

Interrupt: these have different prorities

58
Q

DMA

A

Direct memory access, smart devices are capable of interacting with the BUS, only for short amount of time

59
Q

CPU Life

A
  1. Fetch word from memory pointed at by PC
  2. Decode word as instruction
  3. Fetch any operand(s) instruction needs
  4. Execute the instruction
  5. Update status flags as consequence (e.g., NZVC)
  6. Store any result(s)
60
Q

Dealing with errors

A

trap. Instant, must be dealt with as they occur

61
Q

OS

A

Manages resources of computer to provide an enviroment for processes to run

62
Q

OS Needs

A

OS must be resident at all times, the kernel

-Load into memoery, interrupt and trap handlers

63
Q

Simple OS

A

Runes one program at a time

64
Q

Multi-tasking OS

A

Illusion of running mroe than 1 task at a time,

  • memory management
  • schedulig,
  • Communication: task may interact
65
Q

Multi-User and Multi-Tasking

A

Single-user, multi-tasking

Multi-user, single-tasking

66
Q

Dynamic partitioning

A

First first
Best fit
Next fit
Worst fit

67
Q

OS Non-physical resources

A

queues, files and caches

68
Q

Process needs

A

At least one CPU to execute its instructions
Memory to hold instructions and data (operands)
Access to input/output devices

69
Q

Processes and memory

A

I Space for instrctions, and d space for operands (data)

70
Q

Dynamic Partitioning

A
Exact fit
External fragmentation
Compaction
Placement Algorithm
(Better way, virtual addresses)
71
Q

Virtual addressing

A

Frames into pages

-then convert virtual to real addresses as needed

72
Q

Page Fault

A

Asking for page not in memory

73
Q

Virtual memory

A

Real memory + space on disk to hold pages

74
Q

Thrashing

A

When the computer spends all of it’s time swapping out memory processes

75
Q

Paging

A

Break up memory into small partitions called frames (2 to 4kb in size). Each frame holds exactly 1 page

76
Q

Dynamic Address Translation (DAT)

A

Basic DAT uses special hardware and some extra registers:

BR:  Base  Register: address  where  module  really  starts  (real  or  physical  address  of  module  start)
LR:  Limit  Register : address  of  end  of  module
77
Q

What is word

A

Fixed sized piece of data handled as a unit by the instruction set or hardware of the processor (typically 32 or 64 bit)

78
Q

Large Page tables

A

Translation look aside buffer (TLB). Uses associative memory

79
Q

OS Page fault

A

OS must first look on the PTE (recently used pages on CPU) then on the TLB (transcation look aside buffer) before it can go searching on the disk

80
Q

Virtual memory

A

total memory region consisting of entierty of real memory + some amount of secondary memory (recommended disk space at least size of ram

81
Q

Resident memory set

A

the set of pages or segments, of a process currently in real memory

82
Q

Page fault

A

the consequence of accessing a page not resident

83
Q

High page fault rate

A

process blocked waiting for pages
idle time
cpu underutilized

84
Q

Denning rule

A

Keep use of paging mechanism at 50%, which point CPU utilization is highest

85
Q

OS knowledge of process

A

track progress

allocate allowed resources

86
Q

OS needs to know

A
‘Who’  the  process  is
Where  did  it  come  from?
Who  does  it  belong  to?
What  is  its  current  status?
How  much  of  how  many  different resource  types  is  it  using? 
--Does it want
--Is it allowed to have
87
Q

Process is a program

A

CPU, memory, possiblty other resources