04-24-2007
Question on creation of Thread pool
dear sir/madam
presently i am in a process of creating a multithread pool using
clone() system call in unix with c programming.
i am facing some problem ie., i am able create multithread pool and
able to keep all the threads in wait state,but when i call kill
(afunction revoke a thread after stopping it through raise
function) all the threads in the pool are revoking instead of only
one.In order to make only single thread to invoke and keep the
rest in wait condition i need to set a flag in clone system call
but i am unable to find that flag.I tried it with all flags that i
got in man and internet but i could not get it.so can anyone send
me the code for the same?
Thanks
Radha
9 More Discussions You Might Find Interesting
1. Solaris
Hi all!
Is there a function in c++ to create new threads.I have writen a class "Thread"
in which I will be calling this thread function to creat threads.
Also is there a function to synchronize threads .I know that we can create objects like semaphores and critical sections to synchronize in... (2 Replies)
Discussion started by: vijlak
2 Replies
2. Solaris
I'm trying to figure out how to simply create a 500Gb ufs file system named
/rec using DiskSuite 4.2.1 on a Solaris 8 platform via command line using two
250Gb partitions on two different disks. Does anyone know what the proper
command string and options are to perform this task? Would I use the... (2 Replies)
Discussion started by: ruger14
2 Replies
3. Infrastructure Monitoring
Here are the details.
cnjr-opennms>root$ zfs list
NAME USED AVAIL REFER MOUNTPOINT
openpool 20.6G 46.3G 35.5K /openpool
openpool/ROOT 15.4G 46.3G 18K legacy
openpool/ROOT/rds 15.4G 46.3G 15.3G /
openpool/ROOT/rds/var 102M ... (3 Replies)
Discussion started by: pupp
3 Replies
4. Shell Programming and Scripting
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
void *fork_thread(void *ptr );
main()
{
pthread_t thread1;
char *message1 = "Thread 1";
int iret1;
iret1 = pthread_create( &thread1, NULL, fork_thread, (void*) message1);
exit(0);
}
Void *fork_thread(... (3 Replies)
Discussion started by: annapurna konga
3 Replies
5. Shell Programming and Scripting
Void *fork_thread( void *ptr )
i am getting error in this line
please help me out (1 Reply)
Discussion started by: annapurna konga
1 Replies
6. Solaris
I created a pool the other day. I created a 10 gig files just for a test, then deleted it.
I proceeded to create a few files systems. But for some reason the pool shows 10% full, but the files systems are both at 1%? Both files systems share the same pool.
When I ls -al the pool I just... (6 Replies)
Discussion started by: mrlayance
6 Replies
7. Solaris
i have server carry more than 50 zone
i want to create 2 resource pool
assign 40 zone to resource pool number 1
assign 10 zone to resource pool number 2
how can i do that (1 Reply)
Discussion started by: coxmanchester
1 Replies
8. UNIX for Dummies Questions & Answers
hello everyone. I want to implement a thread pool, with 10 threads most. Inside main,I call a function (lets say it foo) wich creates (if it is needed) or uses an existing thread from the pool and sends it to do a job.My problem is that I dont know how to pass the argument from the main to the... (2 Replies)
Discussion started by: garag11
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have below code for disk creation
disk_list=$(ls /dev/sd)
for disk in $disk_list
do
pvcreate $i
done
So what my understanding is first it is checking the disk under /dev sdb,sdc,sdd,...sdz whether 25 disk are existing
if not then its creating the 25 physical volume.
I... (4 Replies)
Discussion started by: stew
4 Replies
LEARN ABOUT SUNOS
ping-connection-pool
asadmin-ping-connection-pool(1AS) User Commands asadmin-ping-connection-pool(1AS)
NAME
asadmin-ping-connection-pool, ping-connection-pool - tests that a connection pool is usable
SYNOPSIS
ping-connection-pool --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename]
[--terse=false] [--echo=false] [--interactive=true] pool_name
Tests that a connection pool is usable for both JDBC connection pools and connector connection pools. For example, if you create a new JDBC
connection pool for use with an application that is expected to be deployed, before deploying the application, the previously created pool
is tested with this command.
This command is supported in remote mode only.
OPTIONS
--user authorized domain application server administrative username.
--password password to administer the domain application server.
--host machine name where the domain application server is running.
--port port number of the domain application server listening for administration requests.
--secure if true, uses SSL/TLS to communicate with the domain application server.
--passwordfile file containing the domain application server password.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script. Default is false.
--echo setting to true will echo the command line statement on the standard output. Default is false.
--interactive if set to true (default), only the required password options are prompted.
OPERANDS
poolname name of the connection pool to be tested.
Example 1: Using ping-connection-pool
Before you can ping a connection pool, you must:
o Create a connection pool with authentication.
o Make sure the Enterprise Information Server (can be the database) is started.
asadmin> ping-connection-pool --user admin1 --password adminadmin1
--host pigeon --port 5001 sampleConnectionPool
Command ping-connection-pool executed successfully
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-create-connector-connection-pool(1AS), asadmin-delete-connector-connection-pool(1AS), asadmin-list-connector-connection-pool(1AS),
asadmin-create-jdbc-connection-pool(1AS), asadmin-delete--jdbc-connection-pool(1AS)asadmin- list--jdbc-connection-pools(1AS)
J2EE 1.4 SDK March 2004 asadmin-ping-connection-pool(1AS)