Wait Queues

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

 



I have a query regarding wait queues. When any process
waiting with task state set to TASK_INTERRUPTIBLE,
then if a signal is passed to the process, does it put
a task on a runqueue implicitly or do we need to
explicitly make a call to add to a runqueue.

Could anyone tell me that how sleep call works ? It is
not a system call as i could not see any entry for
this system call in ksyms.c. There is an entry for
sys_nanosleep.

If I call strace sleep 5, the output of this comes as:
Could anyone explain what old_mmap signify here and
why
memory mapping is coming into a picture. I understood
that sleep call using sys_nanosleep system call but
why doe we need to have memory mapping 

Please explain me this.

Regards
Dinesh
 
uname({sys="Linux", node="localhost.localdomain",
...}) = 0
brk(0)                                  = 0x804bd28
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT
(No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=83287, ...})
= 0
old_mmap(NULL, 83287, PROT_READ, MAP_PRIVATE, 3, 0) =
0x40013000
close(3)                                = 0
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2005\0"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=220748,
...}) = 0
old_mmap(NULL, 131520, PROT_READ|PROT_EXEC,
MAP_PRIVATE, 3, 0) = 0x40028000
mprotect(0x40048000, 448, PROT_NONE)    = 0
old_mmap(0x40048000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x20000) = 0x40048000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240@\0"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=100736,
...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40049000
old_mmap(NULL, 331364, PROT_READ|PROT_EXEC,
MAP_PRIVATE, 3, 0) = 0x4004a000
mprotect(0x40058000, 274020, PROT_NONE) = 0
old_mmap(0x40058000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0x40058000
old_mmap(0x4005b000, 261732, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =
0x4005b000
close(3)                                = 0
open("/lib/librt.so.1", O_RDONLY)       = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0D\32\0\000"...,
1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=33092, ...})
= 0
old_mmap(NULL, 69784, PROT_READ|PROT_EXEC,
MAP_PRIVATE, 3, 0) = 0x4009b000
mprotect(0x400a1000, 45208, PROT_NONE)  = 0
old_mmap(0x400a1000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x5000) = 0x400a1000
old_mmap(0x400a2000, 41112, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =
0x400a2000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\350T\1"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1481836,
...}) = 0
old_mmap(NULL, 1198532, PROT_READ|PROT_EXEC,
MAP_PRIVATE, 3, 0) = 0x400ad000
mprotect(0x401cc000, 22980, PROT_NONE)  = 0
old_mmap(0x401cc000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x11e000) = 0x401cc000
old_mmap(0x401cf000, 10692, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =
0x401cf000
close(3)                                = 0
munmap(0x40013000, 83287)               = 0
getrlimit(0x3, 0xbfffeffc)              = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2044*1024,
rlim_max=RLIM_INFINITY}) = 0
getpid()                                = 1091
rt_sigaction(SIGRTMIN, {0x40052a2c, [], SA_RESTORER,
0x400d3bc8}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x40052914, [], SA_RESTORER,
0x400d3bc8}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x40052ab4, [], SA_RESTORER,
0x400d3bc8}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbffff02c, 31,
(nil), 0}) = 0
brk(0)                                  = 0x804bd28
brk(0x804cd28)                          = 0x804cd28
brk(0)                                  = 0x804cd28
brk(0x804d000)                          = 0x804d000
open("/usr/lib/locale/locale-archive",
O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=30301680,
...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) =
0x401d2000
close(3)                                = 0
gettimeofday({1105282986, 887677}, NULL) = 0
nanosleep({5, 0}, NULL)                 = 0
exit_group(0)                           = ?


________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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