ArticleslgStudy

science

Local Inter-Process Communication

Local Inter-Process Communication is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Local Inter-Process Communication rather than just read about it. In short: The Local Inter-Process Communication (LPC, often also referred to as Local Procedure Call or Lightweight Procedure Call) is an internal, undocumented inter-process communication facility provided by the Microsoft Windows NT kernel for lightweight IPC between processes on the same computer. As of Windows Vista, LPC has been rewritten as Asynchronous Local Inter-Process Communication (ALPC, often also Advanced Local…

Key takeaways

  • Local Inter-Process Communication belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Local Inter-Process Communication to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Local Inter-Process Communication from memory before moving on to harder problems.

Reference excerpt

The Local Inter-Process Communication (LPC, often also referred to as Local Procedure Call or Lightweight Procedure Call) is an internal, undocumented inter-process communication facility provided by the Microsoft Windows NT kernel for lightweight IPC between processes on the same computer. As of Windows Vista, LPC has been rewritten as Asynchronous Local Inter-Process Communication (ALPC, often also Advanced Local Procedure Call) in order to provide a high-speed scalable communication mechanism required to efficiently implement User-Mode Driver Framework (UMDF), whose user-mode parts require an efficient communication channel with UMDF's components in the executive. The (A)LPC interface is part of Windows NT's undocumented Native API, and as such is not available to applications for direct use. However, it can be used indirectly in the following instances:

when using the Microsoft RPC API to communicate locally, i.e. between the processes on the same machine by calling Windows APIs that are implemented with (A)LPC (see below)

Implementation (A)LPC is implemented using kernel "port" objects, which are securable (with ACLs, allowing e.g. only specific SIDs to use them) and allow identification of the process on the other side of the connection. Individual messages are also securable: applications can set per-message SIDs, and also test for changes of the security context in the token associated with the (A)LPC message. The typical communication scenario between the server and the client is as follows:

A server process first creates a named server connection port object, and waits for clients to connect. A client requests a connection to that named port by sending a connect message. If the server accepts the connection, two unnamed ports are created: client communication port - used by client threads to communicate with a particular server server communication port - used by the server to communicate with a particular client; one such port per client is created The client receives a handle to the client communication port, and server receives a handle to the server communication port, and the inter-process communication channel is established. (A)LPC supports the following three modes of message exchange between the server and client:

For short messages (fewer than 256 bytes) the kernel copies the message buffers between processes, from the address space of the sending process to the system address space, and from there to the receiving process' address space. For messages longer than 256 bytes a shared memory section must be used to transfer data, which the (A)LPC service maps between the sending and receiving processes. First the sender places data into the shared memory, and then sends a notification (e.g. a small message, using the first method of (A)LPC) to the receiving process pointing to the sent data in the shared memory section. Server can directly read and write data from the client's address space, when the amount of data is too large to fit in a shared section. ALPC has a performance advantage over the former LPC interface, as it can be configured to use I/O completion ports instead of synchronous request/reply mechanism that LPC exclusively uses. This enables ALPC ports high-speed communication which automatically balances the number of messages and threads. Additionally, ALPC messages can be batched together so as to minimize user-mode/kernel-mode switches.

Known usage (A)LPC is used heavily in communication between internal subsystems in Windows NT. The Win32 subsystem uses (A)LPC heavily for communication between client and the subsystem server (CSRSS). Quick LPC was introduced in version 3.51 of Windows NT to make these calls faster. This method was largely abandoned in version 4.0 in favor of moving the performance critical server portions into kernel mode (win32k.sys). The Local Security Authority Subsystem Service (LSASS), Session Manager (SMSS), and Service Control Manager all use (A)LPC ports directly to communicate with client processes. Winlogon and the Security Reference Monitor use it to communicate with the LSASS process. As mentioned, Microsoft RPC can use (A)LPC as a transport when the client and server are both on the same machine. Many services that are designed to communicate only on the local computer use (A)LPC as the only transport through RPC. The implementation of remote OLE and DCOM in many cases uses (A)LPC for local communication as well.

See also Doors Remote procedure call

Notes

References Dabak, Prasad; Borate, Milind; Phadke, Sandeep (1999), Undocumented Windows NT, Hungry Minds, ISBN 0-7645-4569-8 Russinovich, Mark; Solomon, David; Ionescu, Alex (2009), Windows® Internals (5th ed.), Microsoft Press, ISBN 978-0-7356-2530-3

External links Local Procedure Call at the Wayback Machine (archived June 12, 2008) — Includes explanation of undocumented functions LPC Communication

Worked examples

Example 1 — a first encounter with Local Inter-Process Communication

Start with the simplest possible case. Write down what Local Inter-Process Communication claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Local Inter-Process Communication before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Local Inter-Process Communication ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Local Inter-Process Communication

In research
Local Inter-Process Communication appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Local Inter-Process Communication in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Local Inter-Process Communication is common in secondary-school and first-year university syllabi. It links to neighbouring topics Inter-process communication, Windows communication and services, so understanding it makes those chapters shorter.
In everyday life
Look for Local Inter-Process Communication outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Local Inter-Process Communication in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Local Inter-Process Communication means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Local Inter-Process Communication out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Local Inter-Process Communication in simple terms?

The Local Inter-Process Communication (LPC, often also referred to as Local Procedure Call or Lightweight Procedure Call) is an internal, undocumented inter-process communication facility provided by the Microsoft Windows NT kernel for lightweight IPC between processes on the same computer. As of W…

Why does Local Inter-Process Communication matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Local Inter-Process Communication?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Local Inter-Process Communication.

Tags

  • Inter-process communication
  • Windows communication and services

Keep exploring