Mid-Term Flashcards

(87 cards)

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
Adding more frames of memory always improves page fault behaviour (i.e., reduces number of page faults).
false
26
An OS only works when directly controlling real hardware
false
27
Semaphores fail to work as asynchronization mechanism on systemswith multiple CPUs and one shared memory.
false
28
Most practical OS simply ignore the possibility of deadlock.
true
29
Generally,the faster the memory(lower latency), the more expensive it is.
true
30
All resources managed by a computer are hardware resources.
false
31
The only resource given up by a blocked process is the CPU.
true
32
The use of unequal-sized fixed partitions fails to resolve the fragmentation problem
true
33
Every UNIX/linux process (except one) is a child of some parent process.
true
34
Swapping a process out of memory moves part or all of the process.
false
35
Round robin scheduling degrades to FIFO if the timeslice becomes too long.
true
36
Paging space in a virtual memory system should always be set to the same size as the amount of physical memory in the system.
false
37
Cache coherency on multi-processor systems sharing a single memory is much harder to maintain than on a uni-processor.
true
38
In providing a mutual exclusion mechanism, weassume that fast runningprocesses do not cause problems.
false
39
Using virtual memory allows us to put only part of a program into memory at a time.
true
40
Dynamic address translation does not work on systems with a cache memory.
false
41
A runnable process will never be swapped out while it remains runnable.
false
42
Disabling mutual exclusion in an OS is a normal and widely used way to prevent deadlock.
false
43
Virtual memorysystems should not be used for real-time applications.
true
44
Processes than can no longer make use of the CPU become blocked until they can again make use of the CPU.
true
45
Semaphores are a software mechanism designed to provide mutual exclusion. Name and briefly describe the three operations that can be performed on a semaphore.
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
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.
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
FIFO pre-emptive favourable unfavourable
FIFO is not pre-emptive, is favourable to long running jobs, is unfavourable for short jobs
48
Round Robin Pre-Emptive? Favourable? Unfavourable?
Round Robin Pre-Emptive? Favourable? Unfavourable?
49
Data <> Information
Computers work on, and networks move data | Humans create information from the data they see
50
IT then is the study of a dynamic system consisting of: | Information and infrastructure
Hardware, Software, Firmware, and People.
51
Information Technology (IT)
includes hardware, software, | firmware, people and data / information / knowledge.
52
what is a computer
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
Common Computer features
``` CPU Bus(es) Memory Data store I/O Capabilities: network, user input, user output, .... Power source ```
54
Memory
Place to hold a value (data or instruction) while it is worked on or until it is needed to be worked on
55
Memory Address
Each place in memory has an address which uniquely identifies it
56
How high are the typically cache hit ratios
95% or better
57
Input devices types of interrupt
Polled | Interrupt: these have different prorities
58
DMA
Direct memory access, smart devices are capable of interacting with the BUS, only for short amount of time
59
CPU Life
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
Dealing with errors
trap. Instant, must be dealt with as they occur
61
OS
Manages resources of computer to provide an enviroment for processes to run
62
OS Needs
OS must be resident at all times, the kernel | -Load into memoery, interrupt and trap handlers
63
Simple OS
Runes one program at a time
64
Multi-tasking OS
Illusion of running mroe than 1 task at a time, - memory management - schedulig, - Communication: task may interact
65
Multi-User and Multi-Tasking
Single-user, multi-tasking | Multi-user, single-tasking
66
Dynamic partitioning
First first Best fit Next fit Worst fit
67
OS Non-physical resources
queues, files and caches
68
Process needs
At least one CPU to execute its instructions Memory to hold instructions and data (operands) Access to input/output devices
69
Processes and memory
I Space for instrctions, and d space for operands (data)
70
Dynamic Partitioning
``` Exact fit External fragmentation Compaction Placement Algorithm (Better way, virtual addresses) ```
71
Virtual addressing
Frames into pages | -then convert virtual to real addresses as needed
72
Page Fault
Asking for page not in memory
73
Virtual memory
Real memory + space on disk to hold pages
74
Thrashing
When the computer spends all of it's time swapping out memory processes
75
Paging
Break up memory into small partitions called frames (2 to 4kb in size). Each frame holds exactly 1 page
76
Dynamic Address Translation (DAT)
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
What is word
Fixed sized piece of data handled as a unit by the instruction set or hardware of the processor (typically 32 or 64 bit)
78
Large Page tables
Translation look aside buffer (TLB). Uses associative memory
79
OS Page fault
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
Virtual memory
total memory region consisting of entierty of real memory + some amount of secondary memory (recommended disk space at least size of ram
81
Resident memory set
the set of pages or segments, of a process currently in real memory
82
Page fault
the consequence of accessing a page not resident
83
High page fault rate
process blocked waiting for pages idle time cpu underutilized
84
Denning rule
Keep use of paging mechanism at 50%, which point CPU utilization is highest
85
OS knowledge of process
track progress | allocate allowed resources
86
OS needs to know
``` ‘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
Process is a program
CPU, memory, possiblty other resources