Comprehensive Guide to IPC, Process Management, and OS Fundamentals

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:44 PM on 9/14/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

Which IPC approaches utilize buffering?

POSIX pipes and message queues.

2
New cards

Which IPC approach respects message boundaries?

Message queues. Pipes are byte streams and do not preserve message boundaries.

3
New cards

Which IPC approaches support bidirectional communication?

Message queues and shared memory. A POSIX pipe is unidirectional.

4
New cards

IPC via Shared Memory: What are its main communication properties?

No message buffering, no message boundaries, direct communication through shared memory, and bidirectional communication.

5
New cards

IPC via Message Queues: What are its main communication properties?

Has buffering, preserves message boundaries, uses indirect communication through a named queue, and supports bidirectional communication.

6
New cards

How does the OS quickly know all the processes in the Ready state?

It maintains a ready queue containing the processes that are ready to run.

7
New cards

IPC via POSIX Pipes: What are its main communication properties?

Has buffering, does not preserve message boundaries, uses indirect communication, and is unidirectional.

8
New cards

Are POSIX pipes unidirectional or bidirectional?

Unidirectional. Data travels from the write end to the read end. Two pipes can be used for two-way communication.

9
New cards

Process FSM: P1 is Ready and P2 is Running. P2 finishes. Is it valid for P2 to move to Terminated and P1 to move to Running?

Yes. P2 can terminate, and the scheduler can then select ready process P1 to run.

10
New cards

Process FSM: P1 is Waiting for keyboard input and P2 is Running. Keyboard input completes. Is it valid for P1 to immediately move to Running and P2 to Ready?

No. The I/O completion moves P1 from Waiting to Ready. It does not automatically preempt P2.

11
New cards

Process FSM: P1 is Running and P2 is Ready. P1 performs a blocking disk read. Is it valid for P1 to move to Ready and P2 to Running?

No. P1 should move from Running to Waiting because it is waiting for I/O. P2 may then move from Ready to Running.

12
New cards

What is a context switch?

The OS saves the CPU state of the currently running process and restores the state of another process so it can run.

13
New cards

What is the boot sequence for getting the kernel into main memory?

Firmware runs → firmware loads the boot loader → boot loader loads the kernel into RAM → kernel begins initialization.

14
New cards

What is a downside of context switches?

They create overhead because CPU time is spent saving and restoring process state instead of doing useful application work.

15
New cards

Where does the kernel permanently reside when the computer is powered off?

On non-volatile secondary storage such as an SSD or disk. It is loaded into RAM during boot.

16
New cards

Order the memory hierarchy from smallest to largest.

Registers → cache → main memory/RAM → disk or secondary storage.

17
New cards

Which CPU mode grants access to all CPU instructions and registers?

Kernel mode.

18
New cards

Which memory/storage types are volatile?

Registers, cache, and main memory/RAM are volatile. Disk/SSD storage is non-volatile.

19
New cards

How many processes exist after this loop: for (int i = 0; i < 3; i++) { fork(); }?

8 processes. Each fork doubles the number of processes: 1 → 2 → 4 → 8.

20
New cards

After pid_t pid = fork(), which process executes if (pid == 0)?

The child process.

21
New cards

What are the main roles of an operating system?

Provide abstractions for hardware, manage resources, support program execution, provide protection/security, manage memory and files, and provide communication between programs.

22
New cards

True or False: Once a program uses a system call, it cannot make libc calls afterward.

False. A program can continue using library functions and system calls normally.

23
New cards

Why might a programmer use a system call instead of a C standard library function?

A system call provides lower-level, direct access to an OS service and can give the programmer more control over the operation.

24
New cards

Which of these are system calls: open(), read(), fopen(), fread()?

open() and read() are system calls. fopen() and fread() are C standard library functions.

25
New cards

What is wrong with allowing applications to interact directly with hardware?

Applications could interfere with the OS or other programs, bypass protection mechanisms, mishandle shared resources, and become dependent on specific hardware.