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
what are the main advantages of multiprogramming

Which is most common phase structured grammar? Most common phase structured grammar is Context – Sensitive

What are the advantages of Contiguous allocation? The advantages are a. Supports direct access b. Supports sequential access c. Number of disk seeks is minimal.


Basic concepts When a process is to be changed in, the pager guesses which pages will be used before the process is changed out again. Instead of swapping in a entire process,

The idea of reference counting is to maintain, for every object, the total number of references to that object, i.e. the number of "incoming" pointers. Whenever the number of refer

What are the advantages of Indexed allocation? The benefits are a. No external-fragmentation problem b. Solves the size-declaration problems. c. Supports direct access

What is a pure demand paging? When starting implementation of a process with no pages in memory, the operating system sets the instruction pointer to the first instruction of t

Deadlocks can be detected while the program is running, by running cycle detection algorithms on the graph that de?nes the current use of resources. De?ne this graph as follows:

what is deadlock