SYSC-3303-04-SharedVariables

SYSC-3303-04-SharedVariables - SYSC3303 RealTimeProgramming...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
SYSC 3303 Real Time Programming ared Variables Shared Variables Embedded Systems: Contemporary Design Tool A Contemporary Design Tool , Chapter 12, James Peckol
Background image of page 1

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

View Full DocumentRight Arrow Icon
terchange via Shared Variables Interchange via Shared Variables o you remember your SYSC 2002: ata Do you remember your SYSC 2002: Data Structures and Algorithms? ll shared variables will suffer from the same All shared variables will suffer from the same weakness: They allow the exchange of information They require synchronization and coordination Solutions to be covered separately in the next lecture. 1/13/2009 SYSC 3303 Winter 2009 C. Schramm 2
Background image of page 2
lobal Variables va Global Variables Java public class Client implements Runnable public class Server implements Runnable { private PassiveObject o; public Client(PassiveObject o) { this.o = o; } { public static int STATIC_VAR=0; private PassiveObject o; public Server(PassiveObject o) public run(…) { x = server.STATIC_VAR; .setX *2); { this.o = o; } public run(…)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/16/2009 for the course SYSC 3303 taught by Professor Shramp during the Spring '09 term at Carleton CA.

Page1 / 8

SYSC-3303-04-SharedVariables - SYSC3303 RealTimeProgramming...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online