SlideShare a Scribd company logo
1 of 15
NURUL NAIM BINTI ABDULLAH SANI B031210190
MOHD SHAZWAN BIN KAMARUDIN DARUS B031210196
FIRDHAUSADNIN BIN RAHMAT B031210378
CHONG CAI NING B031210080
Input Output Buffering
 There is a speed mismatch between I/O
devices and CPU.
 This leads to inefficiency in processes being
completed.
 To increase the efficiency, it may be
convenient to perform input transfers in
advance of requests being made and to
perform output transfers some time after the
request is made.
 This technique is known as buffering
Input Output Buffering
 In discussing the various approaches to
buffering, it is sometimes important to make
a distinction between two types of I/O
devices:
 Block-oriented devices store information in blocks
that are usually of fixed size and transfers are
made one block at a time for example disk,tape
 Stream-oriented devices transfer data in and out
as a stream of bytes, with no block structure for
example terminals, printers, communications
port, mouse.
What is single buffer ??
 Operating system assigns a buffer in main
memory for an I/O request
 Example when a user process issues an I/O
request, the operating system assigns a buffer in
the system portion of main memory to the
 operation
Single buffer process
 The simplest type of buffering is single buffering.
 When a user process issues and I/O request, the
operating system assigns a buffer in the system
portion of main memory to the operation.
 For block-oriented devices, the single buffering
scheme can be described as follows: Input
transfers are made to the system buffer.
 When the transfer is complete, the process moves
the block into user space and immediately
requests another block.
 For stream oriented I/O, the single buffering
scheme can be used in a line- at- a time Fashion
or a byte-at-a-time fashion.
 In line-at-a-time fashion user input and output
to the terminal is one line at a time. For eg.
Scroll-mode terminals, line printer.
 Suppose thatT is required to input one block and
that C is the computation time.
 single buffer : you read and write on the same
buffer, can be messy if both reading and writing
take place at the same time.
Single buffer process
What is double buffer ?
 Two buffers are used for the I/O operation .It’s
also the process uses the content of one buffer
while the I/O device uses the other.
 Double-buffering possibly sounds harder than it
actually is.
ADVANTAGES
 The user does not see every pixel modification
(so if the same pixel gets modified 5 times, the
user will only see the last one).This helps
preventing 'flickering' (or screen flashes).
 Double-buffering usually takes care of artifacts
you or the user might be experiencing.
 Writing to video memory is only performed
once, on the buffer swap, instead of repeatedly
for every pixel of which some might be
overlapped later and might be invisible.
DISADVANTAGES
 Even though double-buffering
is useful, it also has negative
characteristics. Each is listed
with an explanation and a
possible solution.
CIRCULAR BUFFER
Circular Buffering
 When more than 2 buffers are used
-- each individual buffer is one unit in the circular
buffer…
 Is used when…
--double buffering may be not enough if process
perform rapid bursts of I/O…
 Therefore, this type of buffering is needed for
keeping up with the process
Circular buffer of a process
used for data transfer between 2 processes.
Producer process: place item into circular buffer
Consumer process: remove the item
Variable capacity of circular buffer accommodate
time ≠ producer and consumer process…
--can execute faster than the other queue that hold a
variable amount of data since…
A fixed size block of memory is allocated just once
from memory management and then reused.
-- often is used to decouple 2 processes that
operate at different speeds…
-> fast producer process:
--- can “burst” data into buffer and then
continue with its processing
-> slower consumer process:
--- can read the data with its own rate without
synchronizing and slowing the producer.
Circular buffer of a process
-the average rate, over time, of both
producer and consumer process must be
same to avoid over or underflow of
condition of the circular buffering
(“Synchronize Mode “ of operation)
Circular buffer of a process
--- 2 methods can avoid data loss
in synchronize mode
--- 2 methods can avoid data loss in synchronize mode:
a) Calling blocking method:
 calling thread to block until the Circular buffer has
the requested number of items.
b) WaterMark method:
 fire an event when the number of items in the
circular buffer reaches a preset level…
~~ eliminating wasting processing time due to
process block.

More Related Content

What's hot

Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreadingFraboni Ec
 
Presentation on primary storage devices
Presentation on primary storage devicesPresentation on primary storage devices
Presentation on primary storage devicessushank pandey
 
Memory(RAM ROM FLASH MEMORY)
Memory(RAM ROM FLASH MEMORY)Memory(RAM ROM FLASH MEMORY)
Memory(RAM ROM FLASH MEMORY)smkhan
 
Computer memory presentation
Computer memory presentationComputer memory presentation
Computer memory presentationaaravSingh41
 
RAM (Random Access Memory)
RAM (Random Access Memory)RAM (Random Access Memory)
RAM (Random Access Memory)Md Waresul Islam
 
Memory hierarchy of digital computer system
Memory hierarchy of digital computer systemMemory hierarchy of digital computer system
Memory hierarchy of digital computer systemLuckyverma27
 
Basic Computer Architeccture
Basic Computer ArchitecctureBasic Computer Architeccture
Basic Computer ArchitecctureShreerajKhatiwada
 
presentation on memory units.
presentation on memory units.presentation on memory units.
presentation on memory units.Krishna Bharati
 
RAM and ROM Memory Overview
RAM and ROM Memory OverviewRAM and ROM Memory Overview
RAM and ROM Memory OverviewPankaj Khodifad
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessorKishan Panara
 
Random Access Memory(RAM)
Random Access Memory(RAM)Random Access Memory(RAM)
Random Access Memory(RAM)Adeel Yousaf
 

What's hot (20)

Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
 
Ram & rom
Ram & romRam & rom
Ram & rom
 
Presentation on primary storage devices
Presentation on primary storage devicesPresentation on primary storage devices
Presentation on primary storage devices
 
COMPUTER MEMORY
COMPUTER MEMORYCOMPUTER MEMORY
COMPUTER MEMORY
 
Memory(RAM ROM FLASH MEMORY)
Memory(RAM ROM FLASH MEMORY)Memory(RAM ROM FLASH MEMORY)
Memory(RAM ROM FLASH MEMORY)
 
memory hierarchy
memory hierarchymemory hierarchy
memory hierarchy
 
EPROM, PROM & ROM
EPROM, PROM & ROMEPROM, PROM & ROM
EPROM, PROM & ROM
 
Computer memory presentation
Computer memory presentationComputer memory presentation
Computer memory presentation
 
05 Internal Memory
05  Internal  Memory05  Internal  Memory
05 Internal Memory
 
RAM (Random Access Memory)
RAM (Random Access Memory)RAM (Random Access Memory)
RAM (Random Access Memory)
 
Memory hierarchy of digital computer system
Memory hierarchy of digital computer systemMemory hierarchy of digital computer system
Memory hierarchy of digital computer system
 
Basic Computer Architeccture
Basic Computer ArchitecctureBasic Computer Architeccture
Basic Computer Architeccture
 
presentation on memory units.
presentation on memory units.presentation on memory units.
presentation on memory units.
 
RAM And ROM
RAM And ROMRAM And ROM
RAM And ROM
 
Cache memory
Cache memoryCache memory
Cache memory
 
RAM and ROM Memory Overview
RAM and ROM Memory OverviewRAM and ROM Memory Overview
RAM and ROM Memory Overview
 
Computer memory
Computer memoryComputer memory
Computer memory
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessor
 
Ram and its types
Ram and its typesRam and its types
Ram and its types
 
Random Access Memory(RAM)
Random Access Memory(RAM)Random Access Memory(RAM)
Random Access Memory(RAM)
 

Viewers also liked

Viewers also liked (9)

Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
Input-Buffering
Input-BufferingInput-Buffering
Input-Buffering
 
Compiler Design Full Curse
Compiler Design Full CurseCompiler Design Full Curse
Compiler Design Full Curse
 
4 lexical and syntax analysis
4 lexical and syntax analysis4 lexical and syntax analysis
4 lexical and syntax analysis
 
Buffers
BuffersBuffers
Buffers
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 

Similar to Slide combine

Ch 7 io_management & disk scheduling
Ch 7 io_management & disk schedulingCh 7 io_management & disk scheduling
Ch 7 io_management & disk schedulingmadhuributani
 
What is the difference between double buffering and a circular buffer-.docx
What is the difference between double buffering and a circular buffer-.docxWhat is the difference between double buffering and a circular buffer-.docx
What is the difference between double buffering and a circular buffer-.docxdorisc7
 
I/o management and disk scheduling .pptx
I/o management and disk scheduling .pptxI/o management and disk scheduling .pptx
I/o management and disk scheduling .pptxwebip34973
 
discuss the drawbacks of programmed and interrupt driven io and des.pdf
discuss the drawbacks of programmed and interrupt driven io and des.pdfdiscuss the drawbacks of programmed and interrupt driven io and des.pdf
discuss the drawbacks of programmed and interrupt driven io and des.pdfinfo998421
 
Unit v: Device Management
Unit v: Device ManagementUnit v: Device Management
Unit v: Device ManagementArnav Chowdhury
 
Computer System Overview,
Computer System Overview, Computer System Overview,
Computer System Overview, Sajid Marwat
 
Hardware I/O organization
Hardware  I/O organization Hardware  I/O organization
Hardware I/O organization faria_khan
 
Computer Organisation (DFT1113)
Computer Organisation (DFT1113)Computer Organisation (DFT1113)
Computer Organisation (DFT1113)PSMZA
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationMani Deepak Choudhry
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfTaufeeq8
 
IO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTUREIO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTUREHariharan Anand
 

Similar to Slide combine (20)

G143
G143G143
G143
 
I/O Buffering
I/O BufferingI/O Buffering
I/O Buffering
 
Buffering.pptx
Buffering.pptxBuffering.pptx
Buffering.pptx
 
IO buffering
IO bufferingIO buffering
IO buffering
 
Ch 7 io_management & disk scheduling
Ch 7 io_management & disk schedulingCh 7 io_management & disk scheduling
Ch 7 io_management & disk scheduling
 
I/O Organization
I/O OrganizationI/O Organization
I/O Organization
 
What is the difference between double buffering and a circular buffer-.docx
What is the difference between double buffering and a circular buffer-.docxWhat is the difference between double buffering and a circular buffer-.docx
What is the difference between double buffering and a circular buffer-.docx
 
I/o management and disk scheduling .pptx
I/o management and disk scheduling .pptxI/o management and disk scheduling .pptx
I/o management and disk scheduling .pptx
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
IO Management
IO ManagementIO Management
IO Management
 
discuss the drawbacks of programmed and interrupt driven io and des.pdf
discuss the drawbacks of programmed and interrupt driven io and des.pdfdiscuss the drawbacks of programmed and interrupt driven io and des.pdf
discuss the drawbacks of programmed and interrupt driven io and des.pdf
 
Unit v: Device Management
Unit v: Device ManagementUnit v: Device Management
Unit v: Device Management
 
IO system
IO systemIO system
IO system
 
Computer System Overview,
Computer System Overview, Computer System Overview,
Computer System Overview,
 
Hardware I/O organization
Hardware  I/O organization Hardware  I/O organization
Hardware I/O organization
 
Unit 6
Unit 6Unit 6
Unit 6
 
Computer Organisation (DFT1113)
Computer Organisation (DFT1113)Computer Organisation (DFT1113)
Computer Organisation (DFT1113)
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
 
IO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTUREIO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTURE
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 

Slide combine

  • 1. NURUL NAIM BINTI ABDULLAH SANI B031210190 MOHD SHAZWAN BIN KAMARUDIN DARUS B031210196 FIRDHAUSADNIN BIN RAHMAT B031210378 CHONG CAI NING B031210080
  • 2. Input Output Buffering  There is a speed mismatch between I/O devices and CPU.  This leads to inefficiency in processes being completed.  To increase the efficiency, it may be convenient to perform input transfers in advance of requests being made and to perform output transfers some time after the request is made.  This technique is known as buffering
  • 3. Input Output Buffering  In discussing the various approaches to buffering, it is sometimes important to make a distinction between two types of I/O devices:  Block-oriented devices store information in blocks that are usually of fixed size and transfers are made one block at a time for example disk,tape  Stream-oriented devices transfer data in and out as a stream of bytes, with no block structure for example terminals, printers, communications port, mouse.
  • 4. What is single buffer ??  Operating system assigns a buffer in main memory for an I/O request  Example when a user process issues an I/O request, the operating system assigns a buffer in the system portion of main memory to the  operation
  • 5. Single buffer process  The simplest type of buffering is single buffering.  When a user process issues and I/O request, the operating system assigns a buffer in the system portion of main memory to the operation.  For block-oriented devices, the single buffering scheme can be described as follows: Input transfers are made to the system buffer.  When the transfer is complete, the process moves the block into user space and immediately requests another block.
  • 6.  For stream oriented I/O, the single buffering scheme can be used in a line- at- a time Fashion or a byte-at-a-time fashion.  In line-at-a-time fashion user input and output to the terminal is one line at a time. For eg. Scroll-mode terminals, line printer.  Suppose thatT is required to input one block and that C is the computation time.  single buffer : you read and write on the same buffer, can be messy if both reading and writing take place at the same time. Single buffer process
  • 7. What is double buffer ?  Two buffers are used for the I/O operation .It’s also the process uses the content of one buffer while the I/O device uses the other.  Double-buffering possibly sounds harder than it actually is.
  • 8. ADVANTAGES  The user does not see every pixel modification (so if the same pixel gets modified 5 times, the user will only see the last one).This helps preventing 'flickering' (or screen flashes).  Double-buffering usually takes care of artifacts you or the user might be experiencing.  Writing to video memory is only performed once, on the buffer swap, instead of repeatedly for every pixel of which some might be overlapped later and might be invisible.
  • 9. DISADVANTAGES  Even though double-buffering is useful, it also has negative characteristics. Each is listed with an explanation and a possible solution.
  • 11. Circular Buffering  When more than 2 buffers are used -- each individual buffer is one unit in the circular buffer…  Is used when… --double buffering may be not enough if process perform rapid bursts of I/O…  Therefore, this type of buffering is needed for keeping up with the process
  • 12. Circular buffer of a process used for data transfer between 2 processes. Producer process: place item into circular buffer Consumer process: remove the item Variable capacity of circular buffer accommodate time ≠ producer and consumer process… --can execute faster than the other queue that hold a variable amount of data since… A fixed size block of memory is allocated just once from memory management and then reused.
  • 13. -- often is used to decouple 2 processes that operate at different speeds… -> fast producer process: --- can “burst” data into buffer and then continue with its processing -> slower consumer process: --- can read the data with its own rate without synchronizing and slowing the producer. Circular buffer of a process
  • 14. -the average rate, over time, of both producer and consumer process must be same to avoid over or underflow of condition of the circular buffering (“Synchronize Mode “ of operation) Circular buffer of a process
  • 15. --- 2 methods can avoid data loss in synchronize mode --- 2 methods can avoid data loss in synchronize mode: a) Calling blocking method:  calling thread to block until the Circular buffer has the requested number of items. b) WaterMark method:  fire an event when the number of items in the circular buffer reaches a preset level… ~~ eliminating wasting processing time due to process block.