1 / 24

CIS 644 Thus. Oct. 28, 1999 W10B … misc. questions … thread, Runable

CIS 644 Thus. Oct. 28, 1999 W10B … misc. questions … thread, Runable … communication patterns. Exam1 … covers: class & scenario models open book … < 1.5 hours Tues Nov 2. on campus … in class off campus … sent email 4:30pm C.T.

mercer
Download Presentation

CIS 644 Thus. Oct. 28, 1999 W10B … misc. questions … thread, Runable

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIS 644 Thus. Oct. 28, 1999 W10B … misc. questions … thread, Runable … communication patterns

  2. Exam1 … covers: class & scenario models open book … < 1.5 hours Tues Nov 2. on campus … in class off campus … sent email 4:30pm C.T. email or fax it back

  3. administrative: > corrections to GRADES file are being made … will be reposted later. > CIS web server was “killed” this week … temporarily moved … … some scripts may not work CIS644 local pages should be OK now. > I keep up with “urgent” email … rest may wait for a while (will post patterns lists later)

  4. ?? are GRADES 4 digits SSN number? ... they are KSU student ID number. ?? send back off-campus homework … no … just class discussion ?? post “my answer” … no … posted TA’s answer

  5. ?? “1.5” hours for exam … on-campus ... up to 90 minutes … off-campus … honor system will draw some diagrams … FAX is OK … “asap” if you want to use Rose or other tool, great … don’t count that as part of exam time.

  6. review questions: "class variables" , "class markers" (page 21) c getList( ; list) … there are times with class methods are required Coad’s use of class methods for collections is optional … not my preference

  7. my preference: theAirports LOOP | getAirport( ; anAirport) -->| | anAirport | | getInfo( ) ----------------------->| ENDLOOP translates: loop { anAirport = theAirports.getAirport( i ); }

  8. ??is this related to aggregation vs composition ?? … no … I see A vs C as who owns the items who is responsible for keeping refs UML … what are the items "part of"

  9. ?? c new(passenger; aReservation) … converts to Java as: aReservation = new Reservation(passenger)

  10. ?? Airports | c remove( anAirport) -->| could translate as: class Airports { Airport[ ] items; … void remove( integer i) { items[ i ] = null ; } }

  11. ?? * getValues( ; values) … * indicates a loop … calls to multiple objects from the collection

  12. threads use comments: threads are used in: CIS625 distributed Processing CIS725 Computer Networks

  13. I use Solaris threads & Posix threads. I use the ACE framework (thread details are hidden within) … at Motorola

  14. at Sprint: ...Every application … is multi-threaded ... created our own thread classes in C++ ( inconsistencies with the standard class) e.g. * credit card validation (C++) … allows concurrent requests * vendor communication (C++) … allows concurrent requests * orders system (Java) .. Enterprise Java Beans framework (hidden multi-threads )

  15. .. some Java threads. .. more with multi-tasking in real-time OS (OS-9, iRMX, Unison, VersaDos) using C …these OS's have features such as: mailboxes, signals, shared memory for intertask communication semaphores to control access

  16. we use concurrency ...in modeling aircraft systems for real-time simulation ----------------------------------------------------- threads (multiple processes) are becoming more common in systems we are developing

  17. ?? was there only one thread in the Video Store?? … Chap 1 … yes … real… no… need to define the "system" arch. assume: one processor, many agents in PD … should be multiple Agent tasks, each with own UI

  18. continuing into Chaps 4 & 5: Coad: "this is easy" :-( UML: objects: passive vs active active: process vs thread ADA: object vs task

  19. Java: Runable interface defines run() but is not per se active object Thread implements Runable and is active object Runable object can be executed "in" (with ??) its own thread. … pass object to Thread(Obj) . or, Runable object can make its own thread, as Sensor version p. 194

  20. or .. Thread can execute several different runable objects (…invoke their run() ) … in sequence , of course.

  21. threads can have priorities … but current JVMs do not guarentee exact mapping of priorities !! Lea recommends: HI … for system critical threads LO … for background threads Coad mapping … p. 192 :-(

  22. visual representation of active objects: … at Java level, only Thread is really active, … at design (abstract) level, Runable objects can be "active" :-( Coad does not show bold boxes __ __ Ada: /__ / for Task vs [__] for obj.

  23. skim Chap 4, 5 for overview: several different forms for communication passive (polling) timer active (source notifies its listeners) message vs notification: of course, at Java level, notification implemented as message

  24. End

More Related