TU Wien:Verteilte Systeme UE (Rausch)/Gesammelte Test MC-Fragen

Aus VoWi
Zur Navigation springen Zur Suche springen

Info[Bearbeiten | Quelltext bearbeiten]

Das sind alle MC-Fragen, die ich im informatik-forum so gefunden habe. Formatierung ist noch recht unschön, aber mal ein Anfang. Würde mich freuen, wenn ihr sie erweitert, jedoch bitte nur mit neue Fragen ;).

27.01.2023 - 4[Bearbeiten | Quelltext bearbeiten]

Frage 1

In RMI for bootstrapping purposes you have to register with the RMI registry ...

  • ☐ True
  • ☒ False

Frage 2

In asymmetric cryptography, which key is used to decrypt a message?

  • ☐ The sender's private key.
  • ☒ The receiver's private key.
  • ☐ The sender's public key.
  • ☒ The receiver's public key.
  • ☐ The shared secret key.

Frage 3

If an object is an instance of java.rmi.server.UnicastRemoteObject then it also implements java.io.Serializable.

  • ☒ True
  • ☐ False

Frage 4

Asymmetric cryptography: To make sure only the intended receiver can decrypt a message, it has to be encrypted with the sender's private key.

  • ☐ True
  • ☒ False

Frage 5

In asymmetric cryptography, which key is used to encrypt a message?

  • ☐ The sender's private key.
  • ☐ The receiver's private key.
  • ☐ The sender's public key.
  • ☒ The receiver's public key.
  • ☐ The shared secret key.

Frage 6

A stub in RMI is the component responsible for:

  • ☐ True
  • ☒ False

Frage 7

Mark the correct answers concerning TCP and UDP Sockets in Java:

  • ☒ True
  • ☐ False

Frage 8

When a synchronized method is called in Java, a lock is obtained on:

  • ☒ The object (this)
  • ☐ The method
  • ☐ The class
  • The variables used in the method

Frage 9

Symmetric encryption techniques make us of key pairs (public and private key) to encrypt and decrypt messages:

  • ☐ True
  • ☒ False

Frage 10 (falsch)

Mark the correct answer(s) concerning concurrency and synchronization in Java:

Wählen Sie eine oder mehrere Antworten:

  • ☒ If a java.util.HashMap is accessed only by retrieving it from a getter method, the HashMap can be made thread-safe by writing the synchronized keyword in front of that getter method.
  • ☐ A java.util.HashMap may throw a ConcurrentModificationException even with perfectly proper synchronization.
  • ☐ If a class is defined as synchronized (e.g., public synchronized class Foo) then all methods of this class are automatically thread safe.
  • ☒ Adding the synchronized modifier to the method signature is effectively equivalent to enclosing the body of the method with a synchronized(this) {...} block.

Frage 11

Which statement(s) regarding security hold true:

  • ☒ Data integrity refers to the fact that data must be reliable and accurate over its entire lifecycle.
  • ☒ Data encryption is a common method of ensuring confidentiality.
  • ☐ Data encryption is a common method of ensuring integrity.
  • ☒ Confidentiality concerns with protecting sensitive information from disclosure to unauthorized parties.

Frage 12

Which statements about the startsecure handshake protocol implemented in Lab 2 are correct?

  • ☒ Its purpose is to be guard against replay attacks (a once valid transmission is fraudulently repeated or delayed).
  • ☐ During the handshake, the sender uses the receiver's private key for encryption.
  • ☒ The initial handshake (encrypted via RSA) is used to safely exchange the AES key.

27.01.2023 - 3[Bearbeiten | Quelltext bearbeiten]

Insgesamt 20 Fragen. Habe nur richtige Fragen geposted. LG Big Schnozer

Frage 1

Which statement(s) hold true regarding cryptography:

  • ☐ Asymmetric cryptography is significantly faster than symmetric cryptography.
  • ☐ If possible, asymmetric cryptography should always be preferred over symmetric cryptography.
  • ☒ Asymmetric cryptography can be either used for encryption or signing.
  • ☒ The exchange of a common key bears a potential risk for symmetric cryptography.

Frage 2

Mark the correct answers regarding data and multithreading:

  • ☒ If a Java program with multiple threads runs on a single processor (CPU), the operations of all concurrent threads are executed sequentially. The execution order of these operations is non-deterministic.
  • ☐ The JVM automatically performs synchronization where multiple threads try to manipulate data.
  • ☐ Objects that are passed into other threads are automatically passed as deep copies to ensure thread safety.
  • ☒ The programmer has to ensure that concurrent access to data by multiple threads is synchronized.

Frage 3

Which statements about Java RMI are correct?

  • ☒ It is an API to hide network communication from the programmer.
  • ☒ It allows programs running in different Java Virtual Machines to communicate.
  • ☐ It is the object-oriented equivalent of TCP.
  • ☐ It simplifies data exchange between programs written in different languages.

Frage 4

Which procedure is used to establish a TCP connection?

  • ☐ Request/response messaging
  • ☐ Two-way handshake
  • ☐ TCP does not require connection establishment
  • ☒ Three-way handshake

Frage 5

Which statements about symmetric key encryption are correct?

  • ☐ RSA is an example of symmetric encryption.
  • ☒ AES is an example of symmetric encryption.
  • ☒ The same key is used for encryption and decryption.

Frage 6

In order to establish a connection with a server socket, is it required to manually specify the local port number of the Java client socket?

  • ☐ Yes, the local port has to be specified upon creation of the client socket.
  • ☒ No, the underlying platform will choose a free port at random.
  • ☐ No, the client socket will automatically negotiate a port number with the server socket via the handshake protocol.

Frage 7

Which statements about Base64 encoding are correct?

  • ☐ Base64 is a hash-based encoding scheme.
  • ☐ Base64 encoded messages are less vulnerable to man-in-the-middle attacks.
  • ☒ Encoding messages with Base64 increases their data size.
  • ☒ Base64 encoding is necessary to send binary data over plain text channels.

Frage 8

Asymmetric cryptography: To make sure only the intended receiver can decrypt a message, it has to be encrypted with the receiver's public key.

  • ☒ Wahr
  • ☐ Falsch

Frage 9

Which properties does the DMTP (DSLab Message Transfer Protocol) protocol have?

  • ☐ Binary
  • ☒ Plain-text
  • ☐ Asynchronous
  • ☒ Synchronous

Frage 10

Which types of objects can be passed as parameters to a method defined by an RMI remote object (suppose both client and server have access to the same code).

  • ☒ Any primitive data type.
  • ☐ Any object that does not use other complex types (like collections).
  • ☒ Any fully serializable object.
  • ☐ Any object that only has primitive members.
  • ☒ References to other remote objects.

Frage 11

To generate a Hash-based message authentication code (HMAC) one needs:

  • ☒ A shared secret key.
  • ☐ A public and private key.
  • ☐ Only an appropriate hash function.

Frage 12

Imagine you want to execute Java code in a new Thread. One possibility is to write a class MyExecutable that implements the interface java.lang.Executable and to create a new Thread that executes the code in MyExecutable.

  • ☐ Wahr
  • ☒ Falsch

Frage 13

Which statements about UDP are correct?

  • ☐ UDP re-transmits lost packages.
  • ☒ UDP is a connectionless protocol.
  • ☐ UDP guarantees that packets are received in the order they were sent.
  • ☒ UDP is useful when the loss of individual packets is unimportant.

27.01.2023 - 2[Bearbeiten | Quelltext bearbeiten]

Frage 2

Which statement(s) hold true for Message Authentication Codes (MAC):

  • ☐ A message is encrypted with a shared key before sending and the resulting ciphertext is transferred alongside with the original message.
  • ☐ A message is encrypted and hashed before sending and the resulting hash is transferred alongside with the original message.
  • ☒ A message and a shared secret are hashed before sending and the resulting hash is transferred alongside with the original message.
  • ☐ A message and the public key of the authenticated receiver are hashed before sending and the resulting hash is transferred alongside with the original message.

Frage 4

Assume a remote interface MyRemoteA and another remote interface MyRemoteB that declares a method with the signature void foo(MyRemoteA a) throws RemoteException;. Is the method signature of foo a valid signature for an RMI remote method?

  • ☒ True
  • ☐ False

Frage 5

Which properties does the DMTP (DSLab Message Transfer Protocol) protocol have?

  • ☐ Binary
  • ☒ Plain-text
  • ☐ Asynchronous
  • ☒ Synchronous

Frage 6

Which statements about symmetric key encryption are correct?

  • ☐ RSA is an example of symmetric encryption.
  • ☒ AES is an example of symmetric encryption.
  • ☒ The same key is used for encryption and decryption.

Frage 7

Asymmetric cryptography: To make sure only the intended receiver can decrypt a message, it has to be encrypted with the receiver's public key.

  • ☒ True
  • ☐ False

Frage 9

Which statements about Java RMI are correct?

  • ☒ It allows programs running in different Java Virtual Machines to communicate.
  • ☐ It is the object-oriented equivalent of TCP.
  • ☒ It is an API to hide network communication from the programmer.
  • ☐ It simplifies data exchange between programs written in different languages.

Frage 10

What type of service does TCP provide? Tick all that apply.

  • ☒ reliable
  • ☐ unreliable
  • ☒ connection-oriented
  • ☐ connection-less

Frage 11

Which types of exceptions can be used in the throws clause of remote object methods in RMI?

  • ☐ Only exceptions that extend from java.rmi.RemoteException.
  • ☒ Any exception that extends java.lang.Exception.
  • ☐ Only exceptions that extend from java.lang.RuntimeException.
  • ☐ RMI does not support custom exceptions.

Frage 12

Consider the following code that reads from a network socket:

           BufferedReader reader = new BufferedReader(...);
           try {
               String line = reader.readLine();
               System.out.println(line);
           } catch(InterruptedException e) {
               System.out.println("interrupted");
           }

Suppose the underlying socket is waiting on new data, but the executing thread is interrupted usingThread.interrupt(), what happens?

  • ☒ Nothing, readLine() continues to block.
  • ☐ null is printed to System.out and the method exits.
  • ☐ interrupted is printed to System.out and the method exits.

Frage 13

What happens when the shutdown method of java.util.concurrent.ExecutorService is called?

  • ☐ All threads submitted to the executor are terminated.
  • ☐ The thread running the executor is terminated.
  • ☒ The executor stops accepting new submit requests.
  • ☐ The method blocks until all threads submitted to the executor have finished.

Frage 14

Asymmetric cryptography: The only way to encrypt a message is to use the public key, while the private key can only be used for decryption.

  • ☒ False
  • ☐ True

Frage 15

Which statement(s) hold true regarding cryptography:

  • ☐ Asymmetric cryptography is significantly faster than symmetric cryptography.
  • ☐ If possible, asymmetric cryptography should always be preferred over symmetric cryptography.
  • ☒ Asymmetric cryptography can be either used for encryption or signing.
  • ☒ The exchange of a common key bears a potential risk for symmetric cryptography.

Frage 16

  • ☒ Any primitive data type.
  • ☐ Any object that does not use other complex types (like collections).
  • ☒ Any fully serializable object.
  • ☐ Any object that only has primitive members.
  • ☒ References to other remote objects.

Frage 17

What are the benefits of using Base64 encoding?

  • ☐ The security is enhanced as the data is additionally encrypted with Base64.
  • ☒ It is possible to transmit any kind of data as a text string.
  • ☐ The data throughput is increased because of the higher bit-rate of Base64.
  • ☒ Control characters are converted to printable ASCII characters.

Frage 18

If a method with the signature synchronized void doWork() {...} is accessed by two different threads on the same object instance, only one of the threads can execute at a time.

  • ☒ True
  • ☐ False

Frage 19

To establish a bidirectional communication between a server and a client through Java sockets, how many sockets and streams do you need at least on each side?

  • ☒ 1 socket, 1 output stream and 1 input stream on each side (2 sockets, 4 streams in total on both sides).
  • ☐ 2 sockets per side, each with 1 output stream and 1 input stream (4 sockets, 8 streams in total on both sides).
  • ☐ 1 socket with 1 output stream plus 1 socket with 1 input stream, on each side (4 sockets, 4 streams in total on both sides).

Frage 20

If two hosts are communicating via UDP, both sides have to use the same port number for the UDP communication.

  • ☒ False
  • ☐ True

27.01.2023 - 1[Bearbeiten | Quelltext bearbeiten]

Es kamen ähnliche Fragen wie im Vorjahr, hier sind weitere Fragen, die noch gestellt worden sind:

Frage 1

If a method with the signature synchronized void doWork() {...} is accessed by two different threads on the same object instance, only one of the threads can execute at a time.

  • ☒ Wahr
  • ☐ Falsch

Frage 2

When a synchronized method is called in Java, a lock is obtained on:

  • ☒ The object (this)
  • ☐ The method
  • ☐ The class
  • ☐ The variables used in the method

Frage 3

RSA is an example of a symmetric encryption protocol.

  • ☐ Wahr
  • ☒ Falsch

Frage 4

To generate a Hash-based message authentication code (HMAC) one needs:

  • ☒ A shared secret key
  • ☐ A public and private key
  • ☐ Only an appropriate hash function.

Frage 5

What happens when the shutdown method of java.util.concurrent.ExecutorService is called?

  • ☐ All threads submitted to the executor are terminated.
  • ☐ The thread running the executor is terminated.
  • ☐ The executor stops accepting new submit requests.
  • ☐ The method blocks until all threads submitted to the executor have finished.

Frage 6

Which statements about Java RMI are correct?

  • ☒ It allows programs running in different Java Virtual Machines to communicate.
  • ☐ It is the object-oriented equivalent of TCP.
  • ☒ It is an API to hide network communication form the programmer.
  • ☐ It simplifies data exchange between programs written in different languages.

Frage 7In asymmetric cryptography, which key is used to decrypt a message?

  • ☐ The sender's private key.
  • ☒ The receiver's private key.
  • ☐ The sender's public key.
  • ☐ The receiver's public key.
  • ☐ The shared secret key.

Frage 8

Which types of exceptions can be used in the throws clause of remote object methods in RMI?

  • ☐ Only exceptions that extend from java.rmi.RemoteException .
  • ☐ Any exception that extends java.lang.Exception .
  • ☐ Only exceptions that extend from java.lang.RuntimeException .
  • ☐ RMI does not support custom exceptions.

Frage 9

Consider the following code that reads from a network socket:

 BufferedReader reader = new BufferedReader(...);

while(!Thread.interrupted()) {

    String line = reader.readLine();

    System.out.println(line);

}

Suppose the underlying socket is waiting on new data, but the executing thread is interrupted using Thread.interrupt(), what happens?

  • null is printed on System.out and then the loop terminates.
  • ☒ Nothing, readLine() continues to bock.
  • ☐ An InterruptedException is thrown and the method exits.

Frage 10

Consider the following code that reads from a network socket:

 BufferedReader reader = new BufferedReader(...);

try{

    String line = reader.readLine();

    System.out.println(line);

} catch(InterruptedException e) {

    System.out.println("interrupted");

}

Suppose the underlying socket is waiting on new data, but the executing thread is interrupted using Thread.interrupt(), what happens?

  • null is printed on System.out and the method exits.
  • ☒ Nothing, readLine() continues to bock.
  • interrputed is printed to System.out and the method exits.

Frage 11

Invocations to remote objects via RMI are thread safe.

  • ☐ Wahr
  • ☒ Falsch

Frage 12

Which procedure is used to establish a TCP connection?

  • ☐ Request/response messaging
  • ☐ Two-way handshake
  • ☒ Three-way handshake
  • ☐TCP does not require connection establishment

Frage 13

What is true about the challenge-respones authentication protocol (as used in the Lab):

  • ☒ Its purpose is to be safe against reply attacks (a once valid transmission is fraudulently repeated or delayed).
  • ☐ During the handshake, the sender uses the receiver's private key for encryption.
  • ☒ The initial handshake (encrypted via RSA) is used to safely exchange the AES keys.

Frage 14

Assume a remote interface o MyRemoteA and another remote interface MyRemoteB that declares a method with the signature void foo(MyRemoteA a) throws RemoteException; . Is the method signature of foo a valid signature for an RMI remote method?

  • ☒ Wahr
  • ☐ Falsch

Frage 15

Which statement(s) hold true for Message Authentication Codes (MAC):

  • ☐ A message is encrypted with a shared key before sending and the resulting ciphertext is transferred alongside with the original message.
  • ☐ A message is encrypted and hashed before sending and the resulting hash is transferrred alongside with the original message.
  • ☒ A message and a shared secret are hashed before sending and the resulting hash is transferred alongside with the original message.
  • ☐ A message and the public key of the authenticated receiver are hashed before sending and the resulting hash is transferred alongside with the original message.

Frage 16

Asymmetric cryptography: The only way to encrypt a message is to use the pubic key, while the private key can only be used for decryption.

  • ☐ Wahr
  • ☒ Falsch

Frage 17

Java RMi communication is encrypted

  • ☐ Wahr
  • ☒ Falsch

Frage 18

To establish a bidirectional communication between a server and a client through Java sockets, how many sockets and streams do you need at least on each side?

  • ☒ 1 socket, 1 output stream and 1 input stream on each side (2 sockets, 4 streams in total on both sides).
  • ☐ 2 sockets per side, with 1 output stream and 1 input stream (4 sockets, 8 streams in total on both sides).
  • ☐ 1 socket with 1 ouput stream plus 1 socket with 1 input stream, on each side (4 sockets, 4 streams in total on both sides).

Frage 19

Which procedure is used to establish a UDP connection?

  • ☐ Request/response messaging
  • ☐ Two-way handshake
  • ☐ Three-way handshake
  • ☒ UDP does not require connection establishment

28.01.2022[Bearbeiten | Quelltext bearbeiten]

Frage 1

Which statements about UDP are correct?

  • ☐ It is the object-oriented equivalent of remote procedure call (RPC).
  • ☐ It relies on the publish/subscribe messaging pattern.
  • ☐ It simplifies the coordination of multi-threaded programs.
  • ☒ It simplifies data exchange between Java programs.


Frage 2

Which statements about Java RMI are correct?

  • ☒ It is the object-oriented equivalent of remote procedure call (RPC).
  • ☐ It relies on the publish/subscribe messaging pattern.
  • ☐ It simplifies the coordination of multi-threaded programs.
  • ☒ It simplifies data exchange between Java programs.


Frage 3

Which types of connections does java.net.ServerSocket accept?

  • ☐ UDP connections.
  • ☒ TCP connections.
  • ☐ TCP and UDP connections.


Frage 4

What are valid methods to enable a thread-safe for-each loop iteration over a List myList1? Hint: consider the case that a second thread attempts to add an item to myList1 while the loop is still active.

  • ☐ Creating a thread-safe wrapper with Collections.synchronizedList(myList1).
  • ☐ There is no need for synchronization. An iteration is only a series of read-accesses.
  • ☒ Creating a synchronized block that uses myList1 as lock-object.


Frage 5

Which statements about Base64 encoding are correct?

  • ☐ Base64 adds a layer of security.
  • ☒ Base64 translates binary data to ASCII printable characters.
  • ☐ Base64 is necessary to send binary data over TCP channels.
  • ☒ Base64 encoded channels exhibit higher network traffic.


Frage 6

Similar to java.net.Socket, the input/output streams of java.net.DatagramSocket have to be closed.

  • ☐ Wahr
  • ☒ Falsch


Frage 7

Which statement(s) hold true for Message Authentication Codes (MAC):

  • ☐ A message is encrypted with a shared key before sending and the resulting ciphertext is transferred alongside with the original message.
  • ☐ A message is encrypted and hashed before sending and the resulting hash is transferred alongside with the original message.
  • ☒ A message and a shared secret are hashed before sending and the resulting hash is transferred alongside with the original message.
  • ☐ A message and the public key of the authenticated receiver are hashed before sending and the resulting hash is transferred alongside with the original message.


Frage 8

Which of these code snippets are valid ways of implementing a thread-safe, consistent, and atomic in-memory ID generator? Wählen Sie eine oder mehrere Antworten:

  • ☐ A:
class IdGenerator {
    int id = 0;

    int next() {
    id = id + 1;
    return id;
    }
}
  • ☐ B:
class IdGenerator {
    int id = 0;

    int next() {
    return ++id;
    }
}
  • ☒ C:
class IdGenerator {
    AtomicInteger id = new AtomicInteger();

    int next() {
    return id.incrementAndGet();
    }
}
  • ☒ D:
class IdGenerator {
    int id = 0;

    int synchronized next() {
    return ++id;
    }
}

Frage 9

Which statement(s) hold true regarding cryptography:

  • ☐ Asymmetric cryptography is significantly faster than symmetric cryptography.
  • ☐ If possible, asymmetric cryptography should always be preferred over symmetric cryptography.
  • ☒ Asymmetric cryptography can be either used for encryption or signing.
  • ☒ The exchange of a common key bears a potential risk for symmetric cryptography.


Frage 10

Java RMI communication is encrypted.

  • ☐ Wahr
  • ☒ Falsch


Frage 11

Which statements about symmetric key encryption are correct?

  • ☐ RSA is an example of symmetric encryption.
  • ☒ AES is an example of symmetric encryption.
  • ☒ The same key is used for encryption and decryption.


Frage 12

What happens when the close() method of a ServerSocket is called?

  • ☐ All socket connections that were accepted by the ServerSocket are closed.
  • ☒ The ServerSocket stops listening to new connection requests.
  • ☐ The connected clients receive an exception that the ServerSocket was closed.


Frage 13

Asymmetric cryptography: The only way to encrypt a message is to use the public key, while the private key can only be used for decryption.

  • ☐ Wahr
  • ☒ Falsch


Frage 14

Which statements about TCP are correct?

  • ☒ TCP automatically re-transmits lost packages.
  • ☐ TCP is a connectionless protocol.
  • ☒ TCP guarantees that packets are received in the order they were sent.
  • ☐ TCP is useful when the loss of individual packets is unimportant.


Frage 15

Which types of objects can be passed as parameters to a method defined by an RMI remote object (suppose both client and server have access to the same code).

  • ☒ Any primitive data type.
  • ☐ Any object that does not use other complex types (like collections).
  • ☒ Any fully serializable object.
  • ☐ Any object that only has primitive members.
  • ☒ References to other remote objects.


Frage 16

Consider the following class:

 class Worker {

    void synchronized foo() { /* ... */ }

    void synchronized bar() { /* ... */ }

}

Suppose two threads T1 and T2 call the same object Worker worker = new Worker(), but T1 calls worker.foo() and T2 calls worker.bar(). What happens?

  • ☒ T1 has to wait for T2 to finish.
  • ☐ T1 and T2 execute in parallel.


Frage 17

Which properties does the DMTP (DSLab Message Transfer Protocol) protocol have?

  • ☐ Binary
  • ☒ Plain-text
  • ☐ Asynchronous
  • ☒ Synchronous


Frage 18

Which properties does the DMAP (DSLab Message Access Protocol) protocol have?

  • ☐ Stateless
  • ☒ Plain-text
  • ☒ Stateful
  • ☐ Binary


Frage 19

How can you make an object which implements java.rmi.Remote remotely accessible through RMI?

  • ☒ I let its class extend java.rmi.remote.UnicastRemoteObject.
  • ☐ It is already remotely accessible, because of the implemented java.rmi.Remote interface.
  • ☒ I use the static exportObject method of java.rmi.remote.UnicastRemoteObject.
  • ☐ It is sufficient to bind the object in the RMI Registry.


Frage 20

In order to establish a connection with a server socket, is it required to manually specify the local port number of the Java client socket?

  • ☐ Yes, the local port has to be specified upon creation of the client socket.
  • ☒ No, the underlying platform will choose a free port at random.
  • ☐ No, the client socket will automatically negotiate a port number with the server socket via the handshake protocol.

23.01.2020[Bearbeiten | Quelltext bearbeiten]

Es waren ziemlich viele neue Fragen.


  • Kann ein TCP und UDP Server mit dem gleichen Port gestartet werden?
  • TCP ist
    • reliable
    • unreliable
    • connection-oriented
    • connection-less
  • DMAP ist
    • stateless
    • statefull
    • ...
    • ...
  • Frage bzgl. Kosten rekursive vs. iterative name resolution
  • RMI STUB ist verantwortlich für
    • client-side-communication
    • server-side-communication
  • Base64 ist
    • hash-basiert
    • ...
    • ...
    • ...

21.01.2015[Bearbeiten | Quelltext bearbeiten]

Die Fragen, die unten stehen, decken ziemlich alles ab, was heuer gekommen ist.


  • Objekte die Remote implementieren werden bei RMI via call by value, elementare Typen und Objekte die Serializable implementieren via call by reference übertragen. - Falsch, genau umgekehrt.
  • Wenn man eine eigene Klasse MyExecutable hat kann man diese in einem Thread ausführen wenn sie das Executable-Interface implementiert. - Falsch, es gibt kein Executable Interface

22.01.2014[Bearbeiten | Quelltext bearbeiten]

  • Muss ein DatagramSocket wie ein normales Socket mit close() geschlossen werden? -> Ja

23.01.2013[Bearbeiten | Quelltext bearbeiten]

  • Im Zuge des TCP Verbindungsaufbaues zweier Endpunkte wird ein 3-Wege-Handshake gemacht. Richtig
  • Ein Objekt wird remotely Accessible, wenn... (richtig ist: entweder erben von UnicastRemoteObjekt oder auf das Objekt müsste UnicastRemoteObject.exportObject(Remote obj, int port) angewandt werden.)
  • Wird eine Nachricht über UDP versandt, dann verwenden Sender und Empfänger denselben Port. Richtig (edit 20150126 - es muss nicht der gleiche sein, kann aber)
  • Kommunizieren (senden und erhalten) Client und Server miteinander via TCP, dann gibt es pro Partei:
    • 1 Socket und 2 Streams (Richtig)
    • 2 Sockets und 4 Streams
    • 1 ServerSocket, einen Socket und 8 Streams
  • Beim Aufruf einer entfernten Methode wird ein Argument übertragen:
    • Sofern das Argument ein primitiver Datentyp ist, dann wird es copy be refernce übertragen. Falsch (s. [1] Abschnitt "Passing Objects in RMI")
  • Es gibt eine remotly Accessible function, die eine Datenstruktur (Container) enthält. 2 Caller rufen zur selben Zeit die Funktion auf. Caller1 iteriert lesend über die Datenstruktur, während Caller2 noch ein Element an die Datenstruktur dranhängt: Damit es zu keinen Synchronizationsproblemen kommt, muss:
    • die Funktion in einen synchronized{} Block getan werden (Richtig)
    • ...
    • ...
  • Bei asymmetrischer Verschlüsselung sendet der Sender die Nachricht verschlüsselt mittels des public key des Empfängers. Richtig
  • Wird auf den ServerSocket die methode close() angewandt ( --> servSocket.close() ), dann:
    • Führt dies automatisch bei mit dem ServerSocket verbundenen Sockets zu socket.close();
    • Führt dies automatisch bei mit dem ServerSocket verbundenen Sockets zu einer SocketException
    • ... Die bereits offenen Sockets bleiben offen (Richtig)
  • 2 Funktionen (functionA und functionB) sind remotly accessible: In diesem Zusammenhang sind folgende 2 Interfaces implementiert: FunctionAInterface und FunctionBInterface. Ist es sinnvoll, dass die Methodendeklaration von functionA folgendermaßen ausschaut? functionA(FunctionBInterface fBi)
    • Ja, es ist sinnvoll.
    • Nein, es ist nicht sinnvoll.
      • Mein Tipp: An Callback Funktionen denken, ich vermute, dann ist so eine Methodendeklaration sinnvoll.
  • Wieviel Sockets und Streams braucht man, um eine bidirektionale Verbindung zu machen (glaube explizit TCP) 2 Sockets, 4 Streams
  • Welche sind zulässige Ansätze, um beim Iterieren über eine synchronisierte Datenstruktur threadsafe zu sein.

24.01.2012[Bearbeiten | Quelltext bearbeiten]

  • ein prozess kann mehrere threads haben, aber immer mindestens einen - Richtig
  • socket implementierungen können in unterschiedlichen programmiersprachen erfolgen - Richtig
  • rmi implementierungen können in unterschiedlichen programmiersprachen erfolgen - Falsch (bei der frage bin ich mir nicht sicher, darüber wurde viel diskutiert)
  • corba implementierungen können in unterschiedlichen programmiersprachen erfolgen - Richtig
  • udp bietet eine sichere datenübertragung - Falsch
  • socket ist punkt zu punkt - Richtig
  • thread kann runnable implementiert werden - Richtig
  • Symmetrische Verschlüsselung nutzt PKI - Falsch
  • Lokale Objekte werden serialisiert und Referenzobjekte per Stubs übergeben - Richtig
  • Ein Stub ist ein lokales Objekt was die Verbindung zum RemoteObject oder so darstellt - Richtig
  • Einen eigens ausgeführten Programmteil krieg ich wenn ich von Thread ableite - Richtig
  • RMI kümmert sich um synchronisierung - Falsch
  • Ist RMI per se Threadsafe ist. - Falsch
  • Kann man java.bla.Thread extenden um als Thread zu agieren? - Richtig
  • Verwendet man bei einem asymmetrischen Kryptosystem Public- und Privatekey? - Richtig
  • Verwendet man Challange Response zum authentifizieren von Kommunikationspartnern? - Richtig
  • TCP ist bidirektional --> ja

20.01.2011[Bearbeiten | Quelltext bearbeiten]

  • RMI Port nummer -> 1099
  • RSA n x q natürliche zahlen verwendet
  • ob sleep n try/catch braucht - ja wegen interruptex.
  • ob rsa hybrid ist -> Falsch, verwendet nur asynchrone Verschlüsselung
  • rsa Schlüssel mit 2 natürlichen Zahlen
  • Bei der RSA-Frage stand afair auch noch dabei, dass n = p * q dann als symmetrischer Schlüssel verwendet wird, was imo falsch ist.

20.01.2010[Bearbeiten | Quelltext bearbeiten]

  • UDP ist verbindsicher => FALSCH
  • socket ist punkt zu punkt => RICHTIG
  • thread kann runnable implementiert werden => RICHTIG