CSC 448 (Operating Systems) Test 2

0.0(0)
studied byStudied by 2 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

Interrupt latency

time from arrival of interrupt to

start of routine that

services interrupt (Real-Time CPU Scheduling)

2
New cards

Dispatch latency

time for schedule to take

current process off CPU

and switch to another (Real-Time CPU Scheduling)

3
New cards

What characterizes a NUMA (non-uniform memory access)-aware operating system?

Memory is assigned closest to the CPU the thread is running on.

4
New cards

What issues do you have to account for when setting up a NUMA machine?

Process/Thread Placement:

OS scheduler must decide where to place threads so that they run on CPUs near their memory.

Shared data structures:

Data shared across NUMA nodes can lead to contention and increased memory access time.

5
New cards

What are characteristics of simulations?

More accurate compared to queueing models, programmed model of a computer system, clock is a variable, gather statistics about algorithm performance

6
New cards

What is a race condition in operating systems?

A race condition occurs when two or more processes or threads access shared data concurrently, and the outcome of the execution depends on the specific order in which the access occurs.

7
New cards

What is mutual exclusion (critical section problem)?

Only one process at a time can be executing in its critical section at a time.

8
New cards

What is progress (critical section problem)?

When no processes are in there critical section, the selection of the next process to enter cannot be postponed indefinitely.

9
New cards

What is bounded waiting (critical section problem)?

Processes waiting to enter their critical sections have a a limit on how long they can be delayed.

10
New cards

Why is Peterson’s solution not guaranteed to work?

Peterson’s solution assumes sequential consistency where read and writes happen in their code-specified order. Modern compilers reorder instructions for performance. At the cpu level, instructions are also reordered and this can cause certain cores to not see other cores’ writes.

11
New cards

What is the purpose of the Test-and-Set instruction?

To atomically check a value and set it to true.

12
New cards

What does Compare-and-Swap do atomically?

Compares a value and swaps only if it matches the expected value.

13
New cards

What is a mutex lock?

Boolean variable indicating if lock is available or not.

14
New cards

What is busy waiting?

When a thread is waiting for a condition to become true.

15
New cards

What is a spinlock?

A type of mutex lock that uses busy waiting to acquire a lock.

16
New cards

What is a semaphore?

A special integer variable used to control access to shared resources in concurrent systems.

17
New cards

What are the two functions of a semaphore and what do they do?

Wait(), decrements the semaphore, signal(), increments the semaphore.

18
New cards

What are monitors?

Abstract data types that include shared variables (resources), procedures/functions to be performed on the shared data, and include a synchronization mechanism.

19
New cards

What is the bounded buffer problem?

A fixed-size collection stores items. Producers cannot add to the buffer if it is full. Consumers cannot take from the buffer if it is empty.

20
New cards

What is the reader-writer problem?

Writers need exclusive access (mutual exclusion) and readers should not be limited when reading data.

21
New cards

What is the dining-philosophers problem?

5 philosophers sit around a table with a bowl of rice each and a chopstick to their left and right. They must alternate between eating and thinking so that each philosopher can eat with two chopsticks.

22
New cards

What is hold and wait?

A process is holding at least one resource and is waiting for additional resources held by other processes.

23
New cards

What is no preemption?

Resources cannot be forcibly taken from a process.

24
New cards

What is circular wait?

Processes each have a resource and want a resource from a neighboring process.

25
New cards

What is mutual exclusion? (deadlocK)

Only one thread at a time can use a resource.

26
New cards

What is compile time binding?

The process of translating logical addresses into physical addresses.

27
New cards

What is load time binding?

When logical addresses are mapped to physical memory just before a program is loaded into memory.

28
New cards

What is execution time binding?

Happens while the program is running; program decides or updates memory addresses, values, or function targets during execution.

29
New cards

What are logical addresses?

Generated by the CPU, A.K.A virtual addresses.

30
New cards

What are physical addresses?

Addresses seen by the memory management unit.