• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

What is meant by Blocking I/O ?

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Can anyone tell me what is meant by "blocking i/o" operation?
What is a "non-blocking i/o" ? Pls explain them in terms of Threads.
Thanks,
Senthil.
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I/O operations are considered to be blocking operations for thread execution. This means that, when a thread starts performing I/O, (which would include a series of operations in itself, like opening file, reading, writing, closing of files, etc), it prevents the thread from performing any other operation, till the I/O is over. Hence I/O is called a blocking operation as far as threads are concerned.
There is nothing like non-blocking I/O.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kezia Matthews:
There is nothing like non-blocking I/O.


Actually, in J2SDK v1.4, currently in beta, there is (java.nio.*).
- Peter

 
Kezia Matthews
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks Peter, for letting me know about the existence of "non-blocking I/O" in the new version, J2SDK v1.4.
Kezia.
 
arul senthil
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
There is some more info about NBIO here : http://www.jguru.com/forums/view.jsp?EID=468022
-Senthil.
 
Kezia Matthews
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks Arul.
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic