Unformatted text preview:

Slide 1Lecture 10 – Tuesday, February 15, 2011The name-mapping algorithm for an URLExample:Machine code for MEASUREMachine code for GET_TIMEProcedure call conventionSlide 8Slide 9Slide 10Client server interactions in HTTPCOT 4600 Operating Systems Spring 2011Dan C. MarinescuOffice: HEC 304Office hours: Tu-Th 5:00 – 6:00 PMLast time: Computer system organization; operating systemsThe hardware layerThe software layer – the file abstractionCase studies - UNIX File SystemToday:URLsSoft modularityProcedure call conventions and the memory map; the stackErrorsStrongly-typed languages help enforce modularity. Enforced modularity; message passing and the client-server model.Example of a client –server system: WWWNext timeClient-server organizationHeterogeneity; little-endian and big-endian representationTiming, response time.Trusted intermediariesCase study the X11 system.Lecture 10 – Tuesday, February 15, 2011Lecture 10The name-mapping algorithm for an URLExample: http://www.cs.ucf.edu/~dcm/Teaching/COP4600-Fall2010/ClassIndex.htmlThe string before “:” (colon)  identifies the protocol used, e.g., “http”.The string between “//” and the following “/”  the host name passed to DNS (Domain Name Server) to resolve (e.g., www.cs.ucf.edu)The browser uses the protocol (in our case http) to open the connection with the http-server on the host with the IP address returned by DNS and to locate the file /~dcm/Teaching/COP4600-Fall2010/ClassIndex.htmlIf the file is found then the http-server send the fileLecture 10Example: procedure MEASURE (func) start_time  GET_TIME(SECONDS) funct() end_time GET_TIME(SECONDS) return (end_time-start_time) procedure GET_TIME (units) timeCLOCK time  CONVERT_TO_UNITS(time,units) return time Lecture 10Machine code for MEASURE 100 ST R1,SP //save content of R1 on the stack 104 ADD 4, SP //increment stack pointer 108 ST R2, SP //save content of R2 on the stack 112 ADD 4, SP //increment stack pointer 116 LA R1, SECONDS //load address of the argument in R1 120 ST R1, SP // store address of the argument on the stack 124 ADD 4, SP // increment stack pointer 128 L A R1,148 // load return address in R1 132 ST R1, SP // store return address on the stack 136 ADD 4, SP //adjust top stack pointer 140 L A R1, 200 // load address of GET_TIME in R1 144 JMP R1 //transfer control to GET_TIME 148 S 4,SP // decrement stack pointer 152 L R2, SP // restore the contents of R2 156 S 4,SP // decrement stack pointer 160 L R1,SP // restore the contents of R1 164 S 4,SP // decrement stack pointer 168 ST R0, start // store result passed by GET_TIME in Ro into start Lecture 10Machine code for GET_TIME 200 L R1,SP //load address of the stack pointer in R1 204 S R1,8 //increment stack pointer 208 L R2, R1 //load address of the argument in R2 212 code for the body of GET_TIME 216 code for the body of GET_TIME 220 L R0, time // load in R0 the result 224 L R1,SP // reload in R1 address of the stack pointer 228 S R1,4 // decrement the stack pointer 231 L PC,R1 // load return address from stack into PC Lecture 10Procedure call convention1. Caller 1. saves on the stack (after each operation it adjusts the SP)1. registers 2. arguments3. return address2. transfers control to the calle (jump to its starting address)2. Calee 1. loads from the stack the arguments2. carries out the desired calculation and load the results in a register (R0)3. transfers control back to the caller loads in the PC the return address to the caller3. Caller 1. adjusts the stack2. restores its registersLecture 10Lecture 10D a t aS e r v e r r e s i d e n c e t i m e .W e b p a g e i s c r e a t e d o nt h e f l yU s e r ' s H T T P r e q u e s tS Y NS Y NA C KA C K + H T T P r e q u e s tT C P c o n n e c t i o ne s t a b l i s h m e n tR T TU s e r ' s H T T P r e q u e s tf o r a n i m a g eS e r v e r r e s i d e n c e t i m e .I m a g e i s r e t r i v e d f r o md i s kD a t aH T T P r e q u e s tA C KA C KB r o w s e r W e b S e r v e rLecture 10T h r e a dh a n d l i n ga n H T T Pr e q u e s tW e b S e r v e rH T T P r e q u e s tR e s o u r c eR e p o s i t o r yL o c a l c a c h eT h r e a dh a n d l i n ga n H T T Pr e q u e s tH T T Pr e s p o n s eW e bB r o w s e rC l i e n tP e r s i s t e n t /N o n P e r s i s t e n tH T T Pc o n n e c t i o nC l i e n tT C Pp o r tH T T P r e q u e s tH T T P r e s p o n s eA n H T T P r e q u s t c o n t a i n s o n e o f t h e f o l l o w i n g m e t h o d s :G E T - g e t a r e s o u r c eH E A D - v e r i f y t h e l i n k a n d c o n d i t i o n s o f a r e s o u r c eP O S T - i n p u t t o a r e s o u r c e , u s u a l l y a C G I s c r i p tP U T - s t o r e a r e s o u r c e a t t h e s e r v e rD E L E T E - d e l e t e a r e s o u r c eT R A C E - i n c l u d e a l l h e a d e r s i n a r e s p o n s e W e b C a c h eS a m p l e H T T P s t a t u s c o d e i n a r e s p o n s e1 0 0 - C o n t i n u e2 …


View Full Document

UCF COT 4600 - Lecture Notes

Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?