



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




CS 843 - Distributed Computing Systems - Final Exam - Name: Date: Friday, May 16, 2003, 10:00 - 11:50 AM (200 + 20 (bonus) 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.
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.
(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.
(b) What are the major goals of your research project? (6 points) (c) What is the scope of your research project? (6 points)
(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; }
#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.