Summary Computer architecture and networks hoorcollege 7
43 views 0 purchase
Course
Computer architecture and networks
Institution
Universiteit Utrecht (UU)
Computer architecture and networks lecture 7. Notes of the lecture Computer Architecture and Networking (INFONW). Summary is in English and is supported with images and examples for added clarity. Lesson taught at Utrecht University, Informatics.
computer architecture and networks hoorcollege 7 computer architecture and networks computerarchitectuur en netwerken infonw
Written for
Universiteit Utrecht (UU)
Informatica
Computer architecture and networks
All documents for this subject (18)
Seller
Follow
luukvaa
Reviews received
Content preview
Hoorcollege 7:
Input / Output requires the communication between software and resources. If you have a piece of
software it requires some interaction with the surroundings and it needs to do this by acquiring
resources. Resources are then allocated, and they return a communication channel (e.g. where is the
mouse pointer on the desktop or acquiring a communication channel over the network). There are a
few communication modes, you can have a resource channel that:
- Read, write, read + write
- Uni(you sent information in one direction where is a receiver), bi(question-answer, question-
answer), multi(Targeted to multiple communication partners), omni-directional(Broadcast
that is sending information to everyone who wants to listen to it)
Resources are not only files it can for example be: memory data segments, USB/Cable connection
and network channels.
Doing I/O has a performance cost. The performance cost can be split into:
- Control cost: synchronisation between two partners in the input/output, CPU is waiting for
the bus to not be busy anymore(bus-busy) & waits, bus checks
- Data cost: Cache & memory misses, sending the information and how long the actual
transmission time is.
Direct read/write: read/write each byte as it is available, you read or write every single byte for
example if you have a file and you want to read it, you can do this with every single byte piece by
piece. This is very responsive if you want to read it, but you have a high control cost.
Buffering: gather several multi-bytes in buffer area so you can transmit a whole buffer content in 1
go, lesser control cost because you sent them in bulk. Generally buffering is good, as transmission
delays are offset by bus use increase. This is an exception for CPU <-> RAM <-> GPU. We don’t buffer
with these components because they are very speedy.
There is difference between how you aces input/output channels you can do this in a:
- Blocking way I/O: Synchronous data transfer:
o Resources accessed with read() or write() the second request will
be blocked
o Resources is released when operation finished
o During that time: CPU cannot do anything else; other accessing
processed are in blocked state
o Inefficient usage of CPU computing time
- Non-blocking I/): asynchronous data transfer:
o Process want to access resource:
▪ 1. Check if resource is free/available -> check()/wait()
▪ 2. If resource is available: access & block resource
▪ 3. If resource not available: the process can do something else check again
later or register a call-back
o Once released, the resource can be allocated by other processes again.
o Non-blocking I/O: implemented by Driver or by application itself
o Advantage: better CPU usage because there are no blocked processes,
Disadvantage: CPU & Bus overhead from check()(control checks) calls.
, (non-)blocking I/O; access check occur frequently & take lots of time, we can achieve efficient checks
by:
- Polling: periodically request access status -> lots of overhead(left figure). When you have a
function, you want to acquire data from resource, it doesn’t work like that, you return and
pull all the time.
- Interrupts & call-backs: ask for access; register a function that is executed when resource is
available(right figure). If you want to read from a certain device, than you initiate the driver
and you tell the driver to register a certain call back function (in table after arrow 4) and you
return the control back to your normal execution pipeline. When the data is available than
the interrupt handler will call the device that the data is available and this function which
was registered in the table is executed and tells the process that there is new data available.
This relieves (verlicht) the processor from all the polling checks if an Input/output channel is
available.
Address space to a certain I/O device into the main memory or the virtual address space. This can we
do with direct memory mapping. We map the memory space of our input/output device into the
main memory so now we can do direct communication to the address space with our I/O. Result:
lots of unnecessary memory-copy operations. We can avoid unnecessary buffer copies by:
- Memory mapping:
o Requires tightly-coupled I/O partners (i.e. internal data).
They need to be connected somehow and also required
update cycles. If we have a process that wants to write into
the I/O than all the changes that are done in main memory
need to be communicated back to the Input/Output device.
The advantage is that the OS can control when this I/O
happens based on for example that the bus is not busy.
o Maps the memory of one partner directly in the memory
space of the other -> shared memory
o Accessing one another’s memory is equal to accessing own
memory
- Added performance costs: Update cycles.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller luukvaa. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $3.20. You're not tied to anything after your purchase.