Answered step by step
Verified Expert Solution
Link Copied!

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.)
q2.1[3 pts]: How many different processes were active during the observation period?
q2.2[2 pts]: What is the name of the syscall used to create new processes? (hint: that syscall returns the PID of the newly created process)
q2.3[3 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?
q2.4[2 pts]: What is the stack size, in MiB, of each newly created process? (hint: read the man page of the syscall you identified in q2.2)
Question #3: PNG Headers [10 pts]
The web server responds to many HTTP GET requests for downloading image files in the PNG format. There is suspicion that the AWS-Logo-for-dark-150x150-1.png image file served by the web server was corrupted.
q3.1[2 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?
q3.2[2 pts]: How many GET requests for this PNG files are received in total?
q3.3[2 pts]: Give a one-line, piped Shell command that prints the number of GET requests for this PNG file? (Your answer should look like: cat apache2.strace |...)
q3.4[4 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 #4: Connected Clients [10 pts]
The web server answers requests sent by clients (e.g., 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.
q4.1[2 pts]: How many times does the web server accept a connection from a remote IP during the observation period?
q4.2[2 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?
q4.3[3 pts]: What is the average request arrival rate during the observation period? (i.e., the average number of requests that arrive per second).
q4.4[3 pts]: How many different IPs contact the web server during the observation period?
Question #5: The 935.json File [10 pts]
Your boss, for some reason, is particularly interested in the file 935.json.
q5.1[4 pts]: At time-stamp 1684276562.314195, the web server receives a request for file 935.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.
q5.2[3 pts]: In the call to writev, the size of the 935.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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions