Presentation is loading. Please wait.

Presentation is loading. Please wait.

Synchronous & Asynchronous Models in Computing By: James Pauer.

Similar presentations


Presentation on theme: "Synchronous & Asynchronous Models in Computing By: James Pauer."— Presentation transcript:

1 Synchronous & Asynchronous Models in Computing By: James Pauer

2 What is Asynchronous  What is synchronous?  Greek: prefix; no, absence of, without, lack of, not

3 Another Way

4 Basics of Synchronies  Actions occur at specific times and intervals  Measured against a time reference, or a clock signal  Takes time to communicate with the receiver beforehand  Accommodates complex and larger transmissions

5 Basics of Asynchronies  Each byte holds its own signal bits

6 Each byte holds it’s own signal bits

7 Basics of Asynchronies  Each byte holds it’s own signal bits  Responds to another signal  Not governed by a synchronized clock  AKA “best effort”  Simple small transmission  Connect to a modem / network  Point-to-Point Protocol (PPP)  Authentication, encryption, compression  PPPOE

8 In Computer science  Transmission  Threading  Programming Language  Circuits  Data  Data integrity

9 In Computer science  Transmission

10 Transmission (Synchronous)  No start/stop bits  Synchronizes transmission speeds / clocks  Meant for continuous flow of data  High transfer rate  Errors  Clock out of sync, eventually  Bytes arriving at unknown time  Dropped packets/lost bits  Solutions  Re-synchronization  Check digits

11 Check digit  ISBN 10  ISBN 13  EAN  UPC “ ”  Add odds, multiply by 3  Add evens  Add the two results  Mod 10, minus 10

12 Transmission (Asynchronous)  Has start/stop bits  Intermittent flow of data  Arbitrary waiting time  Parity  Error detection technique  = check digit

13 Parity Bits 7 bits of data (number of 1s) 8 bits including parity evenodd (0) (3) (4) (7)  Parity bit - 0 = true 1= false  Zero is even

14 In Computer science  Transmission  Threading

15 Synchronous I/O

16 Synchronous I/O cont.  AKA “blocking I/O”  Problems  Large delay times  The I/O operation completes  An I/O error occurs.  The function CancelSynchronousIO was called, terminating the thread  The blocked thread is terminated by the system; the process itself is terminated

17 Asynchronous I/O

18 Asynchronous I/O cont.  Continues to process non I/O related tasks  AKA “non-Blocking I/O” or “overlapped I/O”  Beneficial to:  Backup of a large database  Slow communication links  Optimizes processing efficiency

19 In Computer science  Transmission  Threading  Programming Language

20 Programming Languages (Synchronous)  Argos  Atom  Averest  ChucK  Esterel  LabVIEW  LEA  Lustre  PLEXIL  SIGNAL  SOL  SyncCharts

21 Programming Languages (Synchronous)  Often used for reactive systems  Eg. Flight simulator  AKA “real-time” systems  AKA “Synchronous Reactive Programming (SRP)”  “Logical Ticks”  Sequence of ticks  Computations assumed instantaneous

22 Programming Languages (Asynchronous)  AJAX (Asynchronous JavaScript and XML)  Support asynchronous methods:  JavaScript  Promises/A  C# / Visual Basic  Await operator  C++  Task class, then  Windows Runtime  Displaying a message dialog  Working with the file system  Sending/receiving data to/from the internet

23 In Computer science  Transmission  Threading  Programming Language  Circuits

24 Circuits (Synchronous)  Parts are synchronized  Disadvantages  Larger circuits/clock propagation  Heating/gate switching

25 Circuits (Asynchronous)  Parts are autonomous  Wait for signals through data transfer protocols  Benefits  Components can run at different speeds  Uses less power  Emits less heat  UART (Universal Asynchronous Receiver Transmitter)  Translates data between parallel and serial

26 In Computer science  Transmission  Threading  Programming Language  Circuits  Data  Data integrity

27 Data Integrity  File synchronization  such as syncing a hand-held MP3 player to a desktop computer.  Cluster file systems  which are file systems that maintain data or indexes in a coherent fashion across a whole computing cluster.  Cache coherency  maintaining multiple copies of data in sync across multiple caches.  RAID  where data is written in a redundant fashion across multiple disks, so that the loss of any one disk does not lead to a loss of data.  Database replication, where copies of data on a database are kept in sync, despite possible large geographical separation.  Journaling, a technique to make sure that file metadata are updated on a disk in a coherent, consistent manner.


Download ppt "Synchronous & Asynchronous Models in Computing By: James Pauer."

Similar presentations


Ads by Google