Chapters 1 - 5 Flashcards

1
Q

Remember that [blank(1)] command is just a method of organizing file directories in a table.
The [blank(2)] document is maintained by the Linux community as a means of ensuring compatibility across the various system components. This standard specifies the overall layout of a standard Linux file system as well as how to organize using [blank(2)] compliant methods. It determines under which directory names configuration files, libraries, system binaries, and run-time data files should be stored. Additionally, the [blank(2)] document gives insight into standards of different [blank(1)] layouts.

A

1 filesystem table fstab
2 File System Hierarchy Standard (FHS)

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

What operating system service is related to ensuring the efficient operation of the system and is unrelated to providing services to user programs?

A

Resource Allocation

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

__________ provide an interface to the services made available by an operating system.

A

System calls

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

Each system call has a number, and that number is used as an index in the _______________, to invoke the appropriate routine.

A

System call table

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

System service:

A

A collection of applications included with or added to an operating system to provide services beyond those provided by the kernel.

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

Registry:

A

A file, set of files, or service used to store and retrieve configuration information. In Windows, the manager of hives of data.

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

System utility:

A

A collection of applications included with or added to an operating system to provide services beyond what are provided by the kernel.

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

Application program:

A

A program designed for end-user execution, such as a word processor, spreadsheet, compiler, or Web browser.

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

SRT

A

Shortest Remaining Time (Switch to shortest time at moment of arrival and after finishing a process)

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

RR Scheduling

A

Round Robbin receives one per Quanta + S per move

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

What is the top three valuable chapters

A

Top three most important concepts

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

Top three hardest concepts

A

What do you usually tell students

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

Remember this resources

A

NTFS Linux required additional material
course announcement study material
lab
quizzes
study guide
quizzet.com

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

(in message passing) Messages are sent and received using

A

system calls and waiting for kernel intervention can slow down the performance of message passing.

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

Shared memory only requires an initial

A

system call for establishing the shared memory segment. Once the segment has been created, accessing the shared memory is performed in user mode and requires no kernel intervention.

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

To determine if a bounded buffer is empty, you can perform the following test:

A

Check if the buffer’s count or size is zero: If the buffer has a count or size variable that keeps track of the number of elements currently in the buffer, you can test if this count is zero. If the count is zero, it means the buffer is empty.

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

Typically, a rendezvous involves two processes

A

(often referred to as the sender and receiver) that need to synchronize their execution. The sender process waits until the receiver process is ready, and vice versa.

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

Message passing on Windows systems is known as an_________ which allows two processes on the same machine to communicate.

A

Message passing on Windows systems is known as an advanced local procedure call which allows two processes on the same machine to communicate.

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

__________ pipes are more powerful than __________or _________ pipes, including allowing several processes to use the pipe for communication.

A

Named pipes are more powerful than ordinary or anonymous pipes, including allowing several processes to use the pipe for communication.

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

Concurrent execution on a single-core system.

A

Concurrency means all threads make progress on a single-core system as each thread gets to run for a short period of time on the single processing core.

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

Parallel execution on a dual-core system​.

A

Parallelism allows two threads to run at the same time as each thread runs on a separate processing core​.

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

Task parallelism involves

A

distributing not data but tasks (threads) across multiple computing cores.

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

A parallel system allows

A

multiple tasks to run at the same time. Parallel systems require more than one CPU core.

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

A concurrent system allows

A

multiple tasks to make progress, but there are no guarantees more than one task can run at a time.

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

The term “multithreaded” refers to

A

a program in which several activities are to be performed concurrently.

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

data parallelism

A

A computing method that distributes subsets of the same data across multiple cores and performs the same operation on each core.

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

In a system with deferred cancellation, a running thread periodically

A

checks for a cancellation request or a termination condition.

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

Thread-local storage allows a thread to

A

have data that is not accessible to other threads belonging to the same process

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

signal: In __________ and other operating systems, a means used to __________

A

signal: In UNIX and other operating systems, a means used to notify a process that an event has occurred.

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

Multiprocessor systems, also known as parallel computing systems, consist of

A

multiple processors working together to perform computational tasks simultaneously.

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

A Lightweight Process (LWP) is a virtual processor-like data structure that

A

provides a mapping between a user thread and a kernel thread in an operating system

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

Context switching refers to the process of

A

saving the current state of a running process or thread (known as the “context”) and restoring the saved state of another process or thread to continue its execution.

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

long-term scheduling is to short-term scheduling what suspended list is to

A

waiting list

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

A non-preemptive scheduling algorithm allows

A

a running process to continue until the process terminates or blocks on a resource.

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

A preemptive scheduling algorithm may

A

stop the currently running process and choose another process to run. The decision is made whenever:
A new process enters the ready list.
A previously blocked or suspended process re-enters the RL.
The OS periodically interrupts the currently running process to give other processes a chance to run.

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

A non-preemptive decision is made

A

only when the currently running process terminates or blocks, not when a process enters the RL.

37
Q

Total CPU time

A

The amount of CPU time the process will consume between arrival and departure. For short-term scheduling, total CPU time is sometimes called the CPU burst.

38
Q

a periodic process refers to a task or activity that

A

repeats at regular intervals or follows a predictable pattern.

39
Q

The total CPU time (attained) under long-term scheduling accumulates from

A

process creation until process destruction. For short term it restarts every time the process stops.

40
Q

SJF is non-preemptive.

A

Which means it doesn’t interrupt processes. SJN (Shortest Job Next), schedules processes according to the total CPU time requirements.

41
Q

SRT is the __________ version of SJF.

A

preemptive

42
Q

A time quantum, Q, is a

A

small amount of time (typically 10 to 100 milliseconds) during which a process is allowed to use the CPU.

43
Q

The round-robin (RR) algorithm uses a

A

single queue of processes. The priority is determined solely by a process’s position within the queue. The process at the head of the queue has the highest priority and is allowed to run for Q time units. When Q ends, the process is moved to the tail of the queue and the next process now at the head of the queue is allowed to run for Q time units.

44
Q

Multilevel (ML) scheduling maintains a

A

separate queue of processes at each priority level. Within each level, processes are scheduled using RR. Processes at a given level can run only if all queues at higher levels are empty.

45
Q

Under the multilevel feedback (MLF) algorithm a newly arriving process enters the highest-priority queue, N, and is allowed to run for Q time units. When Q is exceeded, the process is moved to

A

the next lower priority queue, N-1, and is allowed to run for 2Q time units. At the lowest priority level the time is unlimited

46
Q

The response time of a process is the elapsed time from

A

the submission of a request (pressing the Enter key or clicking a mouse button) until the response begins to arrive.

47
Q

In MLF the lower the lever the higher the ________

A

Q allotment

48
Q

A period is a

A

time interval (typically in milliseconds or even microseconds) within which each input item must be processed. The end of each period is the implicit deadline for processing the current item.

49
Q

The rate monotonic (RM) algorithm schedules processes according to

A

the period. The shorter the period, the higher the priority.

RM is preemptive.

50
Q

The earliest deadline first (EDF) algorithm schedules processes according to

A

the shortest remaining time until the deadline. The shorter the remaining time, the higher the priority.

51
Q

A schedule is feasible if

A

the deadlines of all processes can be met.

52
Q

The CPU utilization (U) is the sum of

A

the individual fractions of CPU times used by each process.

53
Q

Real-time processes are very short but all must execute before

A

any interactive or batch process is scheduled.

54
Q

Processor affinity means a thread may run on

A

only one processor. By running on a specific processor, a thread can take advantage of that processor’s cache memory.

55
Q

With coarse-grained multithreading, a thread executes on a core until

A

a long-latency event such as a memory stall occurs

56
Q

Fine-grained (or interleaved) multithreading switches between threads at a much finer level of granularity—typically at

A

the boundary of an instruction cycle. However, the architectural design of fine-grained systems includes logic for thread switching. As a result, the cost of switching between threads is small.

57
Q

Asymmetric multiprocessing is simple because

A

only one core accesses the system data structures, reducing the need for data sharing.

58
Q

Load balancing forces threads to __________ in order to distribute the workload. With push migration, a task checks the __________ and __________ to ensure balance. With pull migration, an idle processor tales work from a busy processor.

A

Load balancing forces threads to migrate in order to distribute the workload. With push migration, a task checks the state of processors and moves the load to ensure balance. With pull migration, an idle processor tales work from a busy processor.

59
Q

Timing Requirements: Real-time systems have specific timing constraints that must be met. They can be categorized into two main types (explain each)

A

Hard Real-Time: Tasks or processes have strict and immovable deadlines. Failure to meet these deadlines can result in catastrophic consequences, such as system failures, safety hazards, or financial losses.
Soft Real-Time: Tasks or processes have timing constraints, but missing occasional deadlines does not necessarily lead to catastrophic failures. However, timely response is still desirable to maintain system performance and effectiveness.

60
Q

rate-monotonic: The rate-monotonic scheduling algorithm schedules periodic tasks using a

A

static priority policy with preemption.

61
Q

Ports that a client can use

A

Outside of 1024, the known range

62
Q

User space processes run in a restricted environment and interact with the operating system through

A

system calls, which are functions provided by the kernel.

63
Q

Rotational Latency

A

It refers to the time it takes for the desired data sector on a rotating disk to rotate under the read/write head.

64
Q

CLV (Constant Linear Velocity): refers to a method of data storage where the disk rotates at

A

a constant speed, and the linear velocity of the read/write head varies depending on the radial position on the disk. This allows for a consistent data transfer rate across the entire surface of the disk.

65
Q

CAV (Constant Angular Velocity): the disk rotates at a constant speed, and the read/write head

A

maintains a constant angular velocity as it moves across the surface of the disk. This means that the linear velocity of the head varies depending on the radial position on the disk. Unlike CLV, the data transfer rate is not constant in CAV, as the outer tracks have a higher linear velocity and therefore a higher data transfer rate compared to the inner tracks.

66
Q

Head Crash: A head crash refers to a

A

mechanical failure that occurs in a hard disk drive when the read/write head comes into physical contact with the rotating platters, usually due to a mechanical or operational problem. This collision can cause damage to the magnetic surface of the disk, leading to data loss or corruption. Head crashes can be caused by factors such as sudden impacts, shocks, manufacturing defects, wear and tear, or improper handling of the drive. They are typically serious issues and can result in permanent data loss if not addressed properly.

67
Q

CLV is commonly used in optical storage systems like __________, while CAV is used in certain types of __________ and some __________. In modern HDDs, more advanced techniques such as Zone Bit Recording (ZBR) or Perpendicular Magnetic Recording (PMR) are employed to optimize data storage and access performance.

A

CLV is commonly used in optical storage systems like CDs and DVDs, while CAV is used in certain types of hard disk drives (HDDs) and some older magnetic tape systems. In modern HDDs, more advanced techniques such as Zone Bit Recording (ZBR) or Perpendicular Magnetic Recording (PMR) are employed to optimize data storage and access performance.

68
Q

Constant Linear Velocity (CLV) has a consistent __________
while CVA has a consistent __________

A

Consistent Data Transfer Rate: CLV ensures a consistent data transfer rate across the entire surface of the disk. This can be advantageous for applications that require a predictable and uniform data access speed.

In CAV, the read/write head maintains a constant angular velocity as it moves across the disk. This results in a constant seek time since the linear velocity remains the same regardless of the radial position. This can lead to faster access times for data located on inner tracks.

Simplicity: CAV is a simpler method compared to CLV as it does not require complex mechanisms for dynamically adjusting the linear velocity.

69
Q

Mutual exclusion

A

Only one process may be executing within the CS (critical section)

70
Q

Lockout

A

A process not attempting to enter the CS must not prevent other processes from entering the CS (critical section)

71
Q

Starvation

A

A process (or a group of processes) must not be able to repeatedly enter the CS while other processes are waiting to enter.

72
Q

Deadlock

A

Multiple processes trying to enter the CS at the same time must not block each other indefinitely.

73
Q

(T/F) A buffer is a CS

A

A critical section is a segment of code. The buffer is a data structure.

74
Q

Interleaving is a tool that is used to enhance existing

A

error correcting codes so that they can be used to perform burst error corrections as well.

Most error correcting codes (ECCs) are designed to correct random errors, i.e. error caused by additive noise that is independent of each other. Burst error are the errors that occur in a sequence or as groups. They are caused due to defects in storage media or disruption in communication signals due to external factors like lightning etc. Interleaving modifies the ECC or does some processing on the data after they are encoded by ECCs.

75
Q

A race condition may occur if commands to read and write a large amount of data are received at

A

almost the same instant, and the machine attempts to overwrite some or all of the old data while that old data is still being read.

76
Q

Operations related to mutex locks (mutually exclusive locks)

A

acquire() release()

77
Q

A semaphore s is a

A

non-negative integer variable that can be accessed using only two special operations, P and V.

V(s): increment s by 1
P(s): if s > 0, decrement s by 1, otherwise wait until s > 0

Overall, semaphores provide a mechanism for coordinating and synchronizing concurrent activities, enabling efficient resource sharing and avoiding conflicts in multi-threaded or multi-process systems

78
Q

The semaphore mutex can only have the values 0 or 1.
T/F

A

True

79
Q

When each process runs on a separate CPU then mutual exclusion cannot be guaranteed. T/F

A

False

The implementation of P and V operations must guarantee that executing multiple P and/or V operations simultaneously produces the same result as executing the operations in sequence.

Each CPU has its own cache and memory subsystem, which allows for independent execution and control of the processes.

In a multi-CPU system, the mutex implementation typically includes atomic operations and memory barriers to ensure correct synchronization and mutual exclusion. When a process tries to acquire the mutex, it performs atomic operations that ensure that only one process can successfully acquire the mutex and enter the critical section while other processes are blocked.

80
Q

When the producer and the consumer run at highly varying speeds then the buffer should consist of a _____ number of slots.
Large/ Small

A

A large number of slots is beneficial to catch a burst of data items produced when the producer runs far ahead of the consumer, and vice versa.

81
Q

The test-and-set instruction (TS) copies a variable into a

A

register and sets the variable to zero in one indivisible machine cycle. Test-and-set has the form TS(R, x) where R is a register and x is a memory location and performs the following operations:

Copy x into R
Set x to 0

82
Q

If R = 0 and x = 1, then after executing TS(R, x) the values become

A

TS copies x = 1 into R and sets x to 0. R = 1, x = 0

83
Q

Placing a data item into the buffer takes 10 ms when executed in isolation. Similarly, the removal of a data item takes 10 ms.
When the producer and the consumer run concurrently on one CPU and the producer begins filling the buffer at time t, the consumer will finish emptying the buffer at time

A

While the producer is placing data into the buffer, the consumer is busy-waiting, thus doubling the time to 20 ms. The buffer will be filled at time t + 20. Then, analogously, the time for emptying the buffer is doubled to 20 ms. So the consumer will finish emptying the buffer at time t + 20 + 20.

84
Q

What is a high-level synchronization primitive?

A

High-level synchronization primitives abstract away the low-level details of synchronization mechanisms and provide a more structured and easier-to-use approach to managing concurrency.

85
Q

A monitor is a

A

high-level synchronization primitive
The monitor implementation guarantees mutual exclusion. Only one process may be executing inside the monitor.

86
Q

(monitor) c.signal blocks the calling process only when there is

A

another process waiting in the queue associated with c. When the queue is empty, c.signal has no effect since no process needs to be reactivated.

87
Q

An exiting writer signals all readers currently on the ok_to_read queue (T/F)

A

An exiting writer signals only the first reader, which then signals the next reader, etc.

Only the last reader leaving the CS signals the next writer.

88
Q

In Peterson’s solution, flag[i] is an

A

array element that represents the intent of process i to enter a critical section in a concurrent programming scenario with two processes.