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

MEMORY MANAGEMENT (techniques)

Blog banner

Animal’s have my heart

Blog banner

Music

Blog banner

Marvel Cinematic Universe

Blog banner

**THE MUJAWARR: Transforming the Logistics Industry**

Blog banner

Types of Threads

Blog banner

Article on Team Work

Blog banner

Sweet and Sour Mango Pickle (Gol Keri)

Blog banner

Race Condition in Operating Theatre

Blog banner

The Sunny Side of Instagram

Blog banner

Measuring IT Risk

Blog banner

FAMILY WHERE LIFE BEGINS....

Blog banner

Privacy LAWs in IT

Blog banner

Deadlock in operating system

Blog banner

DATA VAULT

Blog banner

Types of E-Commerce

Blog banner

The Essential Guide to Dynamic Arrays vs. Linked Lists: Which to Use and When ?

Blog banner

Why Inconel 625 and Monel 400 Remain Unbeatable in Refinery Applications?

Blog banner

The Evolution of Operating Systems

Blog banner

How to Prepare Your Child for Their First Day of School?

Blog banner

Creating Digitally Signed Document

Blog banner

10 Unknown facts about India's Independence

Blog banner

E-learning in today's world

Blog banner

Memory

Blog banner

Mumbai

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Cache memory

Blog banner

Is Social Media Marketing The Next Wave Of Digital Marketing?

Blog banner

What do you mean by online marketing and why do you need to know about it

Blog banner

A Happier Workplace Starts with Healthy Lunches by Meal Maharaj

Blog banner

Blog name

Blog banner

Career v/s Job : Choose your passion

Blog banner

Carrot Pickle With Raisins (lagan Nu Achar)

Blog banner

10 Problems you face if you are an Otaku

Blog banner

Buffering

Blog banner

Why Soft Skills Matter as Much as Grades?

Blog banner

Human factor, a critical weak point in the information security of an organization’s IOT

Blog banner

The Role of cryptography in cyber security

Blog banner

Importance of Network Security Risk

Blog banner

Understanding E-mail Servers

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Embaded operating system

Blog banner