Week 3 Flashcards

1
Q

Interprocess Communication (IPC)

A

Message Passing: Uses system calls for processes to communicate, often with send and receive commands.
Challenges in Distributed Systems: Issues include lost messages, retransmissions, process naming, and authentication.

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

Process Scheduling

A

Purpose: Manages concurrent execution of multiple processes, where the scheduler decides which to run next based on a scheduling algorithm.
Issues: Resource contention (multiple processes needing CPU),
efficiency (reducing overhead from context switching), and
fairness (equal CPU access).
Process Behavior:
Compute-bound: Processes with long CPU bursts and
minimal I/O.
I/O-bound: Frequent I/O waits and shorter CPU bursts.

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

Key Scheduling Events

A

Process Creation: Scheduler decides whether the parent or child process will run.

Process Exit: New process selected; if none are ready, idle process runs.

Process Blocking: Scheduler selects a new process when one blocks on I/O or semaphore.

I/O Interrupt: Scheduler may choose from newly ready, current, or other processes.

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

Preemptive vs. Nonpreemptive Scheduling

A

Nonpreemptive: Process runs until it voluntarily releases the CPU.

Preemptive: Uses clock interrupts to enforce fixed time intervals, ensuring the CPU can be reclaimed by the scheduler if needed.

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

Scheduling Algorithms

A

First Come First Serve (FCFS): Processes are served in the order they request the CPU, with CPU-bound processes potentially monopolizing resources.

Round Robin: Each process receives a fixed time quantum, ensuring fair CPU distribution.

Priority Scheduling: Runs highest-priority processes first; priorities can be static (predefined) or dynamic (adjusting to process behavior).

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

Thread Scheduling

A

User-Level Threads: Managed by the thread scheduler in user space; kernel unaware.

Kernel-Level Threads: Managed by the kernel, allowing thread suspension upon quantum expiration and process-level thread switching.

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

Xinu’s Unified Process Manager

A

Linked Lists: Xinu uses doubly linked lists for process management, enabling ordered or FIFO access with head and tail nodes containing process keys.

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

Context Switch (ctxsw)

A

Implementation: Often in assembly, typically for architecture like x86.

Process:
Save the old process’s stack pointer in memory.
Load the stack pointer for the next process, pointing to the
next instruction to run.

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

Priority Scheduling with a Priority Queue of Queues

A

Structure: Uses multiple queues, each representing a priority level.
Highest Priority processes are selected first.
FIFO Order within Priority Levels: Processes at the same
priority are managed in first-come, first-served order.

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

Reschedule Function

A

Steps:
Retrieve the current process (ptold).
If ptold is still the active process, check if its priority is higher than
the highest in the ready list (firstkey(readylist)).
If not, move the current process to READY status.
Select the next process from the ready queue and initiate its
execution.

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

Ready State

A

Ready vs. Running: A ready process is prepared to run but is not currently executing.

Insertion: Marking a process as ready adds it to the ready list based on its priority position.

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