• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Modeling Multi-threading

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I asked you how to model multiple threads in the UML, what would you tell me?
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To be more specific, I think we should use Activity Diagrams to model multiple threads.
Regards
Ashok
 
Steve Murphy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not concurrent flows of control, but specifically threads.
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can show concurrent processing in a number of ways using UML notation.
Activity diagrams (as mentioned by Ashok) can be used. In fact, this is probably one of the main strengths of activity diagrams, as it emphasises the synchronisation of multiple activities.
Currently, activity diagrams are a form of state chart, so there is an equivalent state chart notation (see page 2-191 in UML spec).
Using class diagrams you can indicate that a class owns its own thread of control using the 'isActive' property. Threads can be explicitly modelled using the 'thread' stereotype, or a more heavyweight 'process' stereotype.
Using interaction diagrams, you can show active instances using the {active} property, or with a heavy border. Concurrent threads are shown using sequence numbering. Those that differ only in name (e.g. 2a 2b) are assumed to execute concurrently.
regards,
paul.
 
Steve Murphy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul, a very informative post.
Steve
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic