Beruflich Dokumente
Kultur Dokumente
1
A)A Thread can be defined as a light weight flow that can execute concurrently
with other threads within the same process.
2
Plain classes
no such flows
cant independently initiate control activity
passive)
A) Active classes represents an independent flow of control, where as a plain class
embodies no such flow. In Contrast to active classes, plain classes are implicitly
called passive because they can’t independently initiate control activity.
2)what happens when an active object is created and destroyed?(an associated
flow of control is started , and terminated)
A)When an active object is created the associated flow of control will be started ,
when the active object is destroyed, the associated flow of control will be
terminated
3)What are the two standard stereotypes that can be applied to active
classes?(<<process>> and <<thread>>)
A)The two standard stereotypes that can be applied to active classes are
<<process>> and <<thread>>
4)What the stereotype <<process>> specifies?( heavy weight flow )
A)This stereotype specifies the heavy weight flow that can execute concurrently
with other processes
5)What is heavy weight?( a thing known to OS and runs in an independent
address space)
A)Heavy weight means, a thing that is known to Operating System itself and runs
in an independent address space
5)What the Stereo type<<thread>> specifies?(a light weight flow)
3
A)It specifies a light weight flow that can execute concurrently with other threads
with in the same process
6) What is light weight?(known to the OS itself , no separate address space)
A)A light weight means , it is known to Operating System, but no separate address
space is created for the thread , it runs in the same address space of the process
along with other threads
7)How we can use active classes?( to model common families of processes or
threads)
8)What the Active classes may have?(
1. same properties as all other classes,
2. May have attributes and operations,
3. may participate in GAD
relationships)
9)What the Active Classes may use? ( they may use UML’s
1)Extensibility mechanisms
2)StereoTypes,tagged values,constraints)
10) Relationship between interfaces,active classes and collaborations?
A)Interfaces are realized by the Active classes , Active classes are realized by the
Collaborations
11) How the behavior of an active class is specified?(by using state machines)
12)Modeling the collaboration of active and passive objects?(by using
interaction diagrams including sequence
and collaboration diagrams)
Communication
1) When the objects interact with each other and how?( when they collaborate ,
by passing messages from one
to the other)
4
A) Objects interact with each other when the collaborate and they interact by
passing messages from one to the other.
2) What a system may contain?(both active and passive objects)
A) A System may consists of active and passive objects
3)What are the various combinations of interaction?( four ways
1) A message can be passed from one passive object to
another
2) A message can be passed from one active object to another
3) A message can be passed from an active object to a passive
Object
4) A message can be passed from a passive object to an active
Object
4) Representing a synchronous message and asynchronous message?(full arrow
and half arrow)
A)In UML a synchronous message is denoted with a full arrow and an
asynchronous message with a half arrow.
5)Diagram
5
6
Synchronization
1)What is synchronization?( arranging the flow of control of objects , mutual exclusion is
guaranteed)
A)
synchronization means arranging the flow of controls of objects so that
mutual exclusion will be guaranteed.
3)Diagram
7
A)Guarded – multiple flow of control is sequentialized with the help of
object’s guarded operations. in effect it becomes sequential.
A)
Concurrent – multiple flow of control is guaranteed by treating each
operation as atomic
8
8)What we have to consider in IPC?(distributed systems where processes may
live in)
8)Where the processes live in a distributed system?(separate nodes of machines
or computers)
9)What techniques are used to establish IPC?(message passing and remote
procedure calls)
10)How the IPC mechanisms(RPC,message passing)are modelled in UML?(by
using synchronous or asynchronous
events respectively)
11)How this can be done?(adorn your designs with further information)
12)Steps involved in modeling a IPC?
9
13) Diagram
10
14)What the above diagram shows?( a distributed reservation system with
processes spread across four nodes)
15)How each object is marked?(by using the stereotype <<process>>)
16)What each object is having?(a location attribute , which specifies its physical
location)
17)communication among Reservation Agent,TicketingManager and
HotelAgent?(asynchronous communication)
18) Communication between a Trip Planner and Reservation
System?(synchronous)
19)How the semantics of their interaction found?(in collaboration named CORBA
ORB)
20)Client here? (The TripPlanner acts as a client)
21)Server here?(ReservationAgent acts as a server)
22)How we can find the details of collaboration?(by zooming into the
collaboration, you will find the details
of how this server and client collaborate)
Modeling The Flow of Control
11
1) What the above diagram shows?(part of the process
view of a trading system)
12
Steps involved in Modeling
1) Representing (each flow as an active class)
2) Generalizing (common set of active objects into active classes)
3) Concurrency (Don’t introduce too much concurrency)
4) Balanced Distribution (establish balanced distribution of
responsibilities among active classes)
5) Tight cohesive and loosely coupled(ensure that each active
class is both tightly cohesive and lossely coupled)
6)Right set of attributes(Ensure that each class has a right of
attributes,operattions and signals)
7)Capturing?(static decisions in class diagrams and high light
each active class)
8)Identifying(Identify group of classes collaborates with one
another dynamically)
9)Capturing(Capturing dynamic decisions in interaction
diagrams)
10)Representing(Representing active objects as root of flows)
11)Attention(Attention on communication among active objects)
12)Attention on synchronization?( among active objects and
passive objects)
13)Apply?(apply synchronous and asynchronous messaging)
14)Apply(Sequential ,Guarded ,concurrent operation semantics)
AAAABCCCRRRITG
13
A- Attention on synchronization among active objects and
passive objects
A - Apply synchronous and asynchronous messaging
A- Apply Sequential ,Guarded ,concurrent operation semantics
14