Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Input - Output Processor in operating system

Rating
-
Sold
-
Pages
17
Uploaded on
30-12-2022
Written in
2021/2022

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-ordination in the contemporary operating system. Analyze various algorithms for memory management, I/O management and security aspects of operating system. Write shell scripts in Unix/Linux O.S and write simple programs using kernel system calls. Also understand virtualization concept

Show more Read less
Institution
Course

Content preview

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

Written for

Institution
Course

Document information

Uploaded on
December 30, 2022
Number of pages
17
Written in
2021/2022
Type
Class notes
Professor(s)
Ymk sir
Contains
All classes

Subjects

$5.79
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
vaibhav51ppsv2020

Also available in package deal

Get to know the seller

Seller avatar
vaibhav51ppsv2020 C.K.Pithawala school of engineering and techonology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
14
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions