Free Online Flashcard Deck

2 Processes and Interprocess Communication Free Online FlashCards

Study 2 Processes and Interprocess Communication with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What is a process?

Back

A process is a running instance of a program, with its own execution state and the resources needed to run.

02
Front

What information does the operating system track for a process?

Back

The operating system tracks information such as its process identifier, current instruction and CPU context, memory, and open resources.

03
Front

How do ready and blocked process states differ?

Back

A ready process can run but is waiting for CPU time. A blocked process cannot continue until an event occurs, such as input arriving.

04
Front

What does the scheduler do with ready processes?

Back

The scheduler selects a ready process to run. When its time slice ends, it may return to the ready state.

05
Front

What does `fork()` do?

Back

In Unix-like systems, `fork()` creates a child process. The parent and child continue from the call, and the child receives a distinct process identifier.

06
Front

What happens when a process calls an `exec` function?

Back

An `exec` function replaces the process's current program image with a different program; the process itself continues to exist.

07
Front

Why might a parent call `wait()` or `waitpid()`?

Back

A parent can use `wait()` or `waitpid()` to collect a terminated child's exit status; waiting also lets the operating system release remaining bookkeeping.

08
Front

Why do processes use interprocess communication?

Back

Interprocess communication (IPC) provides controlled ways for processes to exchange data or coordinate activity because processes are normally isolated from one another's private memory.

09
Front

What is a pipe used for in interprocess communication?

Back

A pipe is a byte stream with a read end and a write end, often used between related processes. A shell pipeline can connect one process's output to another's input.

10
Front

How does shared-memory IPC work, and what coordination does it require?

Back

Processes map the same memory region into their address spaces and exchange data by reading and writing it. They need synchronization, such as semaphores, to avoid conflicting updates.

11
Front

How does a process differ from a program?

Back

A program is passive code stored on a device; a process is that code in execution.

12
Front

How does Linux initially handle a child process's memory after `fork()`?

Back

On Linux, a child created by `fork()` initially uses copy-on-write memory rather than immediately copying every memory page.