[MSYS 51] Module 4.1 Input-Output Basics

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/17

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

I/O Devices

Slowest in any computing platforms

  • Slowest components

  • Diverse types

    • Price and form factor

    • Inexpensive: Mouse; expensive: monitors

  • Components that interact most with user

2
New cards

Common I/O Devices: Input

  • Keyboard

  • Mouse

  • Scanner

3
New cards

Common I/O Devices: Storage

  • Magnetic disks

  • Flashdrives

4
New cards

Common I/O Devices: Output

  • Display Screen

  • Printer

5
New cards

I/O Transfer Modes: How - Parallel

  • Simultaneous transfer of multiple bits

  • Advantageous: speed, requires large amount of data to be optimal

    • Fast transmission

  • Downside: more complex, expensive

    • Compromised solution: 4 bits at a time (still parallel pero hindi as complicated as 8 bits)

    • Optimal design of a component: depends kung ilang wires need

    • Interface: connect with each other/ communicate via air (if wireless)

    • Requires more wires but is faster (anything more than 1 bit (1 nibble = 4 bits) at a time is par

    • Electrical signals pass through the wire; generates electromagnetif field

      • A concern for multiple wires: if together, they could interfere with each other’s signal (physics) 

6
New cards

I/O Transfer Modes: How - Serial

  • Data transferred one bit at a time

  • How many transfers do you need to transfer 1 byte of data? 8 transfers from 1 component to another – 8 bits of data in a byte

  • Example:

    • Mouse: 1 wire connecting the mouse to CPU

      • 1 bit at a time (single wire; a single bit)

      • Either has electricity flowing through it or none (1 or 0)

        • Absence of energy

        • Via a clock to pass (distinguish via same bits)

      • Relatively slow compared to computer standards

    • DDR : data transfer occurs (wait for a specific value on that wire)

      • Synchronizing between two modules using a common clock

      • Regulate transfer between two components

<ul><li><p><span><strong>Data transferred one bit at a time</strong></span></p></li><li><p><span>How many transfers do you need to transfer 1 byte of data? 8 transfers from 1 component to another – 8 bits of data in a byte</span></p></li></ul><ul><li><p><span>Example:</span></p><ul><li><p><span>Mouse: 1 wire connecting the mouse to CPU</span></p><ul><li><p><span>1 bit at a time (single wire; a single bit)</span></p></li><li><p><span>Either has electricity flowing through it or none (1 or 0)</span></p><ul><li><p><span>Absence of energy</span></p></li><li><p><span>Via a clock to pass (distinguish via same bits)</span></p></li></ul></li><li><p><span>Relatively slow compared to computer standards</span></p></li></ul></li><li><p><span>DDR : data transfer occurs (wait for a specific value on that wire)</span></p><ul><li><p><span>Synchronizing between two modules using a common clock</span></p></li><li><p><span>Regulate transfer between two components</span></p></li></ul></li></ul></li></ul><p></p>
7
New cards

I/O Transfer Modes: When - Synchronous

Uses a timing mechanism (clock)

When to use:

  • When precise control over execution order is needed.

  • When dealing with devices that have predictable response times.

  • When simplicity is preferred over performance.

  • How it works: The CPU waits for the I/O operation to complete before proceeding with the next task. This means the program execution is paused until the data transfer is done.

  • Example: Reading a file in a blocking way, where the program waits until the entire file is read before continuing.

8
New cards

I/O Transfer Modes: When - Asynchronous

Event-based

  • When to use:

    • When performance optimization is needed by allowing the CPU to execute other tasks while waiting for I/O.

    • When handling multiple I/O operations concurrently, such as in networking and database access.

    • Allows a system to handle multiple I/O operations without blocking execution. Instead of waiting for an operation to complete, the system registers an event handler (callback function) or uses interrupts to notify when the I/O operation is done.

  • How it works: The CPU initiates an I/O request and continues executing other instructions without waiting for the I/O operation to finish. When the I/O operation is completed, an interrupt notifies the CPU.

  • Example: Network communication, where data can be sent and received without blocking program execution.

9
New cards

Hard Disk Drives

Importance

  • Long-term storage of files

  • Nonvolatile

Cost-effective

10
New cards

Hard Disk Drives: Inside

  • Magnetic

  • Moving parts

    • Slow

    • Damage-prone

      • Read-write heads hovers only above each side of the platter

      • Physical damages are usually irrecoverable

11
New cards

Hard Drive: Mechanism

  • Spins at a constant speed (varies depends on the type)

    • 5400 RPM (Revolutions per minute)

    • 7200 RPM

    • 10K  RPM

  • The upside of a slower hard drive:

    • Price

    • Notice effect on battery life

      • Less energy to power up

      • If attached to device for long hours -> drain to mobile device for faster spinning

      • SSD**

  • Rotates in a single direction

  • Read-write arm (moves right left): Look for the track, then look for the semi-component within that track

    • Best case: If the read-write head under that track (by luck) 

    • Worst case: has to wait for one complete revolution

12
New cards

Performance Characteristics: Seek Time

  • Time to get to the track containing the sector

    • Higher seek time: Slower performance

    • Lower, better performance

    • Look for as SLOW as POSSIBLE

13
New cards

Performance Characteristics: Rotational Latency

  • Time to get to the desired sector

    • Higher latency: slower performance

14
New cards

Performance Characteristics: Disk Bandwith

  • Number of bytes transferred per unit time (aka. Transfer rate)

    • Higher values = better performance

15
New cards

Performance Characteristics + RPM

  • Seek Time + Rotational Latency + Disk bandwith along with RPM = better performance

    • Low seek time & rotational latency

    • High bandwidth, high RPM

TL;DR: Faster disk performance comes from low seek time (quick head movement) and low rotational latency (faster access to data). Higher bandwidth and higher RPM (Revolutions Per Minute) mean faster data transfers. Faster = better!

16
New cards

Hard Drive VS. Solid State Drive

HD

  • Cheaper per byte

  • Needs more power

  • Fragile

SSD

  • Fast transfer rates

  • Smaller form factor

  • No moving parts

  • Much more expensive per byte

  • Has a finite lifespan**

    • Can only tolerate a certain number of write operations

      • Takes a toll on SSDs

      • Read wala masyado bearing

      • A concern on your 7-8th year of using your device

      • Improved technology RN

        • No limit depending on the type of transistors for SSDs

          • Not sure how long it would last you

          • For gaming, shorter than expected

        • MAC OS a lot of write operations due to virtual memory

      • Heavily makes use of disk cache -> reaches limit in a few months

17
New cards

Form Factor & Interface

Form Factor

  • Physical Characteristics

Interface

  • How device communicates with the rest of the system

  • Common interfaces

    • sATA, NVMe, PCIe, USB

      • USB - Serial (Universal Serial Bus)

      • sATA - Serial

      • pATA - parallel

        • Wide cable, gray attached to hard drives

        • Obsolete now; not implemented for SSDs

18
New cards

Comparison of Device Interfaces

  • Speed x 8 difference sa case (Gb vs GB)

    • 100 Mbps (megabits)

    • 100 MBps (megabytes)

  • MAC OS kabit USB 3.1

    • For more storage

  • SSDs make use of transistor technology

    • Doesn’t use more power

<ul><li><p><span>Speed x 8 difference sa case (Gb vs GB)</span></p><ul><li><p><span>100 Mbps (megabits)</span></p></li><li><p><span>100 MBps (megabytes)</span></p></li></ul></li><li><p><span>MAC OS kabit USB 3.1</span></p><ul><li><p><span>For more storage</span></p></li></ul></li><li><p><span>SSDs make use of transistor technology</span></p><ul><li><p><span>Doesn’t use more power</span></p></li></ul></li></ul><p></p>