일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- Restroom
- Study
- 데이터 엔지니어
- Algorithms
- algorithm
- 빅데이터 커리어 가이드북
- Data Analyst
- Binary Tree
- 빅데이터 지식
- BST
- 빅데이터
- data scientist
- priority queue
- exam
- Preparing for the Google Cloud Professional Data Engineer Exam
- dataStructure
- hash
- Data Engineer
- binary search tree
- Newyork
- 데이터 분석가
- 화장실 지도
- 뉴욕 화장실
- Data Structure
- Heap
- data
- Linked List
- Computer Science
- HEAPS
- Computer Organization
- Today
- Total
Jaegool_'s log
Computer Organization: CH7. I/O Systems 본문
I/O System
Amdahl's Law
• 시스템 성능은 가장 많이 사용되는 구성 요소의 성능을 개선하는 것이 가장 효과적입니다.
• 이 아이디어는 Amdahl의 법칙으로 양적으로 표현됩니다:
여기서 S는 전체 속도 향상;
f는 더 빠른 구성 요소가 수행하는 일의 분수이며;
k는 더 빠른 구성 요소의 속도 향상입니다.
On a large system, suppose we can upgrade a CPU to make it 50% faster for $10,000 or upgrade its disk drives for $7,000 to make them 150% faster. • Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service. • An upgrade of which component would offer the greater benefit for the lesser cost?
We define input/output as a subsystem of components that moves coded data between external devices and a host system.
I/O subsystems include:
– Blocks of main memory (that are devoted to I/O functions.)
– Buses that move data (into and out of the system.)
– Control modules (in the host and in peripheral devices)
– Interfaces to external components (such as keyboards and disks.)
– Cabling or communications links (between the host system and its peripherals.)
I/O can be controlled in five general ways.
– Programmed I/O reserves a register for each I/O device. Each register is continually polled to detect data arrival.
– Interrupt-Driven I/O allows the CPU to do other things until I/O is requested.
– Memory-Mapped I/O shares memory address space between I/O devices and program memory.
– Direct Memory Access (DMA) offloads I/O processing to a special-purpose chip that takes care of the details.
– Channel I/O uses dedicated I/O processors.
the status of the interrupt signal is checked at the top of the fetch-decode-execute cycle.
• The particular code that is executed whenever an interrupt occurs is determined by a set of addresses called interrupt vectors that are stored in low memory.
• The system state is saved before the interrupt service routine is executed and is restored afterward.
• In memory-mapped I/O devices and main memory share the same address space.
– Each I/O device has its own reserved block of memory.
– Memory-mapped I/O therefore looks just like a memory access from the point of view of the CPU.
– Thus the same instructions to move data to and from both I/O and memory, greatly simplifying system design.
• In small systems the low-level details of the data transfers are offloaded to the I/O controllers built into the I/O devices.
– Notice that the DMA and the CPU share the bus.
– The DMA runs at a higher priority and steals memory cycles from the CPU.
DMA(Direct Memory Access)는 입출력(I/O) 장치가 직접 시스템 버스를 통해 메모리에 데이터를 전송하거나, 메모리에서 데이터를 가져오는 기술을 의미합니다. 이 기술은 일반적으로 CPU를 거치지 않고, 데이터 전송을 처리하기 때문에, 시스템 성능을 향상시키고, CPU의 부담을 줄일 수 있습니다. DMA는 대용량 데이터 전송을 필요로 하는 하드웨어 장치(예: 하드 디스크, 네트워크 어댑터 등)에서 많이 사용됩니다.
Very large systems employ channel I/O.
• Channel I/O consists of one or more I/O processors (IOPs) that control various channel paths.
• Slower devices such as terminals and printers are combined (multiplexed) into a single faster channel.
• On IBM mainframes, multiplexed channels are called multiplexor channels, the faster ones are called selector channels.
Channel I/O is distinguished from DMA by the intelligence of the IOPs.
• The IOP negotiates protocols, issues device commands, translates storage coding to memory coding, and can transfer entire files or groups of files independent of the host CPU.
• The host has only to create the program instructions for the I/O operation and tell the IOP where to find them.
Character I/O devices process one byte (or character) at a time.
– Examples include modems, keyboards, and mice.
– Keyboards are usually connected through an interrupt-driven I/O system.
• Block I/O devices handle bytes in groups.
– Most mass storage devices (disk and tape) are block I/O devices.
– Block I/O systems are most efficiently connected through DMA or channel I/O.
I/O buses, unlike memory buses, operate asynchronously(비동기적, 비동시성으로).
Requests for bus access must be arbitrated(중재됩니다) among the devices involved.
• Bus control lines activate the devices when they are needed, raise signals when errors have occurred, and reset devices when necessary.
• The number of data lines is the width of the bus.
• A bus clock coordinates activities and provides bit cell boundaries.
Bytes can be conveyed from one point to another by sending their encoding signals simultaneously using parallel data transmission or by sending them one bit at a time in serial data transmission.
– Parallel data transmission for a printer resembles the signal protocol of a memory bus:
In parallel data transmission, the interface requires one conductor for each bit.
• Parallel cables are fatter than serial cables.
• Compared with parallel data interfaces, serial communications interfaces:
– Require fewer conductors.
– Are less susceptible to attenuation(감쇠에 덜 민감).
– Can transmit data farther and faster.
• Serial communications interfaces are suitable for time-sensitive (isochronous, 실시간) data such as voice and video.
Disk Technology
Magnetic disks offer large amounts of durable storage that can be accessed quickly.
• Disk drives are called random (or direct) access storage devices because data blocks can be accessed according to their location on the disk.
– This term was coined when all other durable storage (e.g., tape) was sequential.
• Disk tracks are numbered from the outside edge, starting with zero.
Hard disk platters are mounted on spindles.
• Read/write heads are mounted on a comb that swings radially to read the disk.
The rotating disk forms a logical cylinder beneath the read/write heads.
• Data blocks are addressed by their cylinder, surface, and sector.
• Seek time is the time that it takes for a disk arm to move into position over the desired cylinder.
• Rotational delay is the time that it takes for the desired sector to move into position beneath the read/write head.
• Seek time + rotational delay = access time.
Transfer rate gives us the rate at which data can be read from the disk.
• Average latency is a function of the rotational speed:
• Low cost is the major advantage of hard disks.
• But their limitations include:
– Very slow compared to main memory
– Fragility
– Moving parts wear out
• Reductions in memory cost enable the widespread adoption of solid state drives (SSDs).
– Computers “see” SSDs as just another disk drive, but they store data in non-volatile flash memory circuits.
– Flash memory is also found in memory sticks and MP3 players.
Solid State Drives (SSD)
SSD access time and transfer rates are typically 100 times faster than magnetic disk, but slower than onboard RAM by a factor of 100,000.
– Their numbers vary widely among manufacturers and interface methods.
• Unlike RAM, flash is block-addressable (like disk drives).
– The duty cycle of flash is between 30,000 and 1,000,000 updates to a block.
– Updates are spread over the entire medium through wear leveling to prolong the life of the SSD.
SSD specifications share many common metrics(공통지표) with HDDs.
– Clearly, there is no need for any metrics that concern spinning platters, such as rotational delay.
• Enterprise(기업용) SSDs must maintain the highest degree of performance and reliability.
– Onboard cache memories are backed up by capacitors that briefly hold a charge during a power failure, giving time to commit pending writes.
전원 공급 장애가 발생하면 일시적으로 전하를 유지하는 캐패시터로 지원되는 기계 내 캐시 메모리는 대기 중인 쓰기를 완료할 시간을 제공합니다.
The Joint Electron Devices Engineering Council (JEDEC) sets standards for SSD performance and reliability metrics. The most important are:
• Unrecoverable Bit Error Ratio (UBER) and terabytes written (TBW).
TBW is a measure of disk endurance (or service life) and UBER is a measure of disk reliability.
– UBER is calculated by dividing the number of data errors by the number of bits read using a simulated lifetime workload.
– TBW is the number of terabytes that can be written to the disk before the disk fails to meet specifications for speed and error rates.
RAID
A Redundant Array of Independent Disks was invented to address problems of disk reliability, cost, and performance.
• In RAID, data is stored across many disks, with extra disks added to the array to provide error correction (redundancy).
• The inventors of RAID, David Patterson, Garth Gibson, and Randy Katz, provided a RAID taxonomy that has persisted for a quarter of a century, despite many efforts to redefine it.
RAID Level 0, also known as drive spanning, provides improved performance, but no redundancy.
– Data is written in blocks across the entire array.
– The disadvantage of RAID 0 is in its low reliability.
• RAID Level 1, also known as disk mirroring, provides 100% redundancy, and good performance.
– Two matched sets of disks contain the same data.
– The disadvantage of RAID 1 is cost.
A RAID Level 2 configuration consists of a set of data drives, and a set of Hamming code drives.
– Hamming code drives provide error correction for the data drives.
– RAID 2 performance is poor and the cost is relatively high.
RAID Level 3 stripes bits across a set of data drives and provides a separate disk for parity.
– Parity is the XOR of the data bits.
– RAID 3 is not suitable for commercial applications, but is good for personal systems.
RAID Level 4 is like adding parity disks to RAID 0.
– Data is written in blocks across the data disks, and a parity block is written to the redundant drive.
– RAID 4 would be feasible if all record blocks were the same size.
RAID Level 5 is RAID 4 with distributed parity.
– With distributed parity, some accesses can be serviced concurrently, giving good performance and high reliability.
– RAID 5 is used in many commercial systems.
RAID Level 6 carries two levels of error protection over striped data: Reed-Soloman and parity.
– It can tolerate the loss of two disks.
– RAID 6 is write-intensive, but highly fault-tolerant.
Double parity RAID (RAID DP) employs pairs of over- lapping parity blocks that provide linearly independent parity functions.
Like RAID 6, RAID DP can tolerate the loss of two disks.
• The use of simple parity functions provides RAID DP with better performance than RAID 6.
• Of course, because two parity functions are involved, RAID DP’s performance is somewhat degraded from that of RAID 5.
– RAID DP is also known as EVENODD, diagonal parity RAID, RAID 5DP, advanced data guarding RAID (RAID ADG) and—erroneously—RAID 6.
Large systems consisting of many drive arrays may employ various RAID levels, depending on the criticality of the data on the drives.
– A disk array that provides program workspace (say for file sorting) does not require high fault tolerance.
• Critical, high-throughput files can benefit from combining RAID 0 with RAID 1, called RAID 10.
• RAID 50 combines striping and distributed parity. For good fault tolerance and high capacity.
– Note: Higher RAID levels do not necessarily mean “better” RAID levels. It all depends upon the needs of the applications that use the disks.
Conclusion
I/O systems are critical to the overall performance of a computer system.
• Amdahl’s Law quantifies this assertion.
• I/O systems consist of memory blocks, cabling, control circuitry, interfaces, and media.
• I/O control methods include programmed I/O, interrupt-based I/O, DMA, and channel I/O.
• Buses require control lines, a clock, and data lines. Timing diagrams specify operational details.
Magnetic disk is the principal form of durable storage.
• Disk performance metrics include seek time, rotational delay, and reliability estimates.
• Enterprise SSDs save energy and provide improved data access for government and industry.
• Optical disks provide long-term storage for large amounts of data, although access is slow.
• Magnetic tape is also an archival medium sill widely used.
RAID gives disk systems improved performance and reliability. RAID 3 and RAID 5 are the most common.
• RAID 6 and RAID DP protect against dual disk failure, but RAID DP offers better performance.
• Any one of several new technologies including biological, holographic, CNT, memristor, or mechanical may someday replace magnetic disks.
• The hardest part of data storage may be in locating the data after it’s stored.
source: Nicemonkey/Shutterstock. Copyright, 2019 by Jones & Barlett Learning, LLC an Ascend Learning Company
'Courses' 카테고리의 다른 글
IT 495 - Client meeting [Pixel Bit Road: funding platform for games] (0) | 2023.09.25 |
---|---|
Algorithm and Data Structure Study notes, Sep [Dynamic memory arrangements] (0) | 2023.09.14 |
Computer Organization ; Data Representation recap (0) | 2023.02.23 |
Planning for a Successful Study in the USA (0) | 2023.02.08 |
Structured problem-solving using Java recap (IT168) (0) | 2023.01.14 |