This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

A question on performance testing and OOAD artifacts....

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A system undergoing performance testing is found to be "thrashing" (a condition that occurs when there is too much concurrency). Which of the following artifacts would be MOST helpful to uncover the problem? (choose two) (b, c)
a)The use case descriptions
b)A state diagram
c)A process view
d)An activity diagram
e)A collaboration diagram
I chose (c) and (d) - Activity diagrams are useful to study parallel behavior and a process view shows the allocation of processes to processors.
But I feel that activity diagram, process view and also state diagrams are useful in studying concurrent behavior. Because state diagrams can also show concurrent states of an object. So I am not sure if the answer should be (b,c), (c,d) or (b,d).
Please comment.
Thanks.
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Option (d) is definitely one of the answer. Regarding the other choice, I had answered, (e), since collaboration diagrams also provide insight into multiple object interactions & concurrency. But, I guess, option (c) sounds better, since one can observe multiple (concurrent) processes (if any) in a Process view.
State diagrams also can be used to gain info on a particular object's concurrent processes, but when concurreny issues span multiple multiple objects, State diagrams won't help as much as Activity diagrams and Process views.
So (c) & (d) seems to me as the best choices.
 
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Merlin M Koppula:
A system undergoing performance testing is found to be "thrashing" (a condition that occurs when there is too much concurrency). Which of the following artifacts would be MOST helpful to uncover the problem? (choose two) (b, c)
a)The use case descriptions
b)A state diagram
c)A process view
d)An activity diagram
e)A collaboration diagram
I chose (c) and (d) - Activity diagrams are useful to study parallel behavior and a process view shows the allocation of processes to processors.
But I feel that activity diagram, process view and also state diagrams are useful in studying concurrent behavior. Because state diagrams can also show concurrent states of an object. So I am not sure if the answer should be (b,c), (c,d) or (b,d).
Please comment.
Thanks.


B, D.
Somewhere in Larman's book, it says 'B' and 'D' are equivalent in functionality.
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Don. Moreover I have never heard of any artificat like process view (though the name sounds perfect in this context and makes things confusing).
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I chose b (state diagram) and c (process view). Larman page 502 talks about Process view as one of the six architectural views. It shows threads in that view. State Diagrams shows how a object goes through changes in states. It relates to one object. Fowlers book shows how you can see more then one thread executing at one time. I don't have book with me but it is in the last pages on the chapter on State diagrams. The notation looks almost like a superstate notation with a dash line down the middle of it.
Activity diagrams and State diagrams show the concept of concurrency. State diagram better represents it as it relates to a object. Activity diagram represents it more conceptually. Activity diagram does not tie into the code to well. It is hard to see sometimes how it ties to a particular object.
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll second Don and Balbir. I view Activity diagrams and State diagrams as equivalent in functionality. (Actually, Doug Lea utilized Activity diagrams to interpret his thread programming principles in the book Concurrent Programming in Java)
Buddies, can you please elaborate on what is process view?
[ March 28, 2002: Message edited by: Doug Wang ]
 
garth schneider
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose the irony of this is that the process view actually uses the state and the activity diagram to present itself. I don't know that for sure but I am starting to think that that is the case.
 
garth schneider
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the second edition of Concurrent Programming in Java. I see interaction diagrams and state diagrams. I was unable to find a activity diagram. Could you give me a page number where I can find it please.
 
Doug Wang
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the first edition of Concurrent Programming in Java and my book is a non-English version. Anyone out there can help me out from such an embarrassment?(point out the page number that garth requests) Thanks.
 
garth schneider
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you if you say you saw it in first edition. That's very likely. I was looking at the second edition. If I missed it in the second edition please let me know. I paged through it fairly fast this morning before I came to work. This thread has been very valuable to me. I am actually starting to think that the actual diagrams are in fact State and Activity. I think the process view probably uses thoses diagrams to represent its view??
 
garth schneider
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Larman's book is a bit confusing on page 503. Listed in Sample Structure of a SAD, he explains process view using "UML class diagrams and interaction diagrams illustrating the processes and threads of the system." These are not the diagrams we discussed here (ie state and activity diagrams). This must be a typo on his part. Please correct me if I am wrong in saying that.
 
garth schneider
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again. Page 512 of Larman talks about Threads in UML. I am sorry that I would have ever thought that Craig would make a mistake.
He talks about using Class diagrams with a (thread) stereotype and interaction diagrams with a (active) stereotype.
In terms of understanding the applications architecture I am starting to think b) State and c)Process View (which is class and interaction diagrams that are properly marked). Activity diagrams have a hard time linking to actual objects and so would be hard to use to see actual concurency.
[ April 02, 2002: Message edited by: garth schneider ]
[ April 02, 2002: Message edited by: garth schneider ]
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody. Nice to have found this forum.
I got the following as correct answers: "c" (Process view) and "d" (Activity Diagram).
IMHO the rationale for not using a State diagram is because it is mostly suggested to depict the behavior of a single object that you'd be particularly interested. Conversely, an Activity diagram would be suitable to depict flow of control (including paralell) that spans through multiple objects. Regarding the Process View I'm honestly in doubt. It didn't seem to me like a new diagram but actually an Activity diagram focused on the designed concurrent processes, i.e., a view of concurrent processes.
 
garth schneider
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow. That changes things a bit.
Yes a State Diagram does concentrate on one object. But Concurrency issues usually occur with many instances of one object type. ie. you synchronize on one object. Each object has its own monitor. When you synchronize on a block of code or a method you are marking a single class as being used. No one can use any synchronized methods in any other instance of that class (object). I still think the state diagram is correct. I choose b) State, c) process view
 
Paulo Salgado
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Garth.
Ideas apart, the answers for the mock exam ARE "c" and "d". No doubt.
To be honest, in real life I wouldn't state with that much certainty. You just gave a reason not to do so. Exploring your point (a very good one by the way), I always thought of State a diagram to be used on a conceptual perspective. A business (domain) object being changed by events handled by the system. For some reason I have never thought of it in an implementation perspective as you described. Do you by any chance have a sample that could be posted ? This could be useful.
Exploring other options for the question. They mention about a thrashing problem. This seems to be related to virtual memory swapping. Maybe caused by excessive memory consumption, say too many objects being allocated and/or not being freed quickly enough. Thinking this way, doesn't it seem that a diagram that gives you an overall flow of control more useful ? Remember they ask for the best answers, not all. Just a thought.
 
garth schneider
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paulo,
Thanks for the update. You are right. I tryed it on mock and that is the answer. I appreciate your feedback.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic