• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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.
 
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic