Distributed Service Model

Source: Internet
Author: User

MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">, nmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">, clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> A request is randomly sent to a servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">, clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> requests are in serial mode, that is, after each request is processed, the next request can be sent, servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> the processing time for each request is tmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">, servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> only one request can be processed at a time, and other requests will be queued. When clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> what is the average service time of each request when there are no more requests?

 

MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> the number of requests is unlimited, it can be considered that requests cannot be evenly divided into servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">:

 

(1) calibri; MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> when n <= m calibri; MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> when there are enough requests, nmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> requests are evenly distributed to mmmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> because clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> serial during request, therefore, mmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> there may be idle, in this case, each request is sent in tmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> completed in time, the average service time of each request is tmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">.

(2) calibri; MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> when n> mcalibri; MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">, assign N/mmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> requests, the queue length is always N/mmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> except for the first few requests, the service time for subsequent requests will be N/m * tmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">, therefore, the average service time of each request is N/m * tmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">.

 

MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> simulation program:

Server-sim.rar

 

MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> usage:

MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> enable MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> and: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> server_listcalibri; MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> Configure servermso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> information, run clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">. The parameter is clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> Number (use multiple threads to simulate multiple clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin ">) and each clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> Number of requests sent.

 

# Gcc-O Server server. c

# Gcc-O Client client. C-STD = c99-lpthread

 

MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> Start 3mso-ascii-theme-font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> servers

#./Server 127.0.0.1 12340 &

#./Server 127.0.0.1 12341 &

#./Server 127.0.0.1 12342 &

 

MSO-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> Start 3mso-ascii-theme-font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> clientmso-ascii-theme-Font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> thread, each thread sends 100mso-ascii-theme-font: minor-Latin; MSO-Fareast-font-family:; MSO-Fareast-theme-Font:
Minor-Fareast; MSO-Hansi-font-family: calibri; MSO-Hansi-theme-Font: minor-Latin "> requests

#./Client 3 100

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.