SE3BB4: Software Design III Concurrent System Design. Sample Solutions to Assignment 1



Similar documents
2 DIODE CLIPPING and CLAMPING CIRCUITS

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

OUTLINE SYSTEM-ON-CHIP DESIGN. GETTING STARTED WITH VHDL August 31, 2015 GAJSKI S Y-CHART (1983) TOP-DOWN DESIGN (1)

Experiment 6: Friction

Density Curve. Continuous Distributions. Continuous Distribution. Density Curve. Meaning of Area Under Curve. Meaning of Area Under Curve

Binary Representation of Numbers Autar Kaw

Physics 43 Homework Set 9 Chapter 40 Key

Version 001 Summer Review #03 tubman (IBII ) 1

Chapter. Contents: A Constructing decimal numbers

Treatment Spring Late Summer Fall Mean = 1.33 Mean = 4.88 Mean = 3.

Practice Test 2. a. 12 kn b. 17 kn c. 13 kn d. 5.0 kn e. 49 kn

Fundamentals of Cellular Networks

MATH 150 HOMEWORK 4 SOLUTIONS

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 16 th May Time: 14:00 16:00

Lectures 8 and 9 1 Rectangular waveguides

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

Operations with Polynomials

Vectors Recap of vectors

Homework 3 Solutions

9 CONTINUOUS DISTRIBUTIONS

One Minute To Learn Programming: Finite Automata

Engineer-to-Engineer Note

The remaining two sides of the right triangle are called the legs of the right triangle.

Reasoning to Solve Equations and Inequalities

Review Problems for the Final of Math 121, Fall 2014

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Virtual Machine. Part II: Program Control. Building a Modern Computer From First Principles.

Econ 4721 Money and Banking Problem Set 2 Answer Key

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

Engineer-to-Engineer Note

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

Lecture 3 Gaussian Probability Distribution

How To Organize A Meeting On Gotomeeting

c b N/m 2 (0.120 m m 3 ), = J. W total = W a b + W b c 2.00

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

19. The Fermat-Euler Prime Number Theorem

Ratio and Proportion

PROBLEMS 13 - APPLICATIONS OF DERIVATIVES Page 1

Angles 2.1. Exercise Find the size of the lettered angles. Give reasons for your answers. a) b) c) Example

Active Directory Service

Or more simply put, when adding or subtracting quantities, their uncertainties add.

10.6 Applications of Quadratic Equations

SUPPLEMENTARY MATERIAL

Solution to Problem Set 1

FAULT TREES AND RELIABILITY BLOCK DIAGRAMS. Harry G. Kwatny. Department of Mechanical Engineering & Mechanics Drexel University

Unambiguous Recognizable Two-dimensional Languages

Student Access to Virtual Desktops from personally owned Windows computers

1.00/1.001 Introduction to Computers and Engineering Problem Solving Fall Final Exam

A.7.1 Trigonometric interpretation of dot product A.7.2 Geometric interpretation of dot product

Quick Guide to Lisp Implementation

Helicopter Theme and Variations

Regular Sets and Expressions

THE INTELLIGENT VEHICLE RECOVERY AND FLEET MANAGEMENT SOLUTION

EQUATIONS OF LINES AND PLANES

LISTENING COMPREHENSION

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

1. Definition, Basic concepts, Types 2. Addition and Subtraction of Matrices 3. Scalar Multiplication 4. Assignment and answer key 5.

SOLVING EQUATIONS BY FACTORING

LECTURE #05. Learning Objective. To describe the geometry in and around a unit cell in terms of directions and planes.

trademark and symbol guidelines FOR CORPORATE STATIONARY APPLICATIONS reviewed

Words Symbols Diagram. abcde. a + b + c + d + e

Answer, Key Homework 10 David McIntyre 1

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

How fast can we sort? Sorting. Decision-tree model. Decision-tree for insertion sort Sort a 1, a 2, a 3. CS Spring 2009

Module 5. Three-phase AC Circuits. Version 2 EE IIT, Kharagpur

Module Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials

Data replication in mobile computing

Warm-up for Differential Calculus

Distributions. (corresponding to the cumulative distribution function for the discrete case).

Welch Allyn CardioPerfect Workstation Installation Guide

t 3 t 4 Part A: Multiple Choice Canadian Association of Physicists 1999 Prize Exam

Inter-domain Routing

body.allow-sidebar OR.no-sidebar.home-page (if this is the home page).has-custom-banner OR.nocustom-banner .IR OR.no-IR

Application Bundles & Data Plans

Network Configuration Independence Mechanism

Protocol Analysis / Analysis of Software Artifacts Kevin Bierhoff

Arc-Consistency for Non-Binary Dynamic CSPs

1. In the Bohr model, compare the magnitudes of the electron s kinetic and potential energies in orbit. What does this imply?

1 Fractions from an advanced point of view

What is the phase sequence of a balanced three-phase circuit for which V an = V and V cn = V? Find V bn.

THE LONGITUDINAL FIELD IN THE GTEM 1750 AND THE NATURE OF THE TERMINATION.

Architecture and Data Flows Reference Guide

How To Network A Smll Business

Basic Analysis of Autarky and Free Trade Models

JaERM Software-as-a-Solution Package

SPECIAL PRODUCTS AND FACTORIZATION

Integration. 148 Chapter 7 Integration

Cell Breathing Techniques for Load Balancing in Wireless LANs

Integration by Substitution

SURFACE OF MATTRESS MUST BE AT LEAST 5 IN. (127 MM) BELOW THE UPPER EDGE OF GUARDRAILS

Section 5.2, Commands for Configuring ISDN Protocols. Section 5.3, Configuring ISDN Signaling. Section 5.4, Configuring ISDN LAPD and Call Control

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator

COMPONENTS: COMBINED LOADING

Transcription:

SE3BB4: Softwre Design III Conurrent System Design Winter 2011 Smple Solutions to Assignment 1 Eh question is worth 10pts. Totl of this ssignment is 70pts. Eh ssignment is worth 9%. If you think your solution hs been mrked wrongly, write short memo stting where mrking is wrong nd wht you think is right, nd resubmit to me during lss, offie hours, or just slip under the door to my offie. The dedline for omplint is 2 weeks fter the ssignment is mrked nd returned. / Question 1 (i ) : The following proess models simple method for getting trough ny mze with no islnds. Briefly, if you ple your right hnd in the right hnd wll whenever you enter mze, you will lwys find wy out by following the pth desribed by tht wll. Moving left imples tht you re now lost in the mze nd tht you re stuk. Out signifies tht you re out of the mze / MAZE = ( enter ( right MAZE left STOP out STOP ) ). / Question 1 (ii ) : The following proess models simple ( forwrding) hnnel. Tht is hnnel tht outputs the sme entered vlue. / ÓÒ ØN = 3 CHANNEL = ( in [i: 1..N] out [i] CHANNEL ). 1

/ Question 2: The following proess models the behvior of vrible. The llowed opertions on vrible re either to red the vlue stored in tht vrible or to write vlue in it. The proper behvior of vrible entils tht the only vlue tht n be red from it is the lst vlue written. A vrible is modeled s proess in prtiulr stte, i.e., the stte denoting the urrent vlue held in the vrible. Writing vlue into the vrible is modeled s n tion tht modifies the its stte, while the reding its vlue is modeled s n tion tht leves its ste unhnged. It is ssumed here tht in order to red vlue from vrible first some vlue hs to be written. / ÓÒ ØN = 4 ÖÒVlue = 0..N VARIABLE = ( write [i: Vlue ] STATE [i] ), STATE [i: Vlue ] = ( write [j: Vlue ] STATE [j] red [i] STATE [i] ). 2

/ Question 3: The following proess models the behvior of sensor of mesuring the level of wter in tnk. The level of wter in the tnk is mesured in units in the within theöòr. The level of wter in the tnk is initilly 5. The sensor outputs signl low if the wter level is less thn 2, signl high if the wter level is more thn 8, otherwise it outputs norml. / ÓÒ ØLow = 2 ÓÒ ØHigh = 8 ÖÒR = 0.. 9 SENSOR = SENSOR [ 5 ], SENSOR [l: R ] = ( level [: R ] SENSOR [] Low ) low SENSOR [l] ÛÒ(Low < l && l < High ) norml SENSOR [l] High ) high SENSOR [l] ). ÛÒ(l ÛÒ(l 3

/ Question 4: The following proess models miniture portble Fm rdio. The behvior of the rdio is desribed s : (i) tion on turns the rdio on t the top frequeny of the FM bnd (108 MHz ). (ii) tion off turns the rdio off. ( iii) tion s n moves the tunning knob downwrds one frequeny t the time. Snning is only llowed s long s the botton frequeny (88 MHz) is not rehed. (iv) tion end signls tht the end frequeny hs been rehed. (v) tion lok loks the tunning knob nd stops snning. (vi) tion reset tunes the rdio to the top frequeny of the FM bnd (108 MHz ). In ddition, snning strts from the frequeny the rdio is urrently t. It is ssumed thtûòthe rdio is snning new frequeny no other tion thn lok is llowed. / ÓÒ ØTop = 108 ÓÒ ØBot = 88 ÖÒBnd = Bot.. Top RADIO = ( on RADIO [Top ] ), RADIO [frequeny: Bnd ] = ( off RADIO reset RADIO [Top ] ÛÒfrequeny > Bot sn [frequeny] SCANING [frequeny 1] ), SCANING [frequeny: Bnd ] = ( ÛÒfrequeny > Bot sn [frequeny] SCANING [frequeny 1] ÛÒfrequeny == Bot end SCANING [Bot ] lok [frequeny] RADIO [frequeny] ). 4

Question 5: Here, there is no dnger in using n isomorphism between lbeled trnsition systems to prove tht the behvior of these proess is equivlent. Thene, it is neessry to prove tht: (i) The lphbet of S1 is equl to the lphbet of S2 Proof Let α(p) denote the lphbet of proess P, then it is neessry to show tht α(s1) = α(s2) = { definition of the lphbet of both proesses } {, b, } = {, b, } = { logi } True (ii) The lbeled trnsition system for S1 is isomprhi to the lbeled trnsition system for S2 Proof () By definition, the LTS for S1 is 0 1 2 3 b (b) By definition, the minimized LTS for S2 is 0 1 2 3 b Clerly, both LTS re isomorphi. From (i) nd (ii) it follows tht S1 exhibits the sme behvior s S2. 5

/ Question 6: / ÓÒ ØN = 2 ÖÒClients = 0..N CLIENT = ( ll wit ontinue CLIENT ). / Proess SERVER models the behvior of server pble of ttending requests ( mutully exlusive) of severl lients. The behvior of the server is simply desribed s follows : (i) tion request [ ] models request from lient. (ii) tion servie models n internl omputtion on the server. (iii) tion reply [ ] models reply to request from lient. Clerly the server will reply request from lient provided lient hs pled request. / SERVER = ( request [: Clients ] servie reply [] SERVER ). / The following proess models severl lients running in prllel / CLIENTS = ( forll [i: Clients ] lient [i ] : CLIENT ). / The relbeling prt in the omposed proess models the synhroniztion between the lls mde by the lients nd the requests epted by the server s well s their respetive responses. / CLIENTS_SERVER = ( CLIENTS server : SERVER ) /{ lient [: Clients ]. ll/server.request [], server.reply [: Clients ]/lient [ ]. wit }. 6

/ Question 7 / / The following proesses model the behvior of roller oster. / / Proess turnstile models the rrivl of pssengers to the roller oster. / TURNSTILE = ( pssenger TURNSTILE ). / Proess ontrol models ontrol system for the roller oster. The ide is tht ontrol will keep trk of the number of pssengers in the roller oster r. Its behvior is desribed s follows : (i) tion rrive initilizes to 0 the internl ounter for ontrol. Intuitively it models the rrivl of n empty r to the pltform. (ii) tion pssenger signls pssenger jumping into the r. (iii) tion deprt signls the deprture of the roller oster r is. The ondition on this tions implies tht the r will deprt onlyûòfull. / ÓÒ ØN = 3 CONTROL = CONTROL [ 0 ], CONTROL [n: 0..N ] = ( ÛÒn < N pssenger CONTROL [n+1] N deprt CONTROL [n] rrive CONTROL ). ÛÒn == / Proess r models the behvior of roller oster r. (i) tion deprts signls the deprture of the r from the pltform nd the begining of the ride. (ii) tion ride models the roller osters trip. (iii) tion rrive signls the rrivl of the r to the pltform. / CAR = ( deprt ride rrive CAR ). / It is ssumed tht there is only one r in the roller oster. Moreover, it is ssumed tht intilly there is r witing for pssengers nd redy to strt the ride. Pssengers getting off the roller oster r is modeled s single tion. / ROLLER_COASTER = ( TURNSTILE CONTROL CAR ). 7