Hi!

On 10:55 Wed 30 Jun     , nidhi mittal hada wrote:
> There are two types of function calls , blocking and non blocking ,
> blocking --in whihc we might sleep for some processing ,
> Non blocking -- we will prefer to return from function instead of sleeping
> Now

No, blocking/nonblocking has *nothing* to do with when data hits the disk. It
is about what you want the kernel to do, if it has to wait, because buffers
are either full or empty.

- blocking: wait until some data could be read/written
- non-blocking: return immediately without having done anything and let
  userspace do something else in the meantime; This can be used together with
  select() or epoll() to efficiently handle a lot of file descriptors with a
  single thread.
    
> write function comes under first category --
> and we will sleep till data is written to target block device.

No, both read and write can be put in blocking and non-blocking mode.

        -Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to