Basic server model, Operating System

Suppose we want to program a Web server; we could easily do so without using concurrency, as follows:

while(true)
wait connection
read from socket and parse url
look up url contents in cache
if (!in cache)
fetch from disk
put in cache
send data to client

How do we make this codework for lots and lots of clients? Since there are a lot of slowoperations being performed (e.g. connecting to the networking, accessing the disk, etc), processing only one client at a time clearly is not scalable. Our goal then is to build a concurrent application that both minimizes latency and maximizes parallelism.

Posted Date: 3/13/2013 3:03:49 AM | Location : United States







Related Discussions:- Basic server model, Assignment Help, Ask Question on Basic server model, Get Answer, Expert's Help, Basic server model Discussions

Write discussion on Basic server model
Your posts are moderated
Related Questions

Q. Presume that the following processes arrive for execution at the times indicated. Every process will run the listed amount of time. In responding the questions use non pre-empti

Forking is an important phase of Unix, critical to the support of its design strategies, which encourages the implementation of filters. In Unix, a filter is a process that reads i

Explain about threading issues? The fork and exec system calls In a multithreaded program of few UNIX systems have chosen to have two versions of fork, one that duplicates e

What components of the R/e system initiate the start of background jobs at the specified time? The batch scheduler initiates the begin of background job.  The dispatcher then s

How Virtual memory is implemented Virtual memory can be implemented along with Segmentation and Paging

Define the Scheduling in Multitasking Earlier we learned the concepts and advantages of multitasking. In a system in which one or more tasks( threads or processes) attempt to s

What is independent process? A process is independent it cannot influence or be affected by the other processes implementing in the system. Any process does not share data with

Applications allocate memory in terms of the number of bytes that they need, but this level of granularity is too ?ne-grained for the operating system to manage the system memory i

Write pseudo code to implement the pthread_create wrapper of the Tern memoizer. Note you need to describe your data structure for maintaining deterministic thread IDs. In addition,