Computer Systems: A Programmer's Perspective (3rd Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 11.5, Problem 11.5PP
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 converted from host byte order to network byte order by “htonl” function.
  • An unsigned 32-bit integer is converted 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.

Blurred answer
Students have asked these similar questions
I ONLY NEED 3 AND 4 Suppose memory has 256KB, OS use low address 20KB, there is one program sequence: Prog1 request 80KB, prog2 request 16KB, Prog3 request 140KB Prog1 finish, Prog3 finish; Prog4 request 80KB, Prog5 request 120kb Use first match and best match to deal with this sequence (from high address when allocated) (1)Draw allocation state when prog1,2,3 are loaded into memory?  (2)Draw allocation state when prog1, 3 finish?  (3)use these two algorithms to draw the structure of free queue after prog1 , 3 finish (4) Which algorithm is suitable for this sequence ? Describe the allocation process?
Write a C/C++ code to Implement the following scenario: An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to three groups of customers as follows: a. The first group has 64 customers; each needs 256 addresses. b. The second group has 128 customers; each needs 128 addresses. c. The third group has 128 customers; each needs 64 addresses. Design and Implement the sub blocks and find out how many addresses are still available after these allocations.
Consider a swapping system in which memory consists of the following hole sizes inmemory order: 12 MB, 4 MB, 20 MB, 12 MB,18 MB, 7 MB, 9 MB and 12 MB.Which hole is taken for successive segment requests of(a) 10MB(b) 15MB(c) 9 MBfor first fit, worst fit, and next fit?
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education