Docsity

Final Exam - Distributed Computing Systems | CS 843, Exams of Computer Science

Toggle sidebar
bg1
CS 843 - Distributed Computing Systems - Final Exam - Name:
Date: Friday, May 16, 2003, 10:00 - 11:50 AM
(200 + 20 (bonus) points)
1. Briefly explain these terminologies. If they are acronyms, also write what they stand for. (24 points)
(a) Software agent - A software agent is an autonomous process capable of reacting to, and initiating changes
in, its environment, possibly in collaboration with users and other agents.
(b) LDAP - Lightweight Directory Access Protocol (LDAP) is a protocol for directory services enabling anyone
to locate organizations, individuals, and other resources in a network.
(c) NTP - Network Time Protocol (NTP) is a protocol that is used to synchronize computer clock times in a
network of computers.
(d) 2PL - Two-phase Locking (2PL) is a concurrency control method that acquires all necessary locks in
growing phase, releases locks in shrinking phase.
(e) PGP - Pretty Good Privacy (PGP) is a popular program used to encrypt and decrypt e-mail over the
Internet.
(f) IIOP - IIOP (Internet Inter-ORB Protocol) is a protocol that makes it possible for distributed programs
written in different programming languages to communicate over the Internet.
2. Fill out the following table of a comparison between different systems: (20 points)
Item Distributed OS Network OS Middleware-based DS
Multicomputer
Degree of transparency High Low High
Same OS on all nodes Yes No No
Number of copies of OS N N N
Basis for communication Messages Files Model specific
Resource management Global, Per node Per node
distributed
Scalability Moderately Yes Varies
Openness Closed Open Open
3. Complete the following table listing the seven layers in the OSI 7-Layer Reference Model. Give an example
protocol for each layer. (10 points)
Layer level Layer Name Example
Layer 7 Application Layer HTTP
Layer 6 Presentation Layer ASN.1
Layer 5 Session Layer WSP
Layer 4 Transport Layer TCP/UDP
Layer 3 Network Layer IP
Layer 2 Data Link Layer PPP
Layer 1 Physical Layer RS-232-C
pf3
pf4
pf5

Partial preview of the text

Download Final Exam - Distributed Computing Systems | CS 843 and more Exams Computer Science in PDF only on Docsity!

CS 843 - Distributed Computing Systems - Final Exam - Name: Date: Friday, May 16, 2003, 10:00 - 11:50 AM (200 + 20 (bonus) points)

  1. Briefly explain these terminologies. If they are acronyms, also write what they stand for. (24 points)

(a) Software agent - A software agent is an autonomous process capable of reacting to, and initiating changes in, its environment, possibly in collaboration with users and other agents. (b) LDAP - Lightweight Directory Access Protocol (LDAP) is a protocol for directory services enabling anyone to locate organizations, individuals, and other resources in a network. (c) NTP - Network Time Protocol (NTP) is a protocol that is used to synchronize computer clock times in a network of computers. (d) 2PL - Two-phase Locking (2PL) is a concurrency control method that acquires all necessary locks in growing phase, releases locks in shrinking phase. (e) PGP - Pretty Good Privacy (PGP) is a popular program used to encrypt and decrypt e-mail over the Internet. (f) IIOP - IIOP (Internet Inter-ORB Protocol) is a protocol that makes it possible for distributed programs written in different programming languages to communicate over the Internet.

  1. Fill out the following table of a comparison between different systems: (20 points)

Item Distributed OS Network OS Middleware-based DS

Multicomputer

Degree of transparency High Low High

Same OS on all nodes Yes No No

Number of copies of OS N N N

Basis for communication Messages Files Model specific

Resource management Global, Per node Per node

distributed

Scalability Moderately Yes Varies

Openness Closed Open Open

  1. Complete the following table listing the seven layers in the OSI 7-Layer Reference Model. Give an example protocol for each layer. (10 points)

Layer level Layer Name Example

Layer 7 Application Layer HTTP

Layer 6 Presentation Layer ASN.

Layer 5 Session Layer WSP

Layer 4 Transport Layer TCP/UDP

Layer 3 Network Layer IP

Layer 2 Data Link Layer PPP

Layer 1 Physical Layer RS-232-C

  1. Consider the following code:

int f(x,y) { x = x + 1 ; y = x * y - 5; return(x + y); }

main() { int a, b; a = 2; b = f(a, a); printf("a = %d, b = %d \n",a,b); }

What will be printed if the parameters are passed using:

(a) call-by-value? (b) call-by-reference? (c) call-by-copy/restore using Pascal semantics?

Which of the above parameter passing method(s) cannot be easily implemented using remote procedure calls? Explain. (8 points)

(a) i. a = 2, b = 4 ii. a = 4, b = 8 iii. a = 3, b = 4 (Pascal semantics) (b) Call-by-reference cannot be easily implemented because the reference addresses are different between the local and remote machines.

  1. (a) What is an idempotent operation? (3 points)

(b) For each of the following applications, do you think at-least-once semantics or at most once semantics is best? Discuss. (6 points) i. Write a block of data into a file ii. Request the number of users currently logged into a remote system iii. Deposit money into a bank account

(a) An idempotent operation is an operation that can be performed repeatedly with the same effect. (b) For (i) and (ii), at least once is best. There is no harm trying over and over. For (iii), it is best to give it only one try. If that fails, the user will have to intervene to clean up the mess.

(b) Using the RSA public key cryptography algorithm. (8 points) i. If p = 5 and q = 11, list four legal values for d. ii. If p = 7, q = 13, and d = 7, find e. i. z = (p - 1) × (q - 1) = 4 × 10 = 40, d = 7, 11, 13, 17, 19, 23 ii. z = (p - 1) × (q - 1) = 6 × 12 = 72, 7 × e mod 72 = 1, 73, 145, 217, 7 × e = 217, e = 31. (c) Why are asymmetric encryption algorithms usually used for authentication and symmetric encryption algorithms for document secrecy? (4 points) Asymmetric encryption algorithms provide the public-key which facilitates authentication. In addition, they are usually too slow for document encryption. Symmetric encryption is usually fast enough to use secret key to encrypt document.

  1. (a) What is the topic of your research project? (4 points)

(b) What are the major goals of your research project? (6 points) (c) What is the scope of your research project? (6 points)

  1. Consider an application that implements a remote phone book. The phone book offers 4 operations: count to return the total count of entries (personal or business name), insert to insert an entry and its phone number, delete to delete an entry, and lookup to search for an entry and return its phone number.

(a) Use Sun RPC to specify this application. (10 points) (b) Specify this application in a Java RMI interface file. (10 points)

(a) Sun RPC struct directory_entry { string name; int phoneno; };

program RDIRPROG { version RDICTVERS { int COUNT(void) = 1; int INSERT(directory_entry) = 2; int DELETE(string) = 3; int LOOKUP(string) = 4; } = 1; } = 0x30090949; (b) Java RMI interface file import java.rmi.*; public interface DirectoryInterface extends Remote { public long count() throws RemoteException; public long insert(String name, int phoneno) throws RemoteException; public long delete(String name) throws RemoteException; public int lookup(String name) throws RemoteException; }

  1. Consider the following header file (day.h) and C code. (24 points)

#define NAMESIZE 40

typedef struct { int day; int month; int year; } date;

struct person { char name[NAMESIZE]; date birthdate; };

#include <day.h> extern date birthday_dblookup(char ); / database lookup by name */ extern char *list_dblookup(date); / database lookup by date */

date birthday_lookup (char *name) { return(birthday_dblookup(name)); }

char **list_lookup(date birthday) { return(list_dblookup(birthday)); }

main() { char name[NAMESIZE]; date birthday; char **list; int i = 0;

printf("Name: "); scanf("%s", name); birthday = birthday_lookup(name); printf("Hello! %s, your birthday is %d-%d-%d.\n", name, birthday.day, birthday.month, birthday.year); list = list_lookup(birthday); printf("Following persons have the same birtday as you:\n"); while (list[i] != ’\0’) printf("%s\n", list[i++]); }

(a) Use CORBA IDL to specify this application (The main function is not required). (b) Suppose BirthdayDBLookup and ListDBLookup are two available Java methods corresponding to C birthday dblookup and list dblookup functions respectively. Write the Java servant class that im- plements the interfaces and methods defined in the above COBRA IDL file.