Courseiva

PCPP2 · domain

Interprocess Communication

Practise Python Institute Certified Professional in Python Programming 2 (PCPP2) (PCPP2) Interprocess Communication practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

33 questions10 easy12 medium11 hard

Focused practice

Practice Interprocess Communication questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Interprocess Communication

Interprocess Communication questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common Interprocess Communication exam traps

  • Answering from memory before reading the full scenario.
  • Missing a constraint such as cost, availability, security, scope or command context.
  • Choosing a broad answer when the question asks for the most specific fix.
  • Ignoring why the wrong options are tempting.

Question index

All Interprocess Communication questions (33)

Click any question to see the full explanation, or start a practice session above.

1

What is the primary purpose of the subprocess.PIPE constant?

Hard
2

Which module allows you to run external programs and interact with their input/output streams?

Easy
3

You are using a multiprocessing.Semaphore(3). What happens when the 4th process attempts to acquire the semaphore?

Medium
4

You are writing a Python script that needs to perform heavy I/O-bound tasks concurrently. Which module should you prioritize to minimize the overhead of global interpreter lock (GIL) contention?

Easy
5

If you want to run a function in a background thread, which class should you instantiate?

Easy
6

Which object would you use to share a simple integer between processes that is safe for concurrent access?

Easy
7

Which TWO of the following scenarios are best suited for the subprocess module?

Medium
8

When using a multiprocessing.Queue to share data between processes, what happens if the queue is full and you use the put() method without a timeout?

Hard
9

You have a thread waiting on a threading.Event. Which method should another thread call to wake up the waiting thread?

Hard
10

When using the multiprocessing module, why is it recommended to use a Manager object instead of a standard dictionary to share data between processes?

Hard
11

Which of the following is true regarding daemon threads in Python?

Easy
12

Which TWO of the following are key benefits of using the multiprocessing.Pool class?

Medium
13

Which THREE of the following represent types of IPC provided by the multiprocessing module?

Easy
14

Which THREE of the following represent ways to synchronize access to shared data in a multi-threaded application?

Medium
15

You are using the subprocess.run() function to execute an external command. Which argument ensures that the command's stdout is captured as a string rather than printed to the console?

Medium
16

When using subprocess.Popen, why is it dangerous to use shell=True with user-supplied input?

Medium
17

When spawning processes on Windows, what is the default start method used by the multiprocessing module?

Medium
18

Two threads are modifying a shared global integer. You want to ensure that only one thread modifies the integer at a time. Which synchronization primitive is most appropriate?

Hard
19

Which THREE of the following are true about the 'subprocess' module's interaction with the operating system?

Hard
20

Which TWO of the following are potential issues when using the 'fork' start method in multiprocessing?

Hard
21

Which of the following describes the difference between Process.terminate() and Process.kill()?

Medium
22

Which THREE of the following features are common to both the threading and multiprocessing modules?

Medium
23

You are using Pool.apply_async(). How do you retrieve the result of the function call?

Medium
24

Why should you use a 'with' statement when using a Lock?

Medium
25

You are managing subprocesses using subprocess.Popen. Which attribute of the Popen object should you check to verify the exit code after the process terminates?

Hard
26

Which THREE of the following are valid ways to instantiate a process in the multiprocessing module?

Easy
27

You are using the multiprocessing.Process class and notice that child processes are not terminating cleanly. Which method should you call to ensure the main process waits for the child process to complete?

Medium
28

What is the result of using a Pipe to communicate between two processes if both processes attempt to write to the same end simultaneously?

Hard
29

What is the primary reason to use the multiprocessing module instead of the threading module for CPU-bound tasks in Python?

Easy
30

Which TWO of the following are valid ways to synchronize threads?

Easy
31

Which TWO of the following are true about the multiprocessing.Queue object?

Hard
32

You are using a multiprocessing.Pool. Which method should you use to apply a function to a sequence of items and get the results back in order as they complete?

Hard
33

In the context of the threading module, what does the daemon flag do when set to True?

Easy

Frequently asked questions

What does the Interprocess Communication domain cover on the PCPP2 exam?
Interprocess Communication questions test whether you can apply the concept in context, not just recognise a definition.
How many questions are in this domain?
This page lists all 33 Interprocess Communication questions in the PCPP2 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Interprocess Communication questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
python-pcpp2 PYTHON-PCPP2 interprocess communication Practice Questions