# Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Synchronous & Asynchronous Models in Computing By: James Pauer

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

Another Way

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

Basics of Asynchronies  Each byte holds its own signal bits

Each byte holds it’s own signal bits

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

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

In Computer science  Transmission

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

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

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

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

In Computer science  Transmission  Threading

Synchronous I/O

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

Asynchronous I/O

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

In Computer science  Transmission  Threading  Programming Language

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

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

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

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

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

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

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

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