Design 2002/Labs

    Two labs for the course (no project). Use UML- tool to draw diagrams. Submit paper copies to the end of period 4. This means the last scheduler lecture or laboratory hour. The labs expires that time and you must start with new labs.

    (1) Redraw the class diagram in the course material with the following changes:
      • We have not any implementation dependent features (this is an essential model!) as alarm manager
      • We have not any class for parameters, parameters are attributes of appropriate objects
      • Add role names to associations
      • Add most important attributes and operations to classes

     
     

    (2) Make a design of the communication subsystem (classes, sequence diagrams, state transition diagrams)

    We use the alternating bit protocol, which is a very simple protocol (used in the ARPA- project).

    Data frames are transmitted to a channel as follows:

      • A packet ( frame ) has a header with the sequence number 0 or 1
      • Every packet carries CRC
      • When a wrong packet is received by the other side, a ACK packet is sent with the number of the last correct packet ( 0 or 1)
      • A correct packet is ”ACKed” by  an ACK packet with the number of the packet received
      • Every time when ACK arrives, the sequence number is incremented mod 2 ( alternating 0 and 1) and new data frame to be sent is asked (waited) from "the upper level"
      • Every time when a packet is sent a timer is started (for ACK)
      • If an ACK packet is not received before the timer fires, an error is occurred and the last packet is sent again
      • The receiving process is very similar, however, main differences are:
      • An arrived packet is delivered to "the upper level"
      • We have no timer
     

    We need queues and hw- related objects. Also we must see the communication of input and output threads, for example the input thread must use the output thread to send ACK. Also, the material tells about registration to the communication service, all this must be seen in the design documentationl. Show also the usage of the impentation phase new class dynamic memory allocation. The messages are probably created using dynamic memory allocation- true?