wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

I/O Buffering

profile
Jash Katelia
Jul 05, 2024
0 Likes
0 Discussions
558 Reads

I/O buffering and its Various Techniques

A buffer is a memory area that stores data being transferred between two devices or between a device and an application.

Uses of I/O Buffering :

Buffering is done to deal effectively with a speed mismatch between the producer and consumer of the data stream.

A buffer is produced in main memory to heap up the bytes received from modem.

After receiving the data in the buffer, the data get transferred to disk from buffer in a single operation.

This process of data transfer is not instantaneous, therefore the modem needs another buffer in order to store additional incoming data.

When the first buffer got filled, then it is requested to transfer the data to disk.

The modem then starts filling the additional incoming data in the second buffer while the data in the first buffer getting transferred to disk.

When both the buffers completed their tasks, then the modem switches back to the first buffer while the data from the second buffer get transferred to the disk.

The use of two buffers disintegrates the producer and the consumer of the data, thus minimizes the time requirements

Types of various I/O buffering techniques :

1. Single buffer :

A buffer is provided by the operating system to the system portion of the main memory.

Block oriented device –System buffer takes the input.

After taking the input, the block gets transferred to the user space by the process and then the process requests for another block.

Two blocks works simultaneously, when one block of data is processed by the user process, the next block is being read in.

OS can swap the processes.

OS can record the data of system buffer to user processes.

Stream oriented device –

 

Line- at a time operation is used for scroll made terminals. User inputs one line at a time, with a carriage return signaling at the end of a line.

Byte-at a time operation is used on forms mode, terminals when each keystroke is significant

Double buffer :

Block oriented –There are two buffers in the system.

One buffer is used by the driver or controller to store data while waiting for it to be taken by higher level of the hierarchy.

Other buffer is used to store data from the lower level module.

Double buffering is also known as buffer swapping.

A major disadvantage of double buffering is that the complexity of the process get increased.

If the process performs rapid bursts of I/O, then using double buffering may be deficient.

Stream oriented –Line- at a time I/O, the user process need not be suspended for input or output, unless process runs ahead of the double buffer.

Byte- at a time operations, double buffer offers no advantage over a single buffer of twice the length.


Comments ()


Sign in

Read Next

OS Evolution Achievements

Blog banner

Memory management

Blog banner

Beauty of indian railway

Blog banner

Threat management

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

Understanding Gen Z: A Generation Facing Crisis and Potential

Blog banner

Theads

Blog banner

File management -disha parekh

Blog banner

Data Science in Everyday Life (like a phone, shopping cart, or social media icons)

Blog banner

Electronic Funds Transfer

Blog banner

Evolution of OS

Blog banner

Improving defences Proxy Device(defense in depth)

Blog banner

Tiranga - Abbas Haveliwala

Blog banner

Consumer to consumer business mode

Blog banner

How to feel Happy everyday day

Blog banner

Traditional UNIX Scheduling

Blog banner

MEMORY MANAGEMENT

Blog banner

PPC Advertising and its Impressive Benefits

Blog banner

Technical SEO : Total Guide

Blog banner

ONLINE NEWSROOMS

Blog banner

Starvation

Blog banner

Intrusion Detection System

Blog banner

Importance of Morning Routines for Students During the Festive Season

Blog banner

Computer security techniques

Blog banner

Why Data Security Is Important

Blog banner

ahh wait a min

Blog banner

MIDDLE CLASS MELODIES!!

Blog banner

Deadlock and Starvation

Blog banner

Understanding Mobile Device Forensics

Blog banner

Challenges and risks in service operations

Blog banner

Bitcoin sent using radio waves! No internet!

Blog banner

How to use GIT & GITHUB

Blog banner

Health and fitness

Blog banner

Top 5 Places To Stay And Visit In Berlin, Germany

Blog banner

Efficiency of SQL Injection Method in Preventing E-Mail Hacking

Blog banner

"Audit" In Data Science

Blog banner

Service Design Model

Blog banner

My First Dream Bike

Blog banner

Cloud Forensic Tools And Storage :A Review Paper

Blog banner

10 Reasons Why Guy BestFriends are the Must in Every Girl's Life

Blog banner

Hosting basics

Blog banner

How Does SSO Works

Blog banner