You are on page 1of 8

Operating Systems

Chapter 4
Device Management
4.1. Characteristics of Serial and Parallel Devices:
In serial transmission, data is sent bit by bit from one computer to another in bi-direction.
Each bit has its clock plus rate. Eight bits are transferred at a time having a start and stop bit i.e.,
0 and 1 respectively. For transmitting data to a longer distance, data cables are used.
In parallel transmission, various bits are sent together simultaneously with a single clock
plus. It is a fast way to transmit as it uses many input/output liens for transferring the data.

Serial transmission requires a single line to communicate and transfer data whereas, the
parallel transmission requires multiple lines.
Serial transmission used for long distance communication whereas, the parallel
transmission used for shorter distance communication.
Error and noise are least in serial as compared to parallel transmission. Since one bit
follows another in serial transmission whereas, in parallel transmission multiple bits are sent
together.

Prepared by Ande, Lecturer, Dept of Computer Science, Gambella University, Gambella. Page 1
Operating Systems
Parallel transmission is faster as the data is transmitted using multiple lines whereas, in
serial transmission data flows through a single wire.
Serial transmission is full duplex as the sender can send as well as receive the data
whereas, parallel transmission is half duplex since the data is either sent or receive.
Serial transmission cables are thinner, longer and economical in comparison with the
parallel transmission cables.
Serial transmission is reliable and straight forward whereas, parallel transmission is
unreliable and complicated.
Both serial and parallel transmissions have their advantages and disadvantages
respectively. In this context, serial transmission can be used to transfer data between keyboards,
mouse to CPU whereas; parallel transmission can be used between inside the components of
CPU.
4.2. Abstracting Device Differences:
In software engineering and computer science, abstraction is a technique for hiding
complexity of computer systems. Its works by establishing a level of simplicity on which a
person interacts with the system, suppressing the more complex details below the current level.
The programmer works with an idealized interface (usually well defined) and can add additional
levels of functionality that would otherwise be too complex to handle.
For example, a programmer writing code that involves numerical operations may not be
interested in the way numbers are represented in the underlying hardware (eg. Whether they’re
16-bit or 32-bit integers) and where those details have been suppressed it can be said that they
were abstracted away leaving simply numbers with which the programmer can work.
Abstraction can apply to control or to data. Control abstraction is the abstraction of
actions while data abstraction is that of data structures. Data abstraction allows handling pieces
of data in meaningful ways. For example, it is the basic motivation behind the datatypes.
Abstracting devices, Operating System generally splits devices into four classes:
1. Block Devices (eg. Disk drives, CD):
 Commands include read, write and seek
 Raw input/output of file system access
 Memory mapped file access possible
2. Character Devices (eg. Keyboard, mouse and serial ports):

Prepared by Ande, Lecturer, Dept of Computer Science, Gambella University, Gambella. Page 2
Operating Systems
 Commands includes get and put
 Libraries layered on top to allow line editing
3. Network Devices (eg. Modems):
 Varying enough from block and character to have own interface
 Unix and Windows/NT use socket interface
4. Miscellaneous (eg. Clocks and timers)
 Provide current time, elapsed time and timer
 Ioctr (on UNIX) covers odd aspects of I/O such as clocks and timers
4.3. Buffering Strategies:
A buffer is a region of memory used to temporarily hold data while it is being moved
from one place to another. That would be the simplest yet sensible definition for a buffer
irrespective of where it may appear. Computer offen have different devices in it that work at
different speeds.
Operating System (its own copy of) stores data in memory while transferring to or from
devices is known as buffering.
The following are the uses of buffering:
 To cope with device speed mismatch
 To cope with device transfer size mismatch
 To maintain “copy semantics”
Operating System can use various kinds of buffering strategies:
1. Single Buffering
2. Double Buffering
3. Circle Buffering
1. Single Buffering:
Operating System assigns a system buffer to the user request. When a user process issues
an I/O request, the OS assign a buffer in the system portion of main memory to the operation.
This approach will generally provide a speed up compared to the lack of system buffering. The
OS must keep track of the assignment of system buffers to user processes.

Prepared by Ande, Lecturer, Dept of Computer Science, Gambella University, Gambella. Page 3
Operating Systems

2. Double Buffering:
Double buffering, process consumes from one buffer while system fills the next. An
improvement over single buffering is by assigning two system buffers to the operations. A
process transfer data to one buffer while OS empties the other as shown in below figure.

3. Circle Buffering:
Circle buffering must useful for busty I/O. double buffering may be inadequate, if the
process performs rapid burst of I/O when two or more buffers are used. The collection of buffers
is called as a circular buffer, with each buffer being one unit in the circle buffer.

Prepared by Ande, Lecturer, Dept of Computer Science, Gambella University, Gambella. Page 4
Operating Systems

4.4. Direct Memory Access:


Direct memory access is a feature of computer systems that allows certain hardware
subsystem to access main system memory (Random Access Memory), independent of the
Central Processing Unit. Without DMA, when the CPU is using programmed I/O, it is typically
fully occupied for the entire duration of the read or write operation and is thus unavailable to
perform other work. With DMA, the CPU first initiates the transfer, then it does other operations
while the transfer is in progress and it finally receives an interrupt from the DMA controller
when the operation is done.
This feature is useful at any time that the CPU cannot keep up with the rate of data
transfer, or when the CPU needs to perform work while waiting for a relatively slow I/O data
transfer. Many hardware system use DMA, including disk drive controllers, graphic cards,
network cards and sound cards. DMA is also used for intra-chip data transfer in multi core
processor.
Computers that have DMA channels can transfer data to and from devices with much less
CPU overhead than computer without DMA channels. Similarly, a processing element inside a
multi-core processor can transfer data to and from its local memory without occupying its
processor time, allowing computation and data transfer to proceeded in parallel.
DMA can also be used for “memory to memory” copying or moving of data within
memory. DMA can offload expensive memory operations, such as large copies or scatter-gather
operations, from the CPU to a dedicated DMA engine.
DMA controller connects a high-speed network to the computer bus. Disk controller,
which two disks also has DMA capability. It provides two DMA channels. It can perform two
independent DMA operations, as if each disk has its own DMA controller. The registers to store
the memory address, word count and status and control information are duplicated.

Prepared by Ande, Lecturer, Dept of Computer Science, Gambella University, Gambella. Page 5
Operating Systems
DMA controller can transfer a block of data from an external device to the
processor, without any intervention from the processor. DMA devices are given higher priority
than the processor to access the bus.

4.5. Recovery from Failures:


Despite the constantly improving reliability of OS, users still sometimes experience
operating system failures. An OS may fail due to the corruption of the OS logical structures
(caused either by computer viruses or human errors) or due to the damage of a storage on which

Prepared by Ande, Lecturer, Dept of Computer Science, Gambella University, Gambella. Page 6
Operating Systems
the OS is installed (caused by hardware failures, system breakdowns, instantaneous power failure
resulting in file system structures corruption).
The corrupted OS is unable to boot. A failure OS will attempt to start and may progress
to a certain point, freeze and not boot any further. It may attempt to boot and then stop with a
blue screen or error message as well.
But if the computer goes to a black screen very quickly with the “Invalid System Disk” or
“Please Insert Bootable Media” message, particularly if the machine doesn’t report the presence
of the hard disk drive, then it’s a failed disk not a failed OS. In this case, its strongly
recommended to take the disk to data recovery specification for the examination.
If you are facing the problem of data access due to the OS failure, there can be two
solutions to it.
Using different computer
Using emergency recover CD
SysDev laboratories offers the UFS explorer software’s as an efficient solution for such situation.
PC or Workstation Recovery
Recover from system partition: Normally, a new hard drive is divided into several
logical partitions to treat one disk as if it were multiple disk for the sake of convenience and
better performance of the hard drive. Isolated partitions increase data safety as well if one
partition is corrupted data on the other partitions remain intact. Traditionally OS and program
files are separated from user files and are usually stored on an independent partition referred to
as system partition Disk-C: for Windows OS, for example.
Portable Storage Media Recovery: with the ability to store quite a large amount of
digital information, high performance speed, great efficiency, excellent space saving features and
installation simplicity portable storage media such as USB flash drives, external hard drives,
MP3 players and memory cards have gained considerable popularity.
Flash Memory Media Recovery: Despite a great variety of memory cards, they have
something in common the files stored on them will not be deleted immediately. During deletion,
the space taken by a file is not emptied but marked as available for further records. Therefore,
photos and video files remain intact on the memory card until overwritten by other files.
Complex Storage System Recovery: System with redundancy and System without
redundancy. Complex data storage or RAID (Redundant Array of Independent Disks) are widely

Prepared by Ande, Lecturer, Dept of Computer Science, Gambella University, Gambella. Page 7
Operating Systems
applied nowadays by both corporate and home users. RAID system expand storage reliability
through redundancy the process of duplication of critical components of the system.
Recovery from NAS: Network Attached Storages (NAS) emerged in an environment
with a large amount of information as a powerful solution for shared access to a storage. These
systems found their principal implementation among corporate users where general centralized
storage provided to several workstations was required. NAS system functions as file servers
dedicated storage and data access.
Recovery on Virtual Machines: VM emerged with the idea to exploit hardware
resources more economically under the necessity to make the most of advantages and
capabilities of various operating systems. A VM called a “Guest” system in an ordinary machine,
as far as interface is concerned, but it works with technical resources of a “Host” system it is
installed or when recovery data from a virtual machine. You deal with a file or its copy not with
a physical storage. To open the file and recover files lost from it, you will need a special
recovery software which supports the file format and it efficient enough to manage recovery
from a virtual layer of a host system. You will certainly find an advantageous solution for
recovery of your files among UFS explorer software.
Recovery from Encrypted Storages: The need for information security in a world that
almost fully rests on digital technologies is undoubted. Protection of sensitive data has become a
matter of a great concern in different life spheres: clients and partner information, intellectual
property items, business plans or accountancy and simply any personal data, like health
information. Data storage system encryption is presently available for all prone to keep their data
safe and secure. Volume encryption works in a way that even if the storage falls into wrongly
hands any unauthorized access to storage data will be denied. This can be performed by
encryption software or hardware and is today available for different storage media from
removable flash drives to NAS storages.

Prepared by Ande, Lecturer, Dept of Computer Science, Gambella University, Gambella. Page 8

You might also like