Week 13 - I/0 Architectures Flashcards
What’s the formula for Amdahl’s Law?
S = 1/ ((1-f) + f/k)
S is the speedup
f is the fraction of work performed by the faster component
k is the speedup of a new component
Let’s say that most of your daytime processes spend 70% of their time running in the CPU and 30% waiting for service from the disk. Suppose also that someone is trying to sell you a processor array upgrade that is 50% faster than what you have and costs $10,000. The day before, someone had called you on the phone offering you a set of disk drives for $7,000. These new disks promise two and a half times the throughput of your existing disks. You know that the system performance is starting to degrade, so you need to do something. Which would you choose to yield the best performance improvement for the least amount of money?
S1 = 1/ ( (1-f) + f/k )
f = 70% = 0.7
k = 1.5
S1 = 1 / ( (1-0.7) + 0.7/1.5)
S1 = 1.3
Price1 = $10 000
**
S2 = 2.5
Price2 = $7000
**
I think we have an obvious winner here.
Suppose the daytime processing load consists of 60% CPU activity and 40% disk activity. Your customers are complaining that the system is slow. After doing some research, you learn that you can upgrade your disks for $8,000 to make them 2.5 times as fast as they are currently. You have also learned that you can upgrade your CPU to make it 1.4 times as fast for $5,000.
a) Which would you choose to yield the best performance improvement for the least
amount of money?
b) Which option would you choose if you don’t care about the money, but want a faster system?
c) What is the break-even point for the upgrades? That is, what price would be charged for both upgrades to make their cost and performance improvement equal?
Given: 60% CPU, 40% Disk
a) Disk upgrade:
Cost / Improvement = 8000/2.5 = 3200
CPU upgrade:
Cost / Speed Improvement = 5000/1.4 = 3571
Disk has lower cost per unit of improvement.
b) **Disk upgrade **
Overall speedup = 1/ ((1-0.4) + 0.4/2.5) = 1.3
CPU upgrade
Overall speedup = 1/((1-0.6) +0.6/1.4) = 1.2
Disk is again better.
c) i am at my breaking point
What even is I/O?
a subsystem of components that moves coded data between external devices ( keyboard, mouse, printer) and a host system ( CPU and main memory).
What are the I/O control methods?
Programmed, Interrupt-driven, Direct Memory Access, Channel-attached.
State Amdahl’s Law in words.
Amdahl’s Law tells us that improving one part of a task in a system only speeds up the overall process by the fraction of time that part takes. It means there are limits to how much we can speed up a task by focusing on just one aspect. To make a system faster, we need to consider all components, not just the fastest one.
What is a speedup?
Speedup is the measure of how much faster a task or process becomes after improvements or optimizations are applied.
What is a protocol and why is it important in I/O bus technology?
A protocol is a set of rules defining how data is exchanged between devices. In I/O bus tech, it’s important because it makes sure devices can understand each other, helping them work together smoothly.
Explain how programmed I/O is different from the interrupt-driven I/O.
Programmed I/O involves the CPU directly managing data transfer between memory and devices, while interrupt-driven I/O relies on devices signaling the CPU when they need attention. In programmed I/O, the CPU actively controls the data transfer, whereas in interrupt-driven I/O, the CPU responds to device-initiated interruptions, allowing for more efficient use of CPU time.
What is polling?
Polling is like repeatedly asking a device if it’s ready to do something. It’s a way for a computer to keep checking if a task is done or if a device needs attention.
more complicated answer in footnote
Polling is a method where a computer system repeatedly checks or “polls” the status of a device or process to determine if it needs attention or if a specific condition has been met. It involves regularly querying the device to see if it is ready for data transfer or if an event has occurred, often in a loop, until the desired condition is met. Polling is commonly used in programmed I/O to check the status of devices.
How are address vectors used in interruptdriven I/O?
Address vectors in interrupt-driven I/O act like signposts, guiding the CPU to the right place in memory when an interrupt happens. They help the system quickly know what to do when a device needs attention.
footnote for complicated answer
In interrupt-driven I/O, address vectors are used to point to specific routines or addresses in memory that the CPU should jump to when a particular interrupt occurs. These vectors help the CPU quickly find and execute the appropriate code to handle the interrupt, allowing for efficient and organized management of I/O operations.
How does DMA work?
DMA, or Direct Memory Access, allows devices to transfer data to and from memory without involving the CPU. It’s like having a helper (DMA controller) that takes care of moving data between devices and memory, freeing up the CPU to do other tasks.
What is a bus master?
A bus master is like the traffic cop of a computer’s communication highway (bus). It’s in charge, directing data flow between devices and making sure everything runs smoothly.
footnote has original terms
A bus master is a device on the computer’s communication bus that has the authority to initiate data transfers between devices without needing the CPU’s constant involvement. It takes on a managerial role, coordinating data movement efficiently.
Why does DMA require cycle stealing?
DMA requires cycle stealing because it temporarily borrows a few CPU cycles to transfer a small amount of data, allowing other devices to use the bus during that time.
What does it mean when someone refers to I/O as bursty?
When someone describes I/O as “bursty,” it means that data transfers between the input/output devices and memory occur in occasional bursts or short bursts of high activity, followed by periods of lower or no activity. It suggests an irregular pattern of data flow rather than a continuous and steady stream.