Re: Basic doubt regarding block layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux