Search code examples
terminology

What is "prodecure call"?


RPC (remote procedure call is a common name), but what's the definition of procedure call ?

From https://pages.cs.wisc.edu/~remzi/OSTEP/cpu-mechanisms.pdf:

ASIDE: WHY SYSTEM CALLS LOOK LIKE PROCEDURE CALLS

You may wonder why a call to a system call, such as open() or read(), looks exactly like a typical procedure call in C; that is, if it looks just like a procedure call, how does the system know it’s a system call, and do all the right stuff? The simple reason: it is a procedure call, but hidden inside that procedure call is the famous trap instruction.
....

What is the classification? Are there other xxxx calls classification?


Solution

  • Procedures is just another name for subroutines/functions.

    From source (emphasis mine)

    In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal (local) procedure call, without the programmer explicitly coding the details for the remote interaction.

    And source

    Subroutines may be defined within programs, or separately in libraries that can be used by many programs. In different programming languages, a subroutine may be called a routine, subprogram, function, method, or procedure.

    So, procedure calls are just calls to the subroutine/function. This invokes the steps laid out in the procedure.

    From source

    A procedure call is a simple statement made by stating the procedure name, listing actual parameter names or values within parentheses, and adding a final semi-colon.