100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Input - Output Processor in operating system $5.29   Add to cart

Class notes

Input - Output Processor in operating system

 2 views  0 purchase
  • Course
  • Institution

In these notes, Covered all the topics of operating systems briefly. COs - Analyze the structure of OS and basic architectural components involved in OS design. Compare and contrast various CPU scheduling algorithms. Evaluate the requirements for the process synchronization and co-ordinatio...

[Show more]

Preview 3 out of 17  pages

  • December 30, 2022
  • 17
  • 2021/2022
  • Class notes
  • Ymk sir
  • All classes
avatar-seller
6 – Input - Output

Write a short note on Device Controller. OR
(1) Explain Device Controller in brief.

• I/O unit consist of a mechanical component and an electronic component. Electronic
component of I/O devices is called the Device Controller.
• The mechanical component is device itself.
• The controller card usually has a connector on it, into which a cable leading to the
device itself can be plugged.
• Some devices have their own built in controller. Many controllers have two, four or
even eight identical devices.
• If the interface between the controller and device is a standard interfacing (ISO, ANSI
or IEEE), then companies can make device or controller that fit that interface.
• The controllers are used to convert the serial bit stream into a block of bytes and
perform any error correction if necessary.
• The block of bytes is typically first assembled bit by bit in buffer inside controller.
• After verification, the block has been declared to be error free, and then it can be
copied to main memory.


(2) Explain Memory-Mapped I/O
• Each device controller has a few registers that are used for communicating with the
CPU.
• By writing into these registers, the OS can command the device to deliver data, accept
data, switch itself on or off, or perform some action.
• By reading from these registers OS can learn what the device’s status is, whether it is
prepared to accept a new command and so on.
• There are two ways to communicate with control registers and the device buffers
▪ I/O Port.
▪ Memory mapped I/O.
I/O Port
• Each control register is assigned an I/O port number, an 8 or 16 bit integer.
• The set of all the I/O ports form the I/O port space and is protected so that ordinary
user program cannot access it.




1

, 6 – Input - Output

Memory-Mapped I/O
• Memory mapped I/O is an approach to map all the control registers into memory
space.
• Each control register is assigned a unique memory address to which no memory is
assigned, this system is called memory mapped I/O.
• Generally assigned addresses are at the top of the address space.
• When CPU wants to read a word, either from memory or an I/O port, it puts the
address it needs on the bus’ address lines and then issues a READ signal on bus’ control
line.
• A second signal line is used to tell whether I/O space or memory space is needed.
• If it is memory space, the memory responds to the request. If it is I/O space, the I/O
device responds to the request.




Figure 6-1. (a) Separate I/O and memory space. (b) Memory-mapped I/O. (c) Hybrid.
• Advantages:
▪ With memory mapped I/O, device control registers are just variables in
memory. So with memory mapped I/O device drivers can easily be written in ‘C’
like languages, no assembly code is required to access registers.
▪ No special protection mechanism is needed to keep user processes from
performing I/O.
▪ With memory-mapped I/O, every instruction that can reference memory can
also reference control registers.
• Disadvantages:
▪ Most computers nowadays have some form of cashing of memory words.
Cashing a device control registers would create problems, cashing needs to be

2

, 6 – Input - Output
disabled in paging system.
▪ If there is only one address space, then all memory modules and all I/O devices
must examine all memory reference to see which ones to respond to.


(3) Explain the Direct Memory Access.
• CPU needs to address the device controllers to exchange data with them.
• CPU can request data from an I/O controller one byte at a time, which is wastage of
time.
• So a different scheme called DMA (Direct Memory Access) is used. The operating
system can only use DMA if the hardware has DMA controller.
• A DMA controller is available for regulating transfers to multiple devices.
• The DMA controller has separate access to the system bus independent to CPU as
shown in figure 6-2. It contains several registers that can be written and read by CPU.
• These registers includes memory address register, a byte count register, one or more
control registers.




Figure 6-2. Operation of a DMA transfer


Disk read-write without a DMA
• The disk controller reads the block from the drive serially, bit by bit, until the entire
block is in the controller’s buffer.
• Next, it computes the checksum to verify that no read errors have occurred.

3

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 vaibhav51ppsv2020. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $5.29. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73091 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$5.29
  • (0)
  Add to cart