Chapter 3 - Memory Management

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

What are the two fundamental ways that an RMI and an RPC differ?

1. RPC's support procedural programming. Only remote procedures or functions may be called, whereas RMI's support the invocation of methods on remote objects. 2. The parameters to RMI's can be objects while the parameters to RPC's must be ordinary data structures.

When communicating with sockets, a client process initiates a request for a connection and is assigned a port by the host computer. What would be a valid port assignment for the host computer?

1625

Describe 2 approaches to the binding of client and server ports during RPC (remote procedure calls) calls.

1: The binding info may be predetermined in the form of fixed port addresses. At compile time, an RPC call has a fixed port number associated with it. 2. Binding can be done dynamically by a rendezvous mechanism. Typically, an OS provides a rendezvous daemon on a fixed RPC port. A client then sends a message containing the name of the RPC to the rendezvous daemon requesting the port address of the RPC it needs to execute. The port number is returned and the RPC calls can be sent to that port until the process terminates or the server crashes.

What is a loopback and when is it used?

A loopback is a special IP address: 127.0.0.1. When a computer refers to this IP address, it is referring to itself. When using sockets for client/server communication, this mechanism allows a client and server on the same host to communicate using the TCP/IP protocol.

What is true in a Mach operating system?

All messages have the same priority

Name the three types of sockets used in Java and the classes that implement them.

Connection-oriented (TCP) implemented with the Socket class. Connectionless (UDP) implemented with the DatagramSocket class. Multicast socket implemented in the MulticastSocket class (subclass of the DatagramSocket class, allows data to be sent to multiple recipients)

TRUE or FALSE: Sockets are considered a high-level communications scheme.

FALSE

TRUE or FALSE: The difference between a program and a process is that a program is an active entity while a process is a passive entity.

FALSE

Explain the term marshalling.

Marshalling involves the packaging of parameters into a form that can be transmitted over the network. When the client invokes a remote procedure, the RPC system calls the appropriate stub, passing it the parameters provided to the remote procedure. This stub locates the port on the server and marshals the parameters. If necessary, return values are passed back to the client using the same technique.

Explain the terms "at most once" and "exactly once" and indicate how they relate to remote procedure calls.

Since a remote procedure call can fail in any number of ways, it is important to be able to handle such errors in the messaging system. The term "at most once" refers to ensuring that the server processes a particular message sent by the client only once and not multiple times. This is implemented by checking the timestamp of the message. The term "exactly once" refers to making sure that the message is executed on the server once and only once so that there is a guarantee that the server received and processed the message.

TRUE or FALSE: A socket is identified by an IP address concatenated with a port number.

TRUE

TRUE or FALSE: For a single-processor system, there will never be more than one running process.

TRUE

TRUE or FALSE: Using a section object to pass messages over a connection port avoids data copying.

TRUE

When a child process is created, what is a possibility in terms of the execution or address space of the child process?

The child process can run concurrently with the parent. The child process can have a new program loaded into it. And the child process can be a duplicate of the parent.

Explain the difference between an I/O-bound process and a CPU-bound process.

The differences come from the amount of I/O requests that the process generates. An I/O-bound process spends more time seeking I/O operations than doing computational work, while the CPU-bound process infrequently requests I/O operations and spends more of its time doing computational work.

Explain the main differences between a short-term and long-term scheduler.

The main difference between the two schedulers is frequency of execution. The short-term scheduler is designed to frequently select a new process for the CPU (at least once every 100 ms), so it must be fast. The long-term scheduler executes much less frequently (could be minutes before it creates a new process). It controls the degree of multiprogramming, and because of the long interval between executions it can afford to take more time to decide which process should be selected next.

Explain the concept of a context switch.

Whenever the CPU starts executing a new process, the old process's state must be preserved. The context of a process is represented by its process control block. Switching the CPU to another process requires performance of a state save of the current process and a state restore of a different process. This is the context switch - the kernel saves the context of the old process in its PCB and loads the saved context of the new process scheduled to run.

The list of processes waiting for a particular I/O device is called a(n) ______

device queue

A process control block ______

includes information on the process's state

Name and describe the different states that a process can exist in at any given time.

new, running, waiting, ready, and terminated. The process is created while in the new state, the process is executing in the running state, it is waiting for an event to occur in the waiting state, the process is ready and waiting to be assigned to a processor in the ready state, and the process is finished executing in the terminated state.

If local objects are to be passed as parameters to remote objects in Java, the local objects must implement which interface?

serializable

In RMI, the ______ is responsible for unmarshalling the method parameters and invoking the method on the server.

socket

The ______ of a process contains temporary data such as function parameters, return addresses, and local variables.

stack

In Java, objects are considered remote if they reside on different ______.

virtual machines

In a(n) ______ temporary queue, the sender must always block until the recipient receives the message.

zero capacity temporary queue


संबंधित स्टडी सेट्स

International Business Midterm Q's

View Set

Subject and Predicate, Subject and Predicate

View Set

5.1 Chemistry - Instrumentation Part 1 (1-40)

View Set

Marketing Strategy ch1-5 review exam

View Set