D686 - Operating Systems - Chapter 5

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/49

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.

50 Terms

1
New cards

process synchronization

the coordination of processes to ensure they operate smoothly and efficiently without interfering with each other, especially when accessing shared resources or data

2
New cards

mutex

short for mutual exclusion, a lock that ensures only one process can access a critical section or resource at a time, preventing race conditions

3
New cards

semaphores

synchronization tools used to control access to shared resources by multiple processes

4
New cards

starvation

a situation where a process is perpetually denied access to resources because other processes continuously acquire them

5
New cards

circular wait

a condition where each process in a set is waiting for a resource held by another process in the same set, contributing to deadlock

6
New cards

fair resource allocation

a principle ensuring that all processes have fair access to resources, preventing starvation and ensuring balanced system performance

7
New cards

producer-consumer scenario

where one process produces data and another consumes it, requiring synchronization to ensure that the buffer used does not overflow or underflow

8
New cards

concurrency

the ability of an operating system to execute multiple processes simultaneously, improving performance and responsiveness

9
New cards

critical section

A section of code responsible for changing data that must only be executed by one thread or process at a time to avoid a race condition.

10
New cards

entry section

The section of code within a process that requests permission to enter its critical section.

11
New cards

exit section

The section of code within a process that cleanly exits the critical section.

12
New cards

remainder section

Whatever code remains to be processed after the critical and exit sections.

13
New cards

preemptive kernel

A type of kernel that allows a process to be preempted while it is running in kernel mode.

14
New cards

nonpreemptive kernels

A type of kernel that does not allow a process running in kernel mode to be preempted; a kernel-mode process will run until it exits kernel mode, blocks, or voluntarily yields control of the CPU.

15
New cards

mutex lock

A mutual exclusion lock; the simplest software tool for assuring mutual exclusion.

16
New cards

contended

A term describing the condition of a lock when a thread blocks while trying to acquire it.

17
New cards

uncontended

A term describing a lock that is available when a thread attempts to acquire it.

18
New cards

busy waiting

A practice that allows a thread or process to use CPU time continuously while waiting for something. An I/O loop in which an I/O thread continuously reads status information while waiting for I/O to complete.

19
New cards

spinlock

A locking mechanism that continuously uses the CPU while waiting for access to the lock.

20
New cards

To use a binary semaphore to solve the critical section problem, the semaphore must be initialized to 1 and _____ must be called before entering a critical section and _____ must be called after exiting the critical section.

wait(), signal()

21
New cards

A counting semaphore can be used as a binary semaphore.

True

22
New cards

_____ can be used to prevent busy waiting when implementing a semaphore.

Waiting queues

23
New cards

semaphore

An integer variable that, apart from initialization, is accessed only through two standard atomic operations: wait() and signal().

24
New cards

counting semaphore

A semaphore that has a value between 0 and N, to control access to a resource with N instances.

25
New cards

binary semaphore

A semaphore of values 0 and 1 that limits access to one resource (acting similarly to a mutex lock).

26
New cards

readers-writers problem

A synchronization problem in which one or more processes or threads write data while others only read data.

27
New cards

reader-writer lock

A lock appropriate for access to an item by two types of accessors, read-only and read-write.

28
New cards

dining-philosophers problem

A classic synchronization problem in which multiple operators (philosophers) try to access multiple items (chopsticks) simultaneously.

29
New cards

monitor

a synchronization construct in programming languages that prevents race conditions

30
New cards

synchronization

coordinating processes or threads to ensure they work together properly without causing problems

31
New cards

initialization

the setup code included in the monitor package and used once when creating the monitor

32
New cards

encapsulation

keeping data and methods that use it together in one unit to make it easier to manage and protect

33
New cards

monitor entry queue

a place that holds all the threads (or procedures) waiting to enter the monitor

34
New cards

monitor procedure

functions that can be called from outside the monitor

35
New cards

private data

secret data inside the monitor, including private functions that cannot be used outside the monitor

36
New cards

signal()

a function that allows one of the paused processes in the waiting queue to start running

37
New cards

wait()

a function that pauses a process and puts it in a waiting queue inside the monitor

38
New cards

interprocess communication (IPC)

mechanisms allowing processes to communicate and synchronize their actions

39
New cards

race conditions

occur when multiple processes access and modify shared data concurrently, leading to unpredictable outcomes depending on the timing of their execution

40
New cards

shared variables

memory locations accessible by multiple processes for reading and writing data

41
New cards

What is the coordination of processes used to ensure they operate without interfering with each other?

Synchronization

42
New cards

What is a situation where the outcome of a process execution depends on the specific order in which processes access shared data?

Race condition

43
New cards

How can processes avoid race conditions in a multiprocessor environment?

By employing synchronization mechanisms

44
New cards

Which mechanism ensures exclusive access to a critical section by allowing only one process to enter at a time?

Mutex lock

45
New cards

Which mechanism uses counters to control access to resources, allowing processes to wait for availability and signal completion?

Semaphore

46
New cards

Which type of semaphore behaves similarly to a mutex lock, allowing only one process to access a critical section at a time?

Binary

47
New cards

Which classic synchronization problem involves ensuring that multiple readers can access shared data simultaneously but only one writer can modify it at a time?

Readers-writers problem

48
New cards

What does the dining philosophers problem illustrate in terms of synchronization?

The complexity of managing multiple resources among multiple processes

49
New cards

Which synchronization construct encapsulates data and operations, ensuring mutual exclusion and simplifying process synchronization management?

Monitor

50
New cards

How does a monitor ensure that only one process can access shared data at a time?

By implementing condition variables