Question

2) Assuming a server takes 6 msec to get a request for work, dispatch it, and do the rest of the necessary processing if the
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Given:-

Time taken by server to get a request (cache hit)                              = 6 msec
Time taken by server to get request when cache miss occurs        = 100 msec

Percentage of time cache miss occurs                                    = 5% = 5/100
Percentage of time cache hit occurs                                       = 100-5 = 95% = 95/100

a) Single – Threaded Case

In single-threaded case, cache hit and cache miss both occur. So we need to take average of both the cases.

Weighted Average =

(Percentage of time cache hit occurs) * (Time taken by server to get a request (cache hit) )

+

(Percentage of time cache miss occurs) * (Time taken by server to get request when cache miss occurs)

Therefore, from given values,

Weighted Average = ( 5/100 )*( 6 ) + ( 95/100 )*( 100 )
= (30/100) + (95)
    = 95.3

Mean Request Time = 95.3 msec

Number of tasks server can handle per sec
= 1 second / Mean Request Time

= 1 second / 95.3 msec

= 1 second / 0.0953 second                        [Since, 1 sec = 1000 msec]

= 10.5

Therefore Single-Threaded server can handle 10.5 Requests/Second.

b) Multi-threaded Case

In multi-threaded server, there is no waiting for disk so all the waiting is skipped, i.e., cache miss doesn’t occur.

So every request can be processed in 6 msec.

Number of tasks server can handle per sec:-
= 1 second / Request Time

= 1 second / 6 msec                                       [Since, 1 sec = 1000 msec]

= 1 second / 0.006 second

= 166.66

Therefore Multi-Threaded server can handle 166.6 Requests/Second.

-----------------------------------------------------------------------------------------------------------------------

Please Rate Up if you are satisfied with the answer, it really helps. Else, please comment your doubt/question, and I'll respond ASAP.

Add a comment
Know the answer?
Add Answer to:
2) Assuming a server takes 6 msec to get a request for work, dispatch it, and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A system consists of 1 CPU, 1 Disk, and 1 Network Interface. A web server running...

    A system consists of 1 CPU, 1 Disk, and 1 Network Interface. A web server running on this system consists of a process that waits for an HTTP request. Once the request is received, the process services it by fetching the requested file from disk (an I/O operation) and then by sending the file content to the client. Assume that serving a request consists of the following phases: i. Process uses the CPU for 2 msec (parse request) // CPU...

  • Consider following HTTP request header

    Consider following HTTP request headerGET /tr/page/49/genel-bilgi.html HTTP/2.0Host: ic.atilim.edu.trUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflate, brConnection: keep-aliveCookie: gcl_au=1.1.717471173.1571991598; __atuvc=12%7C43; ..........Upgrade-Insecure-Requests: 1TE: Trailersa. What is the URL of the document requested by the browser?b. What version of HTTP is the browser running?c. Does the browser request a non-persistent or a persistent connection?d. What is the IP address of the host on which the browser is running?e. What type of browser initiates this message? Why is...

  • Debugging and testing multithreaded programs is made more difficult compared to dealing with single-threaded programs by...

    Debugging and testing multithreaded programs is made more difficult compared to dealing with single-threaded programs by: 1. the necessity to divide activities into separate and concurrent tasks 2. the existence of many more different execution paths made possible by parallel thread execution 3. multithreading library APIs with confusing semantics -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Consider the following code that creates N threads using the POSIX threading library. The thread function threadFun receives as parameter a thread index (from 0 to N-1). #define NTHREADS 4...

  • C Programming - Please Help us! Implementing Load Balancing, the 3 Base Code files are at the bot...

    C Programming - Please Help us! Implementing Load Balancing, the 3 Base Code files are at the bottom: Implementing Load Balancing Summary: In this homework, you will be implementing the main muti-threaded logic for doing batch based server load balancing using mutexes Background In this assignment you will write a batch-based load balancer. Consider a server which handles data proces- sing based on user requests. In general, a server has only a fixed set of hardware resources that it can...

  • This is in C. For this assignment we will write a simple database server. We will...

    This is in C. For this assignment we will write a simple database server. We will be creating a simple database of student records, so let’s describe these first. The format of a student record is as follows: typedef struct student {     char lname[ 10 ], initial, fname[ 10 ];     unsigned long SID;     float GPA; } SREC; Part One – the Server We will create a database server. The job of the server is to accept a...

  • Question 12 Consider a magnetic disk drive with 10 double sided platters, 512(=2^9) tracks per surface,...

    Question 12 Consider a magnetic disk drive with 10 double sided platters, 512(=2^9) tracks per surface, and 1024 (=2^10) sectors per track. Sector size is 2KBytes (=2^10 Bytes ). Assume the average seek time 0.02 ms, the seek time from a track to its adjacent track can be ignored. The drive rotates at 5400 rpm. Successive tracks in a cylinder can be read without head movement. Furthermore, disks can be handled independently, so multiple tracks in a cylinder can be...

  • I need help with this assignment, please; Programming Assignment 3: UDP Pinger Lab In this lab,...

    I need help with this assignment, please; Programming Assignment 3: UDP Pinger Lab In this lab, you will study a simple Internet ping server written in the Java language, and implement a corresponding client. The functionality provided by these programs is similar to the standard ping programs available in modern operating systems, except that they use UDP rather than Internet Control Message Protocol (ICMP) to communicate with each other. (Java does not provide a straightforward means to interact with ICMP.)...

  • ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) NeedByEvent(Event) CRPrevState(CRID, CRState, StartDate, EndDate) CRAssigned(CRID, EmpID, StartDate, EndDate)...

    ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) NeedByEvent(Event) CRPrevState(CRID, CRState, StartDate, EndDate) CRAssigned(CRID, EmpID, StartDate, EndDate) Employees(EmpID, FirstName, LastName, JobTitle) ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) The CRID is the primary key, it is unique, and it is an positive integer The CRType may be one of two values: "Deficiency" or "Enhancement" CRTitle is a variable length string that may be up to 2048 characters CROriginDate is a date CRPriority is an integer that may assume a value of...

  • Please Answer all Questions on Networks, They all involve calculation ( 1-9 Questions) "A single router...

    Please Answer all Questions on Networks, They all involve calculation ( 1-9 Questions) "A single router is transmitting packets, each of length L bits, over a single link with transmission rate R Mbps to another router at the other end of the link. Suppose that the packet length is L= 12000 bits, and that the link transmission rate along the link to router on the right is R = 1000 Mbps. What is the maximum number of packets per second...

  • Assignment 2 In this assignment, you will write two short programs to solve problems using recursion....

    Assignment 2 In this assignment, you will write two short programs to solve problems using recursion. 1. Initial Setup Log in to Unix. Run the setup script for Assignment 2 by typing: setup 2 2. Towers of Hanoi Legend has it that in a temple in the Far East, priests are attempting to move a stack of disks from one peg to another. The initial stack had 64 disks threaded onto one peg and arranged from bottom to top by...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT