ch07lect1_UD - Using UML Patterns and Java Object-Oriented...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 6  System Design: Addressing Design  Goals
Image of page 1

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

View Full Document Right Arrow Icon
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 2 System Design 2. Subsystem Decomposition Layers vs Partitions Coherence/Coupling 4. Hardware/ Software Mapping Special Purpose Buy vs Build Allocation of Resources Connectivity 5. Data Management Persistent Objects File system vs Database Access Control List vs Capabilities Security 6. Global Resource Handlung 8. Boundary Conditions Initialization Termination Failure 3. Concurrency Identification of Threads 7. Software Control Monolithic Event-Driven Conc. Processes 1. Design Goals Definition Trade-offs
Image of page 2
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3 Concurrency Nonfunctional Requirements to be addressed:  Performance, Response time, latency, availability. Two objects are  inherently concurrent  if they can  receive events at the same time without interacting Source for identification: Objects in a sequence diagram  that  can simultaneously receive events Unrelated events, instances of the same event Inherently concurrent objects can be assigned to  different threads of control Objects with  mutual exclusive activity  could be folded  into a single thread of control
Image of page 3

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

View Full Document Right Arrow Icon
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 4 Thread of Control thread of control  is a path through a set of state  diagrams on which a single object is active at a time A thread remains within a state diagram until an object sends  an event to different object and waits for another event Thread splitting:  Object does a non-blocking send of an event  to another object. Concurrent threads can lead to race conditions. race condition   (also race hazard) is a design flaw  where the output of a process is depends on the  specific sequence of other events. The name originated in digital circuit design: Two signals  racing each other to influence the output.
Image of page 4
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 5 Example: Problem with threads :BankAccount c1:Customer c2:Customer :WithdrawCtrl :WithdrawCtrl getBalance() 200 withdraw(50) setBalance(150) getBalance() 200 withdraw(50) setBalance(150) computeNewBalance(200,50) computeNewBalance(200,50) Assume: Initial balance = 200 Final balance = 150 ??! Thread 1 Thread 2 Should BankAccount be another Thread ?
Image of page 5

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

View Full Document Right Arrow Icon
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 6 Solution: Synchronization of Threads c1:Customer c2:Customer :BankAccount :WithdrawCtrl getBalance() 200 withdraw(50) setBalance(150) computeNewBalance(200,50) Initial balance = 200 withdraw(50) Single WithdrawCtrl Instance Synchronized method End balance = 100
Image of page 6
Bernd Bruegge & Allen H. Dutoit
Image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern