f



To use locking or not to use it

Hello,

I am builiding a multi-threaded application which has the following
components :

1 writer thread - it gets information from the network
and updates a table of numeric data, then informs
the 2 reader threads that there is new information,
so they should start running

2 reader threads that are awakened by the writer thread,
use the writer thread's table to retrieve updated numerical
data to do their calculations.

Since the writer updates the table and the readers read from it,
I want to use a reader/writer locking mechanism.

However, I thought about the following strategy :

The writer will not manage a main table, it will only package
the recieved data (in a struct or class), and use 2 queue
structures, one for each reader, it will enqueue the data
into each queue, which in turn will cause the 2 reader threads,
to awake, dequeue the data, update their own copy of the
numeric data table (which is handled by the writer thread in
the previous scenario) and then do their calculations.

Since each reader thread has its own copy (although they
are duplicate), no locking is required.

The only locking might be required on the queue actions
(but maybe there is a way to use a queue with 1 thread
which enqueue's and 1 thread that dequeue without lock's -
I will be glad for any suggestion here as well).

The data that is packaged is 48 bytes.

I would be very happy to hear your thoughts
and questions  about these designs - which might be better
, faster etc.

Last detail - I am using a quad core processor and I thought
of writing this in C# using the new .NET 4.0 TPL library
(any thoughts about this are welcomed as well)

Thank you very much

Bobby
0
Bob
8/17/2010 8:03:13 PM
comp.programming.threads 4878 articles. 1 followers. Post Follow

8 Replies
1355 Views

Similar Articles

[PageSpeed] 44

"Bob" <bobbe@gmail.com> wrote in message 
news:gtpl665f2rc20apue2j2itkcg6nehbogtk@4ax.com...
> Hello,
>
> I am builiding a multi-threaded application which has the following
> components :
>
> 1 writer thread - it gets information from the network
> and updates a table of numeric data, then informs
> the 2 reader threads that there is new information,
> so they should start running
[...]
> However, I thought about the following strategy :
>
> The writer will not manage a main table, it will only package
> the recieved data (in a struct or class), and use 2 queue
> structures, one for each reader, it will enqueue the data
> into each queue, which in turn will cause the 2 reader threads,
> to awake, dequeue the data, update their own copy of the
> numeric data table (which is handled by the writer thread in
> the previous scenario) and then do their calculations.
[...]

I would personally go for 1 intrusive spsc queue per consumer/reader thread 
(there are only 2 readers total at all times right?). The producer/writer 
would alternate queue pushes to achieve some sort of "load balance"; no 
locking required. The writer can package those 48 bytes in a node structure 
and blast it through the lockless queue. BTW, I am sorry for the short 
response, I am currently swamped with work.

Humm... Well, how "big" can that "numeric data table" get during periods of 
heavy load? 


0
Chris
8/18/2010 1:26:34 AM
On Tue, 17 Aug 2010 18:26:34 -0700, "Chris M. Thomasson"
<cristom@charter.net> wrote:

>"Bob" <bobbe@gmail.com> wrote in message 
>news:gtpl665f2rc20apue2j2itkcg6nehbogtk@4ax.com...
>> Hello,
>>
>> I am builiding a multi-threaded application which has the following
>> components :
>>
>> 1 writer thread - it gets information from the network
>> and updates a table of numeric data, then informs
>> the 2 reader threads that there is new information,
>> so they should start running
>[...]
>> However, I thought about the following strategy :
>>
>> The writer will not manage a main table, it will only package
>> the recieved data (in a struct or class), and use 2 queue
>> structures, one for each reader, it will enqueue the data
>> into each queue, which in turn will cause the 2 reader threads,
>> to awake, dequeue the data, update their own copy of the
>> numeric data table (which is handled by the writer thread in
>> the previous scenario) and then do their calculations.
>[...]
>
>I would personally go for 1 intrusive spsc queue per consumer/reader thread 
>(there are only 2 readers total at all times right?). The producer/writer 
>would alternate queue pushes to achieve some sort of "load balance"; no 
>locking required. The writer can package those 48 bytes in a node structure 
>and blast it through the lockless queue. BTW, I am sorry for the short 
>response, I am currently swamped with work.
>
>Humm... Well, how "big" can that "numeric data table" get during periods of 
>heavy load? 
>
Thanks for your answer, I appreciate it.

There are 2 readers now, might be more in the future, but for now only
2 (will your answer change if there are 4 or 6 etc. ?)

I can't alternate between them, meaning when an update arrives, I MUST
update both of them - if I don't use a lock/mutex for the queue, how
can I assume that when the writer is updating the queue, the reader
isn't reading from the queue ?

One more thing I forgot to mention - the rate at which the updates
arrives is very high - might be every few ms, also, the main table's
size is constant.

Thank you very much

Bobby
0
Bob
8/18/2010 4:27:40 AM
On Aug 17, 9:27=A0pm, Bob <bo...@gmail.com> wrote:

> One more thing I forgot to mention - the rate at which the updates
> arrives is very high - might be every few ms, also, the main table's
> size is constant.

What is supposed to happen if a thread misses an update? Does the new
data obsolete the previous data so it should be ignored? Or is the
intent to process every chunk of data by every reader thread? I can
think of good designs for both cases, but they're very different.

DS
0
David
8/18/2010 6:26:34 AM
On Tue, 17 Aug 2010 23:26:34 -0700 (PDT), David Schwartz
<davids@webmaster.com> wrote:

>On Aug 17, 9:27�pm, Bob <bo...@gmail.com> wrote:
>
>> One more thing I forgot to mention - the rate at which the updates
>> arrives is very high - might be every few ms, also, the main table's
>> size is constant.
>
>What is supposed to happen if a thread misses an update? Does the new
>data obsolete the previous data so it should be ignored? Or is the
>intent to process every chunk of data by every reader thread? I can
>think of good designs for both cases, but they're very different.
>

Both reader threads should process each and every update - the
data includes a dew numeric fields and a key with which they find
the correct entry for the update in the table (ie hash table)

Updates come irregularly and at a very fast rate - might be every 1 ms

Thanks,

Bob
0
Bob
8/18/2010 5:03:42 PM
 "Bob" <bobbe@gmail.com> wrote in message 
news:u0om66dn237vvlqtb3bq8rf9khb0mlaigb@4ax.com...
> On Tue, 17 Aug 2010 18:26:34 -0700, "Chris M. Thomasson"
> <cristom@charter.net> wrote:
[...]

> Thanks for your answer, I appreciate it.
>
> There are 2 readers now, might be more in the future, but for now only
> 2 (will your answer change if there are 4 or 6 etc. ?)

Probably, because the answer has O(N) complexity for the writer thread. :^)




> I can't alternate between them, meaning when an update arrives, I MUST
> update both of them - if I don't use a lock/mutex for the queue, how
> can I assume that when the writer is updating the queue, the reader
> isn't reading from the queue ?

You cleverly organize things such that the conflict is resolved or does not 
happen in the first place. Humm, before I even get into any of that, I think 
you should focus on perfecting a lock-based design.


Do you really need bleeding edge performance and scalability? Virtually all 
the algorithms involved are fairly advanced. For instance, a scaleable hash 
table:

http://groups.google.com/group/lock-free/browse_frm/thread/a826061a4af06dc0

http://sites.google.com/site/1024cores/downloads




> One more thing I forgot to mention - the rate at which the updates
> arrives is very high - might be every few ms, also, the main table's
> size is constant.



0
Chris
8/18/2010 8:51:53 PM
On Wed, 18 Aug 2010 13:51:53 -0700, "Chris M. Thomasson"
<cristom@charter.net> wrote:

> "Bob" <bobbe@gmail.com> wrote in message 
>news:u0om66dn237vvlqtb3bq8rf9khb0mlaigb@4ax.com...
>> On Tue, 17 Aug 2010 18:26:34 -0700, "Chris M. Thomasson"
>> <cristom@charter.net> wrote:
>[...]
>
>> Thanks for your answer, I appreciate it.
>>
>> There are 2 readers now, might be more in the future, but for now only
>> 2 (will your answer change if there are 4 or 6 etc. ?)
>
>Probably, because the answer has O(N) complexity for the writer thread. :^)
>
>
>
>
>> I can't alternate between them, meaning when an update arrives, I MUST
>> update both of them - if I don't use a lock/mutex for the queue, how
>> can I assume that when the writer is updating the queue, the reader
>> isn't reading from the queue ?
>
>You cleverly organize things such that the conflict is resolved or does not 
>happen in the first place. Humm, before I even get into any of that, I think 
>you should focus on perfecting a lock-based design.
>

I have 1 resource that is used by 3 threads - one updates it and 2
read from it - so reader/writer seems the best approach, is there more
to this that escaped me ? what other actions I get perform ?
If I use only 1 resource I must have synchronization, what other
clever organization can be done (when I use just 1 shared resource) ?

>Do you really need bleeding edge performance and scalability? Virtually all 
>the algorithms involved are fairly advanced. For instance, a scaleable hash 
>table:
>
>http://groups.google.com/group/lock-free/browse_frm/thread/a826061a4af06dc0
>
>http://sites.google.com/site/1024cores/downloads
>

Thanks for the links, I need very high performance, less scalability
for now

>> One more thing I forgot to mention - the rate at which the updates
>> arrives is very high - might be every few ms, also, the main table's
>> size is constant.
>
>
0
Bob
8/19/2010 4:47:57 AM
On Aug 19, 9:47=A0am, Bob <bo...@gmail.com> wrote:
> On Wed, 18 Aug 2010 13:51:53 -0700, "Chris M. Thomasson"
>
>
>
>
>
> <cris...@charter.net> wrote:
> > "Bob" <bo...@gmail.com> wrote in message
> >news:u0om66dn237vvlqtb3bq8rf9khb0mlaigb@4ax.com...
> >> On Tue, 17 Aug 2010 18:26:34 -0700, "Chris M. Thomasson"
> >> <cris...@charter.net> wrote:
> >[...]
>
> >> Thanks for your answer, I appreciate it.
>
> >> There are 2 readers now, might be more in the future, but for now only
> >> 2 (will your answer change if there are 4 or 6 etc. ?)
>
> >Probably, because the answer has O(N) complexity for the writer thread. =
:^)
>
> >> I can't alternate between them, meaning when an update arrives, I MUST
> >> update both of them - if I don't use a lock/mutex for the queue, how
> >> can I assume that when the writer is updating the queue, the reader
> >> isn't reading from the queue ?
>
> >You cleverly organize things such that the conflict is resolved or does =
not
> >happen in the first place. Humm, before I even get into any of that, I t=
hink
> >you should focus on perfecting a lock-based design.
>
> I have 1 resource that is used by 3 threads - one updates it and 2
> read from it - so reader/writer seems the best approach, is there more
> to this that escaped me ? what other actions I get perform ?
> If I use only 1 resource I must have synchronization, what other
> clever organization can be done (when I use just 1 shared resource) ?
>
> >Do you really need bleeding edge performance and scalability? Virtually =
all
> >the algorithms involved are fairly advanced. For instance, a scaleable h=
ash
> >table:
>
> >http://groups.google.com/group/lock-free/browse_frm/thread/a826061a4a...
>
> >http://sites.google.com/site/1024cores/downloads
>
> Thanks for the links, I need very high performance, less scalability
> for now
>
>
>
> >> One more thing I forgot to mention - the rate at which the updates
> >> arrives is very high - might be every few ms, also, the main table's
> >> size is constant.- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Hello Bob,
               Since the requirement is high performance, I think of
following design:

Writer has to respond to the inputs fast and at the same time should
not get blocked because of readers. Hence
writer thread/process should have the highest priority and after
receiving the message, sends it another thread/process(say
Dispatcher=3DD). Now D takes care of dispatching it to the queues of two
readers. D and the reader tasks(R1, R2) should have equal priority.
Since the intention is to use queues between tasks, it is safe to
assume that unless the write is finished, read won't happen.Also the
read would happen in terms of messages and not in terms of
streams(correct me if the connectivity between the tasks is stream
based). For every read by the D, it does two writes: one for R1, one
for R2. Once the data is available, they will unblock and read it.
They can't read the next msg as it is still not written and hence get
blocked(So no need for extra sync mechanism). Hope that helps.

Cheers,
Krishna.
0
Kaushal
8/20/2010 9:39:06 AM
On Fri, 20 Aug 2010 02:39:06 -0700 (PDT), Kaushal Rampalli
<kaushal.r@gmail.com> wrote:

>On Aug 19, 9:47�am, Bob <bo...@gmail.com> wrote:
>> On Wed, 18 Aug 2010 13:51:53 -0700, "Chris M. Thomasson"
>>
>>
>>
>>
>>
>> <cris...@charter.net> wrote:
>> > "Bob" <bo...@gmail.com> wrote in message
>> >news:u0om66dn237vvlqtb3bq8rf9khb0mlaigb@4ax.com...
>> >> On Tue, 17 Aug 2010 18:26:34 -0700, "Chris M. Thomasson"
>> >> <cris...@charter.net> wrote:
>> >[...]
>>
>> >> Thanks for your answer, I appreciate it.
>>
>> >> There are 2 readers now, might be more in the future, but for now only
>> >> 2 (will your answer change if there are 4 or 6 etc. ?)
>>
>> >Probably, because the answer has O(N) complexity for the writer thread. :^)
>>
>> >> I can't alternate between them, meaning when an update arrives, I MUST
>> >> update both of them - if I don't use a lock/mutex for the queue, how
>> >> can I assume that when the writer is updating the queue, the reader
>> >> isn't reading from the queue ?
>>
>> >You cleverly organize things such that the conflict is resolved or does not
>> >happen in the first place. Humm, before I even get into any of that, I think
>> >you should focus on perfecting a lock-based design.
>>
>> I have 1 resource that is used by 3 threads - one updates it and 2
>> read from it - so reader/writer seems the best approach, is there more
>> to this that escaped me ? what other actions I get perform ?
>> If I use only 1 resource I must have synchronization, what other
>> clever organization can be done (when I use just 1 shared resource) ?
>>
>> >Do you really need bleeding edge performance and scalability? Virtually all
>> >the algorithms involved are fairly advanced. For instance, a scaleable hash
>> >table:
>>
>> >http://groups.google.com/group/lock-free/browse_frm/thread/a826061a4a...
>>
>> >http://sites.google.com/site/1024cores/downloads
>>
>> Thanks for the links, I need very high performance, less scalability
>> for now
>>
>>
>>
>> >> One more thing I forgot to mention - the rate at which the updates
>> >> arrives is very high - might be every few ms, also, the main table's
>> >> size is constant.- Hide quoted text -
>>
>> - Show quoted text -- Hide quoted text -
>>
>> - Show quoted text -
>
>Hello Bob,
>               Since the requirement is high performance, I think of
>following design:
>
>Writer has to respond to the inputs fast and at the same time should
>not get blocked because of readers. Hence
>writer thread/process should have the highest priority and after
>receiving the message, sends it another thread/process(say
>Dispatcher=D). Now D takes care of dispatching it to the queues of two
>readers. D and the reader tasks(R1, R2) should have equal priority.
>Since the intention is to use queues between tasks, it is safe to
>assume that unless the write is finished, read won't happen.Also the
>read would happen in terms of messages and not in terms of
>streams(correct me if the connectivity between the tasks is stream
>based). For every read by the D, it does two writes: one for R1, one
>for R2. Once the data is available, they will unblock and read it.
>They can't read the next msg as it is still not written and hence get
>blocked(So no need for extra sync mechanism). Hope that helps.
>
>Cheers,
>Krishna.

Hi Krishna and thanks for your suggestions.
one question - why use another thread (D) to
dispatch the data to both queues - the producer
must copy the data once to another queue from
which the dispatcher reads.

If I don't use a dispatcher, the producer has to do
2 copy actions - is that why you suggested another
thread - to save one copy action ?

Thanks,

Bob
0
Bob
8/20/2010 8:47:35 PM
Reply:

Similar Artilces:

Using using
I want to plot column 2 against col. 1, but subtract a constant from col. 2. I tried, in a test script, plot 'test.dat' using 1:($2 + 1) w p pt 7 but gnuplot complains Warning: empty y range [1:1], adjusting to [0.99:1.01] although the data file contains 1 1 2 2 3 3 4 4 5 5 What am I doing wrong? I read this in the manual: plot 'file' using 1:($2+$3) "%1f,%1f,%1f" which led me to use the above. I assume the format stuff is not needed. If I am doing this wrong, how do I modify a given column to be plotted arithmetically? -- Dieter Britz Am 22.08.2013 16:24, schrieb Dieter Britz: > I want to plot column 2 against col. 1, but subtract > a constant from col. 2. I tried, in a test script, > > plot 'test.dat' using 1:($2 + 1) w p pt 7 > > but gnuplot complains > > Warning: empty y range [1:1], adjusting to [0.99:1.01] > > although the data file contains > > 1 1 > 2 2 > 3 3 > 4 4 > 5 5 > You´ve set an xrange that ends between one and two. On Thu, 22 Aug 2013 17:46:37 +0200, Karl wrote: > Am 22.08.2013 16:24, schrieb Dieter Britz: >> I want to plot column 2 against col. 1, but subtract a constant from >> col. 2. I tried, in a test script, >> >> plot 'test.dat' using 1:($2 + 1) w p pt 7 >> >> but gnuplot complains >> >> Warning: empty y range [1:1], adjus...

when to use ; and when to use ,
Any statements like printf("abc"); scanf("%d",&x); a=20; can be replaced by printf("abc"), scanf("%d",&x), a=20; So when should we use ; and when sould we use , In article <1181971596.941107.318810@o11g2000prd.googlegroups.com>, Ravi <ra.ravi.rav@gmail.com> wrote: >Any statements like > printf("abc"); > scanf("%d",&x); > a=20; >can be replaced by > printf("abc"), scanf("%d",&x), a=20; > >So when should we use ; and when sould we use , Use ; when you want ...

when to use == and when to use is
I know this question has been answered: http://stackoverflow.com/questions/6570371/when-to-use-and-when-to-use-is , but I still have doubts. Consider the following code: class A: def __init__(self, a): self._a = a #def __eq__(self, other): # return self._a != other._a obj_0 = A(0) obj_1 = A(1) obj_2 = A(2) obj = obj_1 if obj == obj_0: print(0) elif obj == obj_1: print(1) elif obj == obj_2: print(2) if obj is obj_0: print(0) elif obj is obj_1: print(1) elif obj is obj_2: print(2) Both if statements wo...

Using where; Using index vs Using where
Hello, What are the difference between the following statements, which one is better? mysql> desc SELECT COUNT(*) as `cnt` FROM vote WHERE `ip` = INET_ATON('127.0.0.1') AND (`addtime` > NOW() - INTERVAL 1 DAY) ; +----+-------------+-------+-------+---------------+--------------- +---------+------+------+--------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+-------+---------------+--------------- +---------+------+------+--------------------------+ | 1 | S...

How to use 'lock' prefix to make instruction atomic (in a multi-threaded program)
Hi all, I am writing a multi-threaded assembly program with POSIX threads. There is a global variable that all thread can modify. Each thread may increment or decrement this variable, global_counter. And this is how i wrote for each thread (at&t syntax): lock addl $1, global_counter lock subl $1, global_counter %% Or use 'inc' and 'dec' instruction instead of add/sub In the main thread, it requires to read the value of global_counter atomically, this is what i wrote: movl $0, %eax lock addl global_counter, %eax However, the assembler ...

Using use in programs vs modules
Greetings, I have little module, MyUtil.pm for example, that has utility functions I use in most of my perl programs. I would like to use one function from this module in another module - while at the same time referring to the same module subroutine in the "calling" perl program. For example The module (pseudo-code): package MyNewModule use strict; use warnings; use Carp; use lib '/home/modules'; use MyUtill qw(mytool); sub test_it { mytool(); } The perl program (psuedo again): #!/usr/bin/perl use strict; use warnings; use Carp; use lib '/home/modules'; use My...

use forks vs use threads
As per the subject, I am trying to decide which way to go. After a bit of surfing: 'use threads' is the clone-the-interpreter method. It requires 5.8.0+, can be very resource intensive (multiple copies of the whole interpreter), can be slow (creating lots of interpreter copies), but seems to be the 'sanctioned' thread paradigm. 'use forks' is the fork-a-child proc method. It can be used with "older" Perls, less resource intensive, but can have latency and performance issues (which seem to have spawned forks::BerkeleyDB in an effort to solve them)....

how to use threaded programming
hi I am about to study threaded programming in Linux. And no idea how to set up the environment. It seems that I have to port libraries into linux kernel. Could someone provide me steps to set up this environment ? Thankyou in advance Jack wrote: > hi > > I am about to study threaded programming in Linux. And no idea how to > set up the environment. It seems that I have to port libraries into > linux kernel. Could someone provide me steps to set up this environment > ? Thankyou in advance Writing a program that uses Threads is no different than writing a...

Just When I Was Getting Used To Using Using
I have a class Packet that contains a nested class Payload and an enumeration: struct Packet { struct Payload { } ; } ; I had gotten into the habit of writing: using Packet::Payload; so I could write: Payload::..blah.. instead of Packet::Payload::..blah I have done this... (gulp) in many, many .cpp files. I tried out the new Visual C++ Express compiler from you-know-who on my source code and got 1000's of error messages: ...\Packet\Packet.cpp(13) : error C2885: 'Packet::Payload': not a valid using-declaration at non-class scope What does the standard say? Is th...

What is the best way to manage programs on SD card? What software do people use to use programs from their SD card?
What is the best way to manage programs on SD card? What software do people use to use programs from their SD card? Thanks Tracy On Sat, 10 Jan 2004 14:09:01 GMT, "Tracy Smith" <tracystyle@hotmail.com> proclaimed: >What is the best way to manage programs on SD card? What software do people >use to use programs from their SD card? Thanks Tracy > LauncherX works fine if you only want to put the actual programs on card. PowerRun, on the other hand, will allow you to put both program and data on the card. -- I will jump five hundred feet into block of...

Problems using an old programs which uses quicktime
Hi, I was given an older program (chemistry interactive) which was originally made for windows 3.11. This program was originally made to work with QuickTime 2.11. When I installed the program it asked me if I wanted to install QuickTime and I hit no (I have the newest version of quicktime so I didn't think I needed it). When I started the program it told me that the animations would not work because I didn't have QuickTime installed. Because of this I then went to reinstall the program, this time telling it that I wanted to install QuickTime, but when I launched the pro...

Multi-threaded program makes use of Non-thread-safe library
Let's say we have a C library that exports two functions. Here's how the two functions are defined: [code] int some_variable; void Set5(void) { some_variable = 5; } void Add3(void) { some_variable += 3; } [/code] (You'll notice that there's no use of Critical Sections or Mutexes in the above code) Obviously this library isn't thread-safe, because if you have one thread calling Set5 at the same time as another thread calls Add3, then "some_variable" well be accessed simultaneously by two different threads, resulting in serious injury or death. Anyway, can this problem be gotten around simply by using a Critical Section inside the program which makes use of this library? Let's say the program is written in C++: [code] #include <header_file_for_non_thread_safe_c_library.h> CriticalSection cs_for_library; void MyFirstThread() { cs_for_library.Enter(); Set5(); cs_for_library.Leave(); } void MySecondThread() { cs_for_library.Enter(); Add3(); cs_for_library.Leave(); } [/code] Will this always work for calling non-thread-safe library functions from multiple threads? On Jun 10, 1:22=A0am, Virchanza <virt...@lavabit.com> wrote: > Let's say we have a C library that exports two functions. Here's how > the two functions are defined: > > [code] > int some_variable; > > void Set5(void) > { > =A0 =A0...

Use and usefulness of the as syntax
First, could you confirm the following syntax import foo as f equivalent to import foo f = foo Now, I was wondering about the usefulness in everyday programming of the as syntax within an import statement. Here are some instances retrieved from real code of such a syntax import numpy as np import math as _math import pickle as pickle -- In the first case, the syntax is motivated by brevity need, isn't it ? -- The second case seems to be rather widespread and causes math attribute to be private but I don't figure out why this matters. -- In the last case, I can see no poin...

Disk in use when not in use
After a hang and hardware reset, I could not boot into eCS 1.14, getting a display that I've never seen before: a VGA display with a white background and a box that said the program pointed to by SET RUNWORKPLACE= could not be loaded. C-A-D worked to shut this display down, but reboot produced the same outcome. This was corrected by rebooting and using an archived desktop. To make sure everything is OK I next booted into my maintenance partition and tried to run CDKDSK C: /F. It wouldn't run because the disk was "in use or locked by another process". Except the disk is not in use. I suppose this false condition was created by the strange and new crash, but for all I know it has existed for months, since I haven't run CHKDSK from the other partition in ages. I can't figure out how to correct this condition. I have downloaded DFSee but don't know how to use it. DFSee reports: Pid06= WARNING : More than ONE partition is marked active! but it's not obvious to me what to do about it. I did use DFSee to set the C: drive dirty and force a CHKDSK at boot, but that didn't correct the two disks active condition. Is there a DFSee expert who can give me some advice? -- John Varela (Trade "OLD" lamps for "NEW" for email.) I apologize for munging the address but the spam is too much. Sir: John Varela wrote: > After a hang and hardware reset, I could not boot into eCS 1...

file in use, could not use
Hi. I have two databases that are both linked to the same backend table. I can't use them both at the same time, yet other users can have both functioning simultaneously on their machines. Opening them is not the problem. ..but the error message appears when I run any queries linked to the table. It works in one database, but not the other. All users are running XP sp2 with Access 2003. The error message is the same regardless if anyone is using the backend or not. I believe it is machine specific...MY machine. I haven't a clue. Any ideas? -- Message posted via http://www.accessmon...

program locks files when they are in use...
Hello, I have the following problem I have acrobat 7.0 as viewer. I'm using TeXnicCenter 6.31 on a windows XP home PC (something which can make pdf-files, not really important). My problem is: Whenever I trie to compile the pdf in TeXnicCenter with the pdf opened in acrobat, I allways have some errors because adobe reader has locked the file. Is there any way you can ask windows to make that adobe acrobat reader DOES NOT lock the files it has opened? Thanks in advance... Plinius plinius@gmail.com wrote: > Hello, I have the following problem > > I have acrobat 7.0 as viewer...

When to use postgreSQL , when to use other
We are using Oracle and mySQL for web-applications I'm planing to use postgresql also. Maybe we will also use Cach`e . Does anyone using an other database-engines than postgresql also? What are your decision criterias to choose which db-engine for a certain project? e.g. less/more than x records in database , less/more than x select/DML-Staements per second reliablity, backup, replication... ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's ...

Used Cisco Used Switch Used Cisco Router Used Cisco Switch At LinkWaves Corp
Hello Guy. I just bought a cisco 7206VXR from http://www.linkwaves.com. Quick shipping fedex 3 days saver for $85. I think they are great Quick Ship Great Services Excelent Products For Quick Quote. Please visit here http://www.linkwaves.com/requestquote.asp For Quick Search. Please visit here http://www.linkwaves.com/productsearch.asp Their Contact is LinkWaves Corp 29980 Technology Drive, Suite 6 Murrieta, CA 92563 Tel: +1-909-725-9143 Fax: =1-707-221-3762 http://www.linkwaves.com sales(at)linkwaves.com ...

Using and HASP usb key to use a program under wine
Hello! I'm seeking for information on how to install the HASP key drivers under Wine. A DLL we're using requires its own HASP USB key plugged in the computer; this computer in running Windows 2003 but we'd like to switch to Linux. I've downloaded the WINE HASP drivers from Aladdin's site, and installed them, but the DLL still complains it cannot find the HASP drivers. I would like to know if someone ever tried to use that "WINE" driver on Aladdin's site. Do I still need to install the HASP4 drivers for Windows under wine? So far I could not ...

Defined but not used? But I am using it!
I can't figure this out. So in a templated class of mine I have the following. namespace menutree { static bool debug = false; } And in various parts of the code I have statements like. if (menutree::debug) { std::cout << "here" << std::endl; Everything compiles but I get the warning "warning: `bool menutree::debug' defined but not used" Can someone shed some light on this? Thanks! Travis wrote: > I can't figure this out. So in a templated class of mine I have the > following. > > namespace menutree > { > static boo...

File locking using threads
Hi, I am attempting to write a some code that spawns various threads. Each thread will need to access a common file and to ensure that this file is only written to by one thread at a time, it needs to be locked. However, I am having trouble even creating a test script to try out the logic, which is below. What happens is that both threads are able to acquire the lock, even though the first thread should have it and release it before the second thread is able to lock the file. Any assistance will be very gratefully received! Cheers Tim #!usr/bin/perl use strict; use threads; my $thr_1 = t...

Why index used/not used
Hello. Explain. I have table "traf_raw" contains field "sip_id" (integer). This field indexed with "CREATE INDEX traf_raw_sip ON traf_raw (sip_id)". Question. When I try to get different rows postgres use index with one "sip_id" and not use index with another "sip_id". I don't understand why it is happen, but with more complex queries Seq Scan is so slowly. Example. With "sip_id='19'" there many rows in table, with "sip_id='29'" there is no rows. cnupm=> ANALYZE traf_raw; ANALYZE cnupm=> EXPLAIN ANALYZE SELECT * FROM traf_raw WHERE sip_id='19' LIMIT 10 OFFSET 100000; QUERY PLAN --------------------------------------------------------------------------------------------------------------------- Limit (cost=5230.95..5230.99 rows=1 width=56) (actual time=2505.89..2505.89 rows=0 loops=1) -> Seq Scan on traf_raw (cost=0.00..5230.99 rows=10808 width=56) (actual time=0.04..2490.02 rows=10977 loops=1) Filter: (sip_id = 19) Total runtime: 2505.95 msec (4 rows) cnupm=> EXPLAIN ANALYZE SELECT * FROM traf_raw WHERE sip_id='29' LIMIT 10 OFFSET 100000; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------...

ActGen to use or not to use?
Hello, I was doing a project with Actel FPGA ex128 with Libero Platinum Eval version software. in my project I had to use some counters,Multiplexers etc. which I wrote myself. Now as I was a beginner I didnt use the ActGen. Is it worth the effort to write the code partly by using ActGen macros for counter and muxes and etc. Thanks Naimesh Naimesh wrote: > I was doing a project with Actel FPGA ex128 with Libero Platinum Eval > version software. > > in my project I had to use some counters,Multiplexers etc. which I > wrote myself. Good work. Writing your own code makes y...

To use or not to use CLOS
I must admit that I'm completely a newbie in Lisp, as I've been writing C and (some) C++ for years. I don't like the way in wich C++ resolves object programming, although sometimes I'm forced to use object oriented programming in C, in the same way as GTK+ does. Now I emprend a (personal) project and would like to start it from the very beginning in Lisp (my first project in this language). My simple question, and I want to ear answers from all you experts, is: do you recomend me CLOS or perhaps consider that using simple structure and Lisp facilities would be more than enough?...

Web resources about - To use locking or not to use it - comp.programming.threads

Mode-locking - Wikipedia, the free encyclopedia
s). The basis of the technique is to induce a fixed phase relationship between the longitudinal modes of the laser's resonant cavity . The laser ...

HOAXES: Facebook Is Not Locking Users’ Accounts March 20 For Profanity Or Discussing Religion
Fear not, Facebook users: Starting March 20, you are still more than welcome to discuss religion or use profanity to your heart’s content, although ...

End Region Locking (@EndRegionLock) on Twitter
Sign in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here End Region Locking @ EndRegionLock ...

Diferencial Torsen (Autoblocante) / Self-locking Torsen Differential - YouTube
Diferencial tipo TorSen de puente trasero Hecho en Autodesk Inventor 2009. Vean el remake http://www.youtube.com/watch?v=4g2KYO3cBgg&feature=watch_response ...

Teenager thwarts alleged car theft by locking himself in mother's BMW
Police have charged a man who allegedly tried to steal a Perth mum's BMW as her 17-year-old son sat in the passenger seat.

Locking in on space junk
Alan Kohler speaks to Dr Ben Greene, chief executive of Electro Optic Systems, an Australian company generating revenue from interstellar debris. ...

Locking in a fixed rate loan might be a smart move
Even though the Reserve Bank hasn't cut official interest rates since February, the cost of borrowing with fixed-rate home loans continues to ...

Cyber raiders hold Queensland firms to $3000 ransom by locking computer files
ALMOST 30 Australian businesses, including 12 in Queensland, have been held to ransom in the past week by cybercriminals who lock up their computer ...

Channel Nine and NRL close to locking in live Sunday afternoon football
Channel Nine have confirmed that live Sunday afternoon games are set to be a feature of the NRL schedule next season.

Lip-locking fun at celebrity spring break
Coachella is one of the world's largest festivals, and it's also the festival of choice for celebrities to go and let their hair down.

Resources last updated: 3/3/2016 5:25:39 AM