1/34
Flashcards covering key concepts, classes, and methods related to interprocess communication (shared memory, message passing, sockets, RMI) in Java, based on the provided lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Java Virtual Machine (JVM)
On most systems, it appears as an ordinary application running as a separate process on the host operating system, providing support for multiple threads but not a process model within the same virtual machine for creating several processes.
ProcessBuilder class
A Java class that allows a program to create a process external to the JVM, native to the operating system.
start() method (ProcessBuilder)
Invoked on a ProcessBuilder object to create and start a new external process, returning an instance of a Process object.
Process object
An object returned by the start() method of ProcessBuilder, representing an external operating system process that runs independently of the JVM.
Shared Memory (IPC)
A method of interprocess communication where processes directly access a common region of memory to exchange data. In Java, it can be emulated by sharing an instance of a class like BoundedBuffer.
Buffer interface
An interface within the producer-consumer problem framework that typically defines methods like insert() for adding items and remove() for consuming items from a shared buffer.
BoundedBuffer class
A Java class that implements the Buffer interface, often used to emulate shared memory in the producer-consumer problem by allowing shared access to its instance as a circular array.
Message-Passing Systems (IPC)
A method of interprocess communication where processes communicate indirectly by sending and receiving messages through a shared mailbox or channel.
Channel interface
An interface within message-passing systems that defines methods like send() to dispatch messages and receive() to obtain messages.
send() method (Channel)
A nonblocking method defined in the Channel interface invoked by a producer process to place an item into a mailbox or channel.
receive() method (Channel)
A nonblocking method defined in the Channel interface invoked by a consumer process to obtain an item from a mailbox or channel, returning null if the mailbox is empty.
MessageQueue class
A Java class that implements the Channel interface, typically using a Vector to provide nonblocking send and receive methods for message passing.
Sockets
A form of communication in Client–Server Systems, providing a programming interface for network communication between processes. Java offers different types for TCP, UDP, and multicast.
Connection-oriented (TCP) sockets
Sockets implemented in Java using the Socket class, providing reliable, ordered, and error-checked delivery of a stream of bytes between processes.
Connectionless (UDP) sockets
Sockets implemented in Java using the DatagramSocket class, providing a way to send individual packets of data (datagrams) without establishing a persistent connection.
MulticastSocket class
A subclass of DatagramSocket that allows data to be sent simultaneously to multiple recipients within a network.
ServerSocket
A Java class used by a server application to listen for incoming client connection requests on a specified port.
accept() method (ServerSocket)
A method that blocks until a client requests a connection, and then returns a new Socket object that the server can use to communicate with that client.
PrintWriter object
An object typically used by a server to send text-based output to a client through a socket, using methods like print() and println().
loopback address (127.0.0.1)
A special IP address where a computer refers to itself, enabling a client and server on the same host to communicate using the TCP/IP protocol.
Remote Method Invocation (RMI)
A Java feature that allows a thread in one JVM to invoke a method on an object residing in another JVM, whether on the same computer or a remote host.
Stubs and Skeletons (RMI)
Components that implement the remote object in RMI to make remote method calls transparent to the client and server. The stub resides with the client, and the skeleton resides on the server.
Stub (RMI)
A proxy for a remote object that resides with the client, responsible for marshalling parameters and method information and sending them to the server.
Marshalling parameters
The process of converting method parameters and method names into a format suitable for network transmission in RMI.
Skeleton (RMI)
A server-side component that receives marshalled information from the client stub, unmarshals the parameters, invokes the actual method on the remote object, and marshals the return value back to the stub.
Unmarshalling
The process of converting marshalled parameters or return values back into their original object or data type format.
Object serialization
A technique in Java that allows the state of an object (nonremote objects in RMI) to be written to a byte stream, enabling it to be passed by copy across a network.
java.io.Serializable interface
A marker interface in Java that an object must implement to be eligible for object serialization, allowing its state to be written to a byte stream and used with RMI.
java.rmi.Remote interface
An interface that must be extended by any interface defining methods that can be invoked remotely in RMI.
java.rmi.RemoteException
An exception that must be thrown by all methods declared in a remote interface, indicating that a communication or network failure has occurred during an RMI call.
java.rmi.server.UnicastRemoteObject
A superclass in RMI that allows the creation of a single remote object that listens for network requests, using RMI's default socket-based communication scheme.
RMI registry
A naming service running on the server machine where remote objects register themselves with unique names, allowing clients to look them up by name.
rebind() method (Naming class)
A static method used by an RMI server to register an instance of a remote object with a specific name in the RMI registry.
lookup() method (Naming class)
A static method used by an RMI client to obtain a proxy reference to a remote object from the RMI registry using a URL-based lookup scheme (e.g., rmi://server/objectName).
rmiregistry command
A command-line tool used to start the RMI registry service on a host, allowing remote objects to be registered and looked up.