Computer Systems: A Programmer's Perspective Plus Mastering Engineering With Pearson Etext -- Access Card Package (3rd Edition)
3rd Edition
ISBN: 9780134123837
Author: Randal E. Bryant, David R. O'Hallaron
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 11, Problem 11.13HW
Program Plan Intro
IP addresses:
- The IP address denotes an unsigned integer that is 32-bit.
- The IP addresses is been stored by network programs in IP address structure.
- The addresses present in IP address structure are stored in network byte order.
- An unsigned 32-bit integer is transformed from host byte order to network byte order by “htonl” function.
- An unsigned 32-bit integer is transformed from network byte order host byte order by “ntohl” function.
- The IP address is presented to humans in a form known as “dotted-decimal” notation.
- Each byte is been represented by its corresponding decimal value and is separated by a period from other bytes.
Passing program arguments to server:
- The arguments for “GET” requests are passed in the URI.
- The character “?” separates filename from the arguments.
- The character “&” separates each argument.
- The arguments do not allow spaces in it.
Server passes arguments to child:
- The server calls “fork” to create a child process and calls “execve” to run program in child’s context once it receives a request.
- The child process sets CGI environment variable values.
- The “adder” program can reference it at run time using “getenv” function of linux.
Output is sent by child:
- The dynamic content of a CGI program is to be sent to standard output.
- A CGI program sends dynamic content to standard output.
- It uses “dup2” function for redirecting standard output to connected descriptor associated with client.
- The result written to standard output by CGI program, it goes directly to client.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Which of the following sequence of operations is performed by the local processor when a write hit bus transaction has occurred in MESI protocol?
Choose an answer
A
I->M
B
S->M, E->M
C
I->S, I->E
D
No change
In an RPC-like protocol, many requests can be active at the same time, and responses can be sent in any order: Assume that requests are sequentially numbered and that ACK[N] acknowledges reply[N]. Should ACKs be added up? If not, what should happen if an ACK is not received?
The connection oriented datagram socket uses UDP.
True
False
Chapter 11 Solutions
Computer Systems: A Programmer's Perspective Plus Mastering Engineering With Pearson Etext -- Access Card Package (3rd Edition)
Ch. 11.3 - Prob. 11.1PPCh. 11.3 - Prob. 11.2PPCh. 11.3 - Practice Problem 11.3 (solution page 967) Write a...Ch. 11.4 - Prob. 11.4PPCh. 11.5 - Prob. 11.5PPCh. 11 - Prob. 11.6HWCh. 11 - Prob. 11.7HWCh. 11 - Prob. 11.8HWCh. 11 - Modify TINY SO that when it serves static content,...Ch. 11 - Prob. 11.10HW
Knowledge Booster
Similar questions
- The current window size is cwnd = 24 and ssthresh = 6.Suppose, a triple duplicate ACK occurs. Using TCP Tahoe, theupdated values are cwnd = 12 and the threshold ssthresh =1.arrow_forwardWrite a Fixed Size message Send and Receive Pseudo Codes (you can also use C#) for TCP Communication. Fill only the insides of the functions. Unnecessary parts are not assessed (i.e. sockets are ready). Public byte[] SendFixData(Socket s,…) { * Fill the code* for sending fixed size messages* in Tcp Communications } Public byte[] ReceiveFixedData(Socket s,….) { * Fill the code * for receiving fixed size messages * in Tcp Communications}.arrow_forwardThe following event is shown to occur in the figure below illustrating the operation of TCP Reno. For the following prompt, clearly state where it occurs and how we can identify where this event occurs based on the shape of the graph or changes to the congestion window size. a.) A segment loss event due to a timeout.arrow_forward
- 1- Considering a communication with client–server connectionless (datagram) sockets, draw a flowchart for the client and serverarrow_forwardOne helpful exercise is to weigh the merits of connection-based versus connectionless protocols against one another.arrow_forwardIn an RPC-like protocol, where numerous requests can be active at the same time and responses can be given in any sequence, the following is possible: Pretend requests are sequentially numbered, and that ACK[N] confirms the receipt of reply[N]. Should the number of ACKs be cumulative? If not, what should happen in the event that an ACK is not received?arrow_forward
- In an RPC-like protocol in which multiple requests can be outstanding, and replies can be sent in any order: Assume that requests are numbered and that ACK[N] acknowledges reply[N]. Should ACKs be cumulative? If not, what should happen if an ACK is lost?arrow_forwardCan the BGP router always choose the shortest, loop-free ASpath? Justify your choice by giving reasons.arrow_forwardwe discussed the doubling of the timeout interval after a timeout event. This mechanism is a form of congestion control. Why does TCP need a window-based congestion-control mechanism in addition to this doubling-timeoutinterval mechanism?arrow_forward
- Socket programming in c language in windows Implement one server and three clients using multithreaded exchanging messages between them and then doing checksum error detection or parityarrow_forwardIt is necessary to do research on connectionless protocols in order to determine whether or not they can successfully replace connection-based protocols.arrow_forwardWrite a C programming code for sending and receiving data on:a. i. A TCP Connection ii. A UDP Connection b. Write a C program to set a timeout on a socket.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education