Sponsored Content
Full Discussion: select vs poll
Special Forums IP Networking select vs poll Post 302115859 by porter on Saturday 28th of April 2007 05:18:59 PM
Old 04-28-2007
Quote:
Originally Posted by smanu
Do you by any chance have any idea about how much performance improvement can be achieved by replacing poll with Asynchronous I/O framework.
Alternatively consider pthreads. If your application takes advantage of threads for concurrent activity it will scale better on SMP hardware.
 

7 More Discussions You Might Find Interesting

1. Programming

How to convert the "select" function into a "poll" function

i have a program using the select function but i want to convert it to poll... how can i do this? thanks in advance... :) (1 Reply)
Discussion started by: rbolante
1 Replies

2. UNIX for Dummies Questions & Answers

Replace select/poll with kqueue/kevent

Hi, As far as I known, kqueue/kevent model can be used to improve the efficiency of systems event dispatching. I m wondering whether kqueue/kevent is same as the real-time OS event model. I also want to know when writing multiplexing app in real-time OS, what APIs need to be used for... (1 Reply)
Discussion started by: bsderss
1 Replies

3. Programming

select/poll and Signal Safety

Hi I am struggling to understand why one should use pselect()/ppoll() instead of wrapping an ordinary select() or poll() call around sigprocmask(). The linux man page talks about “race conditions”, but how would such dangers occur? I plan to use poll() for an application (since ppoll() isn't... (0 Replies)
Discussion started by: nopcoder
0 Replies

4. UNIX for Dummies Questions & Answers

Poll data from a file

I have to write a script where I poll a txt file for data (30 min interval) Dependent on the data read, the script should return a message. It should look something like the "code" below: -- do while <data recived> sleep 30m read data from file Done If <data> x return "A" If... (1 Reply)
Discussion started by: ioniCoder
1 Replies

5. Shell Programming and Scripting

how to poll for new files?

Hi , i have a requirement in which i have to ftp files to unix from windows and vice versa. I have to encrypt files in windows which will then be decrypted in unix and vice versa. Now the process needs to be automated ..therefore when windows server or unix server recieves the files a shell... (5 Replies)
Discussion started by: lifzgud
5 Replies

6. Shell Programming and Scripting

How to use poll() for I/O multiplex

Hi, guys: I want to write my own shell using C. I am confused about the usage of I/O multiplex. Does anyone know some examples or explain it to me ? Thanks so much (1 Reply)
Discussion started by: tomlee
1 Replies

7. What is on Your Mind?

Powerhouses and mainstream poll

This not a joke but a quite serious question to maybe have your point of view about this very topic of content on the net. So I start this poll to ask the users if they can imagine that the so called content industry of former times sooner or later or anyway will regain lost ground or not? Do you... (1 Reply)
Discussion started by: 1in10
1 Replies
pthread_default_stacksize_np(3T)										  pthread_default_stacksize_np(3T)

NAME
pthread_default_stacksize_np() - change the default stacksize SYNOPSIS
PARAMETERS
new_size The new default stack size. old_size Pointer to where the old default stack size is returned. DESCRIPTION
The function allows an application to change the default value for the stacksize attribute. This function must be called before any threads have been created. The new default stack size is passed in the new_size parameter. If not NULL, the previous default stack size is returned in old_size. If new_size is zero, this function can be used (at any time) to query the current default stack size. On HP-UX, threads with default stack sizes are cached after they terminate. The next time a thread is created with a default stack size, a cached thread (and its stack) are reused. This can result in significant performance improvements for However, if the default stack size is not appropriate for an application, it cannot take advantage of this performance enhancement. By using the function, the threads library will change the default stack size so that it matches the applications needs. This allows the application to utilize the performance benefit of cached threads. RETURN VALUE
Upon successful completion, returns zero. Otherwise, an error number is returned to indicate the error (the variable is not set). ERRORS
If any of the following occur, the function returns the corresponding error number: [EINVAL] The value specified by new_size is less than [EPERM] The calling process has already created threads (this must be called before any threads are created). WARNINGS
If the environment variable is set with a valid value for default stack size, then it takes precedence over the invocation of interface. However, it returns the current default stack size in old_size. The maximum default stack size value that may be set through the environment variable is restricted to 10 MB; any value greater than 10 MB will be rounded down to 10 MB. Care should be taken while setting the default stack size limit since this could impact the maximum number of threads that can be created in a process. AUTHOR
was developed by HP. SEE ALSO
pthread_attr_getstacksize(3T), pthread_attr_setstacksize(3T). STANDARDS CONFORMANCE
Pthread Library pthread_default_stacksize_np(3T)
All times are GMT -4. The time now is 09:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy