Question 3:
transmission link 35000m long, 1Gbs, 10 MB
total time: 0.01018 ms
transmission link 2m long, 10bps, 10 mb
total time: 1000000 ms
Question 4:
IPC pipes are used to programs used to communicate and send messages/files to and from a host and a server. The server anticipates a connection from the host on a defined port, and the host creates the connection to begin communication. The pipe allows the host to write or create the file or message, and allows the server or other host to read it while being able to create a response. Two separate codes or programs are needed, one for the server and one for the host.
shared memory: instead of a pipe that sends the data, shared memory could be used to send and receive data or messages. Both parties can access the memory and read or write to it. so when one write data the other can read it, then write a response.
The programmer will need to include the header file <stdio.h> in the code to be able to use functions such as:
fopen( ) to open the pipe before writing into it
fwrite( ) to write into the pipe
fread( ) to read file or message
fclose( ) to close function or pipe after communication is complete
program of fread and fwrite
ReplyDelete