Terence Honles & Alex Ticer
6-05-07

Apache

setup

loop

(simplified) //only allows one request at a time
               for(;;) {
                       r=accept()
                       handle(r);
               }
       
(more real) //fork a child to handle each request
       for(;;) {
               r=accept();
               p=fork(); //bottleneck
               if (p==0) {
                       handle(r);
                       exit(0);
               }
       }
       
(most real) //have a pool of children already
       for (;;) {
               r = accept();
               hand off to idle child
               //each child does handle(r);
       }
       
issues
(also used sometimes) //use threads instead of forking
benefits
issues
(used on small systems) //event driven programming
(e.g. Twisted (Python), TinyOS)
       for(;;) {
               wait for an event;
               act on the even; //happens very quickly
               //no reads or writes or long loops
       }
       

select({set of fd})
//hangs until an event happens on one of fd and returns the fd that the event happened on (and details)
//and now you can read and/or write without hanging (small amounts)
//you must maintain a to do list

benefits
drawback

Security

Defense against force & fraud

May 19, NYT Estonia Computers Blitzed
April 27 attacks on president's website
government ground to halt
many banks too,
we took notes
one defense. block all non-Estonian traffic
V. Cerf's estimate (Jan); 25% of PC's are in a botnet

Main form of attacks on computers (three catagories)

  1. against service "denial of service" attacks (a.k.a. "DoS")
  2. against privacy "finding your SSN" attacks (Phishing etc.)
  3. against integrity "tampering" attacks

Goals in security

Thread modeling & Threat classification

(try not to forget this!)

General mechanisms for implementing security