Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Each line of the strace output starts with a PID ( Process ID ) , which is a unique number associated to the process that
Each line of the strace output starts with a PID Process ID which is a unique number associated to the process that invoked the system call on that line. The web server uses multiple processes during its execution. We will talk more about PIDs later this semester.
q pts: How many different processes were active during the observation period?
q pts: What is the name of the syscall used to create new processes? hint: that syscall returns the PID of the newly created process
q pts: How many times is this syscall invoked? Does it make sense? That is does the number of calls during the observation period correspond to the number of processes that are active during the observation period?
q pts: What is the stack size, in MiB, of each newly created process? hint: read the man page of the syscall you identified in q
Question #: PNG Headers pts
The web server responds to many HTTP GET requests for downloading image files in the PNG format. There is suspicion that the AWSLogofordarkxpng image file served by the web server was corrupted.
q pts: After how many seconds after the beginning of the observation period is the first GET request for this PNG file received by the web server?
q pts: How many GET requests for this PNG files are received in total?
q pts: Give a oneline, piped Shell command that prints the number of GET requests for this PNG file? Your answer should look like: cat apachestrace
q pts: Is this PNG file corrupted? That is is its byte content, which is sent back as the answer to the GET request, whats expected for a PNG file? If your answer is no explain.
Question #: Connected Clients pts
The web server answers requests sent by clients eg web browsers that run on various machines during the observation period. The main thing that a web server does is wait for a connection and then accept the connection to handle whatever request was sent. The name of the syscall to accept a connection is very intuitive.
q pts: How many times does the web server accept a connection from a remote IP during the observation period?
q pts: Youll see that a single process accepts all requests. How many seconds into the observation period was that process created and which process created it
q pts: What is the average request arrival rate during the observation period? ie the average number of requests that arrive per second
q pts: How many different IPs contact the web server during the observation period?
Question #: The json File pts
Your boss, for some reason, is particularly interested in the file json.
q pts: At timestamp the web server receives a request for file json a read syscall After a few syscalls, the web server sends back data to the client via the writev syscall. Based on reading the man page for this syscall, determine the HTTP data payload overhead, that is the percentage of bytes sent back that are not bytes of the JSON content requested by the user.
q pts: In the call to writev, the size of the json file in bytes is passed as an argument. What syscall was used to determine this size?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started