Sockets
Socket = end point of communication link for each process == IP Address + Port number
Servers implementing specific services listen to well known ports ( telnet=23 , ftp=21 , web,http=80)
ports below 1024 is well known and reserved for specific services.
Remote Procedure Call(RPC)
RPC is a protocol that one program can use to request a service from a program located in another computer.
it use message based communciation scheme.
now messages are more than just packet of data , it is well structured.
at server port there is RPC daemon running and tries to catch request from client.
client sends a request with a parameter to specific RPC daemon.
then with that parameter specific function(servcie) is executed.
each client and server has "stub" whichi is interface that allows process to ignore network specific stuff.
before client sends a request to server with parameter. stub marshal paramter so it can be send in network.
after server side stub receive request with parameter , stub acts like controller and pass it to specific function(service) and return the result in same method as client send request.
Issue in RPC
issue = Representation of 32-bit integers == big endian and small endian issue
resolve = machine independent representation == external data representation(XDR) , works like a interface and converts to XDR representation.
issue = RPC can fail or be duplicated and execute it more than once , as a result of common network errors.
resolve = OS must ensure that message are acted on exactly one rather than at most once. once server fullfill request it needs to send acknowledgement to client , to let client know its request is fulfilled and doesn't send request anymore.
issue = (base case) what if client and server doesn't know each other's port number.
resolve
1. fixed port address == predetermined information
2. Rendezvous mechanism == OS providdes rendezvous daemon on a fixed RPC port and this works like match maker and returns specific(what cilent requested) port number.
notice kernel take care of RPC protocol at client side.
'Operating System > O.S(Neso Academy, HPC Lab. KOREATECH)' 카테고리의 다른 글
10)Threading issue (fork , cancellation) , CPU and I/O burst cycles (0) | 2021.05.10 |
---|---|
9)Threads , Hyper-threading , fork() and exec() System call (0) | 2021.05.09 |
7)Shared Memory Systems , Message Passing Systems (0) | 2021.05.05 |
6) Process Creation , Termination ,InterProcess Communication (0) | 2021.05.04 |
5) Process State ,Process Control Block , Process Scheduling, Context Switch (0) | 2021.05.03 |