CS350 Homework #2 solved

$24.99

Original Work ?

Download Details:

  • Name: hw02.zip
  • Type: zip
  • Size: 101.21 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

As we discussed in class, the availability of a system is defined as the probability that the system is “up” (i.e., available) when accessed at some random point in time. A friend of yours working in a startup was tasked with the development of a web service that would be at least 99% available. To measure the availability of the service that he developed, your friend wrote a script which periodically (every minute) “pinged” the service and reported the percentage of all these pings that were successful (i.e., the service was available). His findings were that the service availability was 0.95 (i.e., 95%). To salvage his job, your friend suggested that instead of offering the service through a single server, he would set up the service on two identical servers such that if the first server is down, the second server would take over.
What is your guess as to the availability of the service when offered using the new 2-server configuration? Show all calculations.
Your friend’s supervisor, upon learning of the above results, was quite unhappy. She brought up two concerns — namely, (1) she did not trust the measurement approach that your friend used to evaluate the availability of the service on a single server, and (2) even if those measurements were correct, she did not believe that running the service on two servers as described above would boost availability as your friend had hoped.

Suggest a pattern of server failures that will end-up in an “over estimation” (or an “under estimation”) of the service availability using your friend’s measurement approach?
Suggest a better measurement approach.
What assumption needs to hold for the two-server configuration suggested by your friend to yield the improvement in availability that your friend had hoped for?
Suggest a failure scenario that would violate such an assumption?

The average time it takes to read a block from disk is 2 msec and the standard deviation is 0.8 msec. In order to retrieve a file that consists of N blocks, it is necessary to perform n consecutive block reads from disk. Let the random variable Tn be the time it takes to retrieve n blocks from the disk, where n is large.
What is the probability distribution for the random variable Tn? Write down the PDF of Tn, when n=100.
What is the mean and standard deviation of Tn, when n=100.
What is the probability that the retrieval time for a file that consists of 100 blocks will be between 185 and 190 msec?

The arrival of packets at an Ethernet adapter of a web server is described by a Poisson process with a rate of 100 packets per second. Answer the following questions:
Write down the formula for the probability distribution of the number of packets arriving to the adapter in one millisecond.
What is the probability that more than 1 packet will be received within a 10-millisecond period of time?
Write down the formula for the probability distribution of the inter-arrival time of packets.
What is the probability that two packets will be separated by more than 20 milliseconds?
What is the standard deviation of the inter-arrival time of packets?
What is the probability that the time between the arrival of a packet and the arrival of the 100th packet following that frrst packet is less than 1.1 seconds?
Packets that arrive to the Ethernet adapter described in the above problem are queued up in a buffer until processed by the Interrupt Service Routine (ISR). Assuming that the service time per packet is exponential with an average of 8 milliseconds. Answer the following questions:
What is the capacity of the Ethernet adapter?
Write down the probability distribution of the number of packets at the Ethernet adapter.
How many packets do you expect to find in the buffer of the adapter at any point in time (on average)?
What is the average waiting time in the buffer (i.e. how long is a packet buffered until the ISR starts processing it)?
What is the slowdown caused by queuing at the Ethernet adapter?
The web server is under a Denial of Service (DoS) attack, causing the system to crash. What is the minimum rate of adversarial traffic that must have been injected to cause the crash?
Write a C /C++/Java function — say Zrand() — that returns a random value that is distributed according to a standard normal distribution. Write another C/C++/Java — say Grand() — that uses Zrand() to generate a random value that is distributed according to a normal distribution with a mean U and standard deviation S, where U and S are the real-valued arguments of Grand().
Hint: Given that all you have through common C/C++/Java libraries is a uniform random number generator — e.g., drand48() — you will need to find the relationship that maps a uniform random variable that ranges from 0 to 1 to a standard normal random variable. One way of doing this is to use the Central Limit Theorem (CLT) to generate this random value using the uniform random number generator drand48(). Recall that according to CLT, the sum of N random variables (that follow any distribution with finite moments) approaches a Normal distribution, whose mean is N times the mean of the individual random variables, and whose variance is N times the variance of the individual random variables.

Note: You may assume that aggregating 30 or more samples is “enough” for the CLT to hold.