Exam - A n s w e r s N O T T O B E P R I N T E D...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: A n s w e r s N O T T O B E P R I N T E D Concurrency, 3C03, 2002 Answer Question 1 and two further questions. Marks for each part of each question are indicated in square brackets Calculators are NOT permitted 1. a. Show an equivalent labelled transition system for each of the following FSP pro- cesses. i. LIGHT = ( on -> off -> LIGHT). [2 marks] ii. TURNSTILE = ( increment -> arrive -> TURNSTILE | decrement -> depart -> TURNSTILE ). [3 marks] 3C03 1 TURN OVER A n s w e r s N O T T O B E P R I N T E D iii. COUNTER = COUNTER[0], COUNTER[x:0..3]=(when (x>0) decrement->COUNTER[x-1] |when (x<3) increment->COUNTER[x+1]). [3 marks] iv. ||GARDEN =(TURNSTILE || COUNTER). [6 marks] [Subtotal 14 marks] 3C03 2 CONTINUED A n s w e r s N O T T O B E P R I N T E D b. Web servers implement the HTTP protocol, which mainly consists of the operations http put and http get . Browsers need to establish a connection to a Web server in order to obtain a Web page with an http get request or to send a form with an http put request. Unlike FTP servers, Web servers do not maintain session information, but browsers need to open a TCP connection to a Web server prior to issuing a request and close them afterwards. Web servers might delay browsers if they are too busy. Use FSP to model a concurrent system with one Web server and six browsers. Re- strict servers to open up to four concurrent connections to browsers. BROWSER = (open -> OPEN_CONN), OPEN_CONN = (http_put -> REQUESTED |http_get -> REQUESTED), REQUESTED = (close -> BROWSER). WEBSERVER = WEBSERVER[0], WEBSERVER[i:0..4]=(when (i<4)open->WEBSERVER[i+1] |when (i>0) close->WEBSERVER[i-1] |http_put->WEBSERVER[i] |http_get->WEBSERVER[i]). set Clients = {sally, alice, bob, john, peter, jill} ||WEB=(Clients:BROWSER||{Clients}::WEBSERVER). [10 marks] c. Give a safety property that you can use to prove that your Web server never opens more than four connections at a time and discuss how you would conduct the proof using the LTSA model checker. property NOTOVERLOADED = COUNT[0], COUNT[j:0..4]=(when (j<4)open->COUNT[j+1] |when (j>0)close->COUNT[j-1]). Then use parallel composition to combine the property with the above propose....
View Full Document

This note was uploaded on 02/08/2012 for the course CSCI 6232 taught by Professor Rotenstreich during the Spring '11 term at GWU.

Page1 / 11

Exam - A n s w e r s N O T T O B E P R I N T E D...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online