COMPUTER SYSTEMS&MOD MSGT/ET SA AC PKG
3rd Edition
ISBN: 9780134671123
Author: Bryant
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 12, Problem 12.23HW
Program Plan Intro
I/O Multiplexing:
- The idea of I/O multiplexing is to use “select” function to ask kernel to suspend process.
- It returns control to application only after one or more I/O events had occurred.
- It denotes waiting for a set of descriptors that is ready for reading.
- The “select” function would manipulate sets of type “fd_set”, that denotes descriptor sets.
- It takes two inputs: a descriptor set called “read set” and cardinality of read set.
- It blocks until at least one descriptor in read set is ready for reading.
- A descriptor “k” is ready for reading if and only if a request to read 1 byte from that descriptor would not block.
- The “fd_set” is been modified that points to argument “fdset” to indicate subset of read set called “ready set”.
- The value returned by function indicates cardinality of ready set.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Computer Science
C programming
Develop a proxy HTTP server that can accept HTTP requests from clients and convert them to HTTPS request to the web server.
The HTTP request can be filtered based on an access control list.
The requests can be generated by any web client, such as the curl command or a web browser.
the proxy converts plain text HTTP requests from a client to HTTPS requests and then returns the responses to the client.
Main objective is to create a proxy HTTP server that converts cleartext HTTP requests from clients to HTTPS requests to servers and vice versa for the responsesresponses.
Currently, the web server handles only one HTTP request at a time. Implement a multithreaded server
that is capable of serving multiple requests simultaneously. Using threading, first create a main thread
in which your modified server listens for clients at a fixed port. When it receives a TCP connection
request from a client, it will set up the TCP connection through another port and services the client
request in a separate thread. There will be a separate TCP connection in a separate thread for each
request/response pair.
An issue that we have glossed over so
far is how the client locates the server in
remote procedural calls. One method is
to hardwire the network address of the
server into the client. The trouble with
this approach is that it is extremely
inflexible. If the server moves or if the
server is replicated or if the interface
changes, numerous programs will have
to be found and recompiled. To avoid
this limitation, which kind of binding is
appropriate to match up clients and
servers? Also explain basic procedure of
such binding.
OO
6:46 PM
Chapter 12 Solutions
COMPUTER SYSTEMS&MOD MSGT/ET SA AC PKG
Ch. 12.1 - Prob. 12.1PPCh. 12.1 - Prob. 12.2PPCh. 12.2 - Practice Problem 12.3 (solution page 1036) In...Ch. 12.2 - Practice Problem 12.4 (solution page 1036) In the...Ch. 12.4 - Prob. 12.5PPCh. 12.4 - Prob. 12.6PPCh. 12.5 - Prob. 12.7PPCh. 12.5 - Prob. 12.8PPCh. 12.5 - Prob. 12.9PPCh. 12.5 - Prob. 12.10PP
Ch. 12.6 - Prob. 12.11PPCh. 12.7 - Prob. 12.12PPCh. 12.7 - Prob. 12.13PPCh. 12.7 - Prob. 12.14PPCh. 12.7 - Prob. 12.15PPCh. 12 - Prob. 12.20HWCh. 12 - Derive a solution to the second readers-writers...Ch. 12 - Prob. 12.22HWCh. 12 - Prob. 12.23HWCh. 12 - Prob. 12.24HWCh. 12 - Prob. 12.25HWCh. 12 - Prob. 12.26HWCh. 12 - Some network programming texts suggest the...Ch. 12 - Prob. 12.28HWCh. 12 - Prob. 12.29HWCh. 12 - Prob. 12.30HWCh. 12 - Implement a version of the standard I/O fgets...Ch. 12 - Prob. 12.32HWCh. 12 - Prob. 12.33HWCh. 12 - Prob. 12.34HWCh. 12 - Prob. 12.35HWCh. 12 - Prob. 12.36HWCh. 12 - Prob. 12.37HWCh. 12 - Prob. 12.38HWCh. 12 - Prob. 12.39HW
Knowledge Booster
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
- In this assignment, you will develop a simple Web server in Python that is capable of processing only one request. Specifically, your Web server will (i) Create a connection socket when contacted by a client (browser) (ii) Receive the HTTP request from this connection(iii) Parse the request to determine the specific file being requested(iv) Get the requested file from the server’s file system(v) Create an HTTP response message consisting of the requested file preceded by header lines(vi) Send the response over the TCP connection to the requesting browser. If a browser requests a file that is not present in your server, your server should return a “404 Not Found” error message. Your job is to code the steps above, run your server, and then test your server by sending requests from browsers running on different hosts. If you run your server on a host that already has a Web server running on it, then you should use a different port than port 80 for your Web server. Make sure to test your…arrow_forwardConsider accessing your e-mail with POP3. Suppose you have configured your mail client to operate in the 'download-and-delete' mode. When the client (C) fetches all emails from the server (S), the sequence of messages exchanged starts as follows. C: list S: 1 498 S: 2 912 S: C: retr 1 S: blah blah S: How many messages does the server store for the client? blah It cannot be known 912 498 None of the mentionedarrow_forwardn this assignment, you will develop a simple Web server in Python that is capableof processing only one request. Specifically, your Web server will(i) Create a connection socket when contacted by a client (browser)(ii) Receive the HTTP request from this connection(iii) Parse the request to determine the specific file being requested(iv) Get the requested file from the server’s file system(v) Create an HTTP response message consisting of the requested filepreceded by header lines(vi) Send the response over the TCP connection to the requesting browser.If a browser requests a file that is not present in your server, your server shouldreturn a “404 Not Found” error message.Your job is to code the steps above, run your server, and then test your server bysending requests from browsers running on different hosts. If you run your serveron a host that already has a Web server running on it, then you should use a differentport than port 80 for your Web server. Make sure to test your program…arrow_forward
- Servers can be designed to limit the number of open connections. For example, a server may wish to have only N socket connections at any point in time. As soon as N connections are made, the server will not accept another incoming connection until an existing connection is released. Please write pseudo code to implement the synchronization using semaphore.arrow_forwardSuppose an HTTP client makes a first GET request to the gaia.cs.umass.edu web server for a base page that it has never before requested, which contains an embedded object, which causes the client to make a second GET request. A very short time later, the client then makes a third GET request - for the same base page, with that third GET request having an If-Modified-Since field (as does the 4th GET request that the client makes for the embedded object). Neither the base object nor the jpeg object has changed. How many round trip times (RTTs) are needed from when the client first makes the third GET request (i.e., when it requests the base object for the second time) to when the base page and the jpeg file are displayed a second time, assuming that: any time needed by the server to transmit the base file, or the jpeg file into the server's link is (each) equal to 1/2 RTT the time needed to transmit an HTTP GET into the client's link is zero? the time needed by the server to transmit…arrow_forwardInstead of letting a server register itself with a daemon as in DCE, we could also choose to always assign it the same endpoint. That endpoint can then be used in references to objects in the server's address space. What is the main drawback of this scheme?arrow_forward
- Q.7. Design and implement a client/ Multi-threaded Server Chat application where a set of clients are able to send their request to the Multithreaded Server. In this application, messages that are exchanged between client and server, must be encrypted using AES encryption algorithm. After receiving the message, each party (client or server) perform decryption operation and show the content of message on the terminal.arrow_forwardHello, the code task below has to be written in python 3 and the HTTP must show the html file from the command line. Please help. Currently, the web server handles only one HTTP request at a time. Implement a multithreaded server that is capable of serving multiple requests simultaneously. Using threading, first create a main thread in which your modified server listens for clients at a fixed port. When it receives a TCP connection request from a client, it will set up the TCP connection through another port and services the client request in a separate thread. There will be a separate TCP connection in a separate thread for each request/response pair.arrow_forwardLanguage : C / C++ / Python Develop a simple Web server (parity generator) that is capable of processing the request from client. Create a socket connection, when contacted by the client the server has to process the request and give back the result. Client part The client has to send the data in bits (e.g 1100011000). It also has to send the number of frames it has to separate the data (e.g. 2 frames) Server part Server has to split the data into 2 parts (Frame 1 -> 11000; Frame 2 ->11000) and send back to the client. For each part server has to find the even parity and sendarrow_forward
- 3. Suppose that you have written a time server, which periodically notifies its clients of the current date and time. Write an interface that the server could use to enforce a particular protocol on its clients.arrow_forwardCreate a performance-testing client that executes T trials of the following experiment using an int value T from the command line: Use UnionFind to identify connectivity as in our development client, and loop until all sites are connected, to create the connections in an N-by-N square grid with random orientation and order. Print the value of N, the average number of connections handled, and the running duration relative to the previous value for each N. Use your programme to verify the text's assertions that weighted quick-union is almost linear and that quick-find and quick-union have quadratic running times. Note : As N doubles, the number of sites in the grid increasesby a factor of 4, so expect a doubling factor of 16 for quadratic and 4 for linear.arrow_forwardUsing client-server socket programming, implement a multi-threaded server that returns to the client the synonym of a word as stored in a dictionary. The client should prompt the user for a word, reads the word from the screen and sends it to the server and waits for response from the server. Once the client gets the synonym of the word, it should print the word and its synonym on the screen and prompt for another word. This should continue until the user enters the characters @ to quit. Example: >>> python TCPClient.py Input a word: weak weak ==> frail Input a word: fair fair ==> just Input a word: @ Notes: 1) A file that contains some words and their synonyms is provided 2) In the server code, read the file to a global python dictionary object engDict = {} # empty dictionary object with open('dictionary.txt') as f: # open the file for line in f: tok = line.split() engDict[tok[0]] = tok[1] print(engDict) 3) Here is a Skelton of the server [some code here ] class…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