Top Banner
Synchronous & Asynchronous Models in Computing By: James Pauer
27
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Synchronous & Asynchronous Models in Computing By: James Pauer.

Synchronous &Asynchronous Models in ComputingBy: James Pauer

Page 2: Synchronous & Asynchronous Models in Computing By: James Pauer.

What is Asynchronous

What is synchronous?

Greek: prefix; no, absence of, without, lack of, not

Page 3: Synchronous & Asynchronous Models in Computing By: James Pauer.

Another Way

Page 4: Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Page 5: Synchronous & Asynchronous Models in Computing By: James Pauer.

Basics of Asynchronies Each byte holds its own signal bits

Page 6: Synchronous & Asynchronous Models in Computing By: James Pauer.

Each byte holds it’s own signal bits

Page 7: Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Page 8: Synchronous & Asynchronous Models in Computing By: James Pauer.

In Computer science Transmission Threading Programming Language Circuits Data

Data integrity

Page 9: Synchronous & Asynchronous Models in Computing By: James Pauer.

In Computer science Transmission

Page 10: Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Page 11: Synchronous & Asynchronous Models in Computing By: James Pauer.

Check digit ISBN 10 ISBN 13 EAN UPC “036000241457”

Add odds, multiply by 3 Add evens Add the two results Mod 10 , minus 10

Page 12: Synchronous & Asynchronous Models in Computing By: James Pauer.

Transmission (Asynchronous)

Has start/stop bits

Intermittent flow of data

Arbitrary waiting time Parity

Error detection technique = check digit

Page 13: Synchronous & Asynchronous Models in Computing By: James Pauer.

Parity Bits

7 bits of data

(number of 1s)

8 bits including parity

even odd

0000000 (0) 00000000 10000000

1010001 (3) 11010001 01010001

1101001 (4) 01101001 11101001

1111111 (7) 11111111 01111111 Parity bit - 0 = true 1= false Zero is even

Page 14: Synchronous & Asynchronous Models in Computing By: James Pauer.

In Computer science Transmission Threading

Page 15: Synchronous & Asynchronous Models in Computing By: James Pauer.

Synchronous I/O

Page 16: Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Page 17: Synchronous & Asynchronous Models in Computing By: James Pauer.

Asynchronous I/O

Page 18: Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Page 19: Synchronous & Asynchronous Models in Computing By: James Pauer.

In Computer science Transmission Threading Programming Language

Page 20: Synchronous & Asynchronous Models in Computing By: James Pauer.

Programming Languages(Synchronous)

Argos Atom Averest ChucK Esterel LabVIEW

LEA Lustre PLEXIL SIGNAL SOL SyncCharts

Page 21: Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Page 22: Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Page 23: Synchronous & Asynchronous Models in Computing By: James Pauer.

In Computer science Transmission Threading Programming Language Circuits

Page 24: Synchronous & Asynchronous Models in Computing By: James Pauer.

Circuits (Synchronous)

Parts are synchronized Disadvantages

Larger circuits/clock propagation Heating/gate switching

Page 25: Synchronous & Asynchronous Models in Computing By: James Pauer.

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

Page 26: Synchronous & Asynchronous Models in Computing By: James Pauer.

In Computer science Transmission Threading Programming Language Circuits Data

Data integrity

Page 27: Synchronous & Asynchronous Models in Computing By: James Pauer.

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.