Review Questions on Chapter IV—IPC COSC 4330/6310 Summer 2013.

Slides:



Advertisements
Similar presentations
Processes Management.
Advertisements

Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
©2009 Operačné systémy Procesy. 3.2 ©2009 Operačné systémy Process in Memory.
SOLUTIONS FOR THE SECOND 4330 QUIZ Jehan-Francois Paris Summer 2014.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Computing Systems 15, 2015 Next up Client-server model RPC Mutual exclusion.
Exercises for Chapter 4: Interprocess Communication
Chapter IV Interprocess Communication Jehan-François Pâris
Informationsteknologi Wednesday, September 26, 2007 Computer Systems/Operating Systems - Class 91 Today’s class Mutual exclusion and synchronization 
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
Enforcing Mutual Exclusion Message Passing. Peterson’s Algorithm for Processes P0 and P1 void P0() { while( true ) { flag[ 0 ] = false; /* remainder */
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
1 Semaphores Special variable called a semaphore is used for signaling If a process is waiting for a signal, it is suspended until that signal is sent.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
02/02/2004CSCI 315 Operating Systems Design1 Interprocesses Communication Notice: The slides for this lecture have been largely based on those accompanying.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
02/01/2010CSCI 315 Operating Systems Design1 Interprocess Communication Notice: The slides for this lecture have been largely based on those accompanying.
Top Three Layers Session Layer Presentation Layer Application Layer.
EECS122 - UCB 1 CS 194: Distributed Systems Communication Protocols, RPC Computer Science Division Department of Electrical Engineering and Computer Sciences.
Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server Systems.
1 Chapter 2. Communication. STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered Protocol But some other protocols.
Problems with Send and Receive Low level –programmer is engaged in I/O –server often not modular –takes 2 calls to get what you want (send, followed by.
Chapter 4: Interprocess Communication‏ Pages
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
The Socket Interface Chapter 21. Application Program Interface (API) Interface used between application programs and TCP/IP protocols Interface used between.
3.1 Silberschatz, Galvin and Gagne ©2009Operating System Concepts with Java – 8 th Edition Chapter 3: Processes.
1 11/1/2015 Chapter 4: Processes l Process Concept l Process Scheduling l Operations on Processes l Cooperating Processes l Interprocess Communication.
Processes. Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Solutions to Second 4330/6310 Quiz Spring First question Which of the following statements are true or false (2 points) and why? (3 points)
More review questions for the second midterm COSC 4330/6310.
CE Operating Systems Lecture 13 Linux/Unix interprocess communication.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
Remote Procedure Call Andy Wang Operating Systems COP 4610 / CGS 5765.
IPC in BSD UNIX Pipes –a pipe is an IPC mechanism for transmitting data from one process to another within a single machine –e.g., between a parent and.
Remote Procedure Call RPC
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
Remote Procedure Call and Serialization BY: AARON MCKAY.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Manish Kumar,MSRITSoftware Architecture1 Remote procedure call Client/server architecture.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
 Process Concept  Process Scheduling  Operations on Processes  Cooperating Processes  Interprocess Communication  Communication in Client-Server.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Topic 3: Remote Invocation Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Solutions to the second midterm COSC 4330/6310 Summer 2013.
Communication in Distributed Systems. . The single most important difference between a distributed system and a uniprocessor system is the interprocess.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
The Transport Layer Implementation Services Functions Protocols
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Prof. Leonardo Mostarda University of Camerino
CMSC621: Advanced Operating Systems Advanced Operating Systems
Concurrency: Mutual Exclusion and Synchronization
Chapter 4: Processes Process Concept Process Scheduling
Sarah Diesburg Operating Systems COP 4610
Process-to-Process Delivery:
Remote Procedure Call (RPC)
Distributed Systems CS
CGS 3763 Operating Systems Concepts Spring 2013
CSC Advanced Unix Programming, Fall 2015
EECE.4810/EECE.5730 Operating Systems
Problems discussed in the review session for the second midterm
Distributed Systems CS
Last Class: Communication in Distributed Systems
Presentation transcript:

Review Questions on Chapter IV—IPC COSC 4330/6310 Summer 2013

First Question  How can you implement the at most once semantics in a remote procedure call package?

First Question  How can you implement the at most once semantics in a remote procedure call package? By adding sequence numbers to all client requests and instructing the server to ignore requests with duplicate serial numbers By adding sequence numbers to all client requests and instructing the server to ignore requests with duplicate serial numbers

First Question  What is the major advantage of atomic transactions?

First Question  What is the major advantage of atomic transactions? They either execute correctly or not at all They either execute correctly or not at all We do not have to worry about partial executions or duplicate executionsWe do not have to worry about partial executions or duplicate executions

First Question  How can you simulate a blocking receive primitive using a non-blocking receive ?

First Question  How can you simulate a blocking receive primitive using a non-blocking receive ? By doing a busy wait while (receive(…) == NO_MSG); By doing a busy wait while (receive(…) == NO_MSG);

First Question  What is the major advantage of streams over datagrams?

First Question  What is the major advantage of streams over datagrams? All data are transmitted in sequence and no data are damaged, lost or duplicated All data are transmitted in sequence and no data are damaged, lost or duplicated

First Question How do you pass a linked list to a remote procedure? How do you pass a linked list to a remote procedure?

First Question How do you pass a linked list to a remote procedure? How do you pass a linked list to a remote procedure? You send it as an array along with instructions how to rebuild it You send it as an array along with instructions how to rebuild it

First Question When should we worry about big- endians and little-endians? When should we worry about big- endians and little-endians?

First Question  When should we worry about big- endians and little-endians? Each time we exchange numerical data between two different machines Each time we exchange numerical data between two different machines Strings are never a problemStrings are never a problem

Second Question: True or False Second Question: True or False  All UNIX message passing primitives use direct naming.

Second Question: True or False Second Question: True or False  All UNIX message passing primitives use direct naming. FALSE, FALSE, they use sockets and sockets are private mailboxes

Second Question: True or False Second Question: True or False  Most servers use non-blocking receives.

Second Question: True or False Second Question: True or False  Most servers use non-blocking receives. FALSE, they use blocking receives FALSE, they use blocking receives

Second Question: True or False Second Question: True or False  Reliable datagrams guarantee that no message will be lost or duplicated.

Second Question: True or False Second Question: True or False  Reliable datagrams guarantee that no message will be lost or duplicated. FALSE, they only guarantee that no message will be lost or damaged FALSE, they only guarantee that no message will be lost or damaged Messages can still be duplicatedMessages can still be duplicated

Second Question: True or False Second Question: True or False  Making all remote procedures idempotent greatly simplifies the task of the RPC server.

Second Question: True or False Second Question: True or False  Making all remote procedures idempotent greatly simplifies the task of the RPC server. TRUE, we do not have to worry about multiple executions TRUE, we do not have to worry about multiple executions

Second Question: True or False Second Question: True or False  In a RPC, one of the tasks of the user stub is to exchange messages with the user program.

Second Question: True or False Second Question: True or False  In a RPC, one of the tasks of the user stub is to exchange messages with the user program. FALSE, the user stub is in the same address space as the user program FALSE, the user stub is in the same address space as the user program It exchanges messages with the server stubIt exchanges messages with the server stub

Third Question  What would you need to do to simulate streams using datagrams? (10 points)

Third Question  What would you need to do to simulate streams using datagrams? (10 points) Use positive acknowledgments to ensure that all messages will be delivered intact. Use positive acknowledgments to ensure that all messages will be delivered intact. Attach a serial number to each message to detect duplicate messages and reorder messages that arrive out-of-order. Attach a serial number to each message to detect duplicate messages and reorder messages that arrive out-of-order. Remove message boundaries. Remove message boundaries.

Fourth Question  Consider the function void doubletrouble(int *one, int *two) { *one += *one; *two += *two; } // doubletrouble`  and assume the calling sequence: alpha = 10; doubletrouble (&alpha, &alpha);

Fourth Question  What will be the value of alpha after the call assuming that The call was a conventional procedure call? Answer: alpha = ____________ The call was a conventional procedure call? Answer: alpha = ____________ The call was a remote procedure call? Answer: alpha = ____________ The call was a remote procedure call? Answer: alpha = ____________

Fourth Question  What will be the value of alpha after the call assuming that The call was a conventional procedure call? Answer: alpha = 40 The call was a conventional procedure call? Answer: alpha = 40 The call was a remote procedure call? Answer: alpha = ____________ The call was a remote procedure call? Answer: alpha = ____________

Fourth Question  What will be the value of alpha after the call assuming that The call was a conventional procedure call? Answer: alpha = 40 The call was a conventional procedure call? Answer: alpha = 40 The call was a remote procedure call? Answer: alpha = 20 The call was a remote procedure call? Answer: alpha = 20

Passing by reference Caller: … int alpha; alpha = 10; doubletrouble(&alpha, &alpha); … alpha Pass TWICE the ADDRESS of variable alpha Alpha gets incremented TWICE

Passing by value and result Pass twice the VALUE of alpha: 10 and 10 Return NEW VALUES: 20 and 20 Caller: … int alpha; alpha = 10; doubletrouble(&alpha, &alpha); … alpha