Programming :: Create Unique Multithread Algorithms For Every Particular Program?

Aug 6, 2010

Since 2005 when DualCore CPUs came out, you need to create unique multithread algorithms for every particular program? Or you have patterns?

View 4 Replies


ADVERTISEMENT

Programming :: Memory Corruption While Parsing In Multithread Program?

Aug 28, 2009

language: C
OS: linux

I wrote a multithread program(approx 1000 thread have to run) and each thread has to parse a file(for each thread there is one file, ex:thread1 has to parse file1 and thread2 has to parse file2 like this....). I wrote "parse" program as follows. It is working well, if i create 50 threads. but if i run more than 200 thraeds Im getting doublefree corruption as follows:

Code:

*** glibc detected *** ./simulator: double free or corruption (fasttop): 0xb70007b0 ***

And some time I am getting parsing problem and error af follows:

Code:

powersetting.6607:1: parser error : Start tag expected, '<' not found (where powersetting.6607 is file name, when i check this file it is started with '<').

parse program as follows:

Code:

void parse_first(char* filename, int portnum, struct Poweroff *Powerptr1)
{
struct Poweroff *Powerptr;
Powerptr = Powerptr1;

[code]....

View 1 Replies View Related

Programming :: Unable To Use Sleep() In Plugin Functions In Multithread Program?

Oct 11, 2009

I wrote a multithread program(c++,gnu gcc). it contains a main program and plugins. some functions in plugins use sleep(). Using these functions in threads cause freezing program. in other word thread sleeps but dosn't wake. How can i use sleep() in my plugin functions without this problem?

View 3 Replies View Related

Programming :: Use Big O - Big Omega - And Big Theta To Find Running Time Of Algorithms ?

Mar 16, 2011

How to use Big O, Big Omega, and Big Theta to find running time of algorithms because it looks confusing which one of them to use..

View 3 Replies View Related

Programming :: Bash Script Multithread In Group Of 3?

Jun 1, 2010

I Have an script like

./bang 1
./bang 2
./bang 3
./bang 4

[code]...

and i wanna execute him in groups of 3 , i mean he execute bang 1 , bang 2 and bang 3 after it finish the next 3 commands it will be executed and so on , in groups of 3.

View 3 Replies View Related

General :: Create A Unique Zip With Only Public Subdirectory?

Apr 15, 2010

I've a lot of websites (100+ directories) I want to create a unique zip with only public subdirectory.

My structure now is like:

- Site 1
--- app
--- tmp
--- log
--- public

[Code]...

View 4 Replies View Related

Programming :: Create A Program In C++ In Opensuse 11.4?

Mar 28, 2011

I`ve just installed opensuse 11.4 and i dont know how to write and compile my programs
is there a compiler like turbo c++ to use??

View 5 Replies View Related

Programming :: Create A Screen Capture Program With Xvfb Server?

Jan 4, 2010

I am trying to create a screen capture program with Xvfb server, ImageMagick and Khtml2PNG. I seem to be having some issues and was hoping someone could help me out. I have everything installed and working on a centos WHM/CPanel system and am able to generate the screen shots and save them to root folder from shell with the following commands.

Xvfb :2 -screen 0 1024x768x24&
export DISPLAY=localhost:2.0
khtml2png2 --sw 200 --sh 150 http://www.example.com example.png
It works 100% fine when you run it from shell.

[Code]...

View 4 Replies View Related

Programming :: How To Bind Thread To Specific Thread In Multithread Application?

Dec 25, 2010

I am going to use "pthread_setaffinity_np" to bind a thread to a specific core. My application has two threads. I have used mutex to assign a specific id to each thread and then bind that thread to a core different from another core. but it seems that the os assigns both thread to one core.What should I do to bind each thread to a specific core?

View 4 Replies View Related

Programming :: Unique The Content Within A String With Seperator?

May 17, 2011

I am green on linux script. I would like to perform the following operation:String a: 1,2,3,2,4,How to unique this string to become: 1,2,3,4,?

View 3 Replies View Related

Programming :: Symbolic Links Permissions Unique

Feb 20, 2011

Is it possible to change permissions on symbolic links using the c programming language or any other for that matter? Now, I know what you are thinking, so let me provide some background.I know permission are meaningless. I know that typically permissions are set to 777.The project that I am working on does the following. On HPUX systems, a c binary recreates missing links from a stored image of the filesystem, if they are missing. The problem is that the permissions are 700 when the links are restored (should be 777). The c method to restore the symbolic links is "symlink()" which takes as its argument the target and linkname.The client wants 777 on the links. I do not know why the permissions are different. I would like to know if I can change permissions on the link by code, changing the mode?

Is this a bug somewhere in HPUX 10,x and 11.x os or "symlink" c library method, who knows?There are groups of nodes running HPUX, for example groupA, groupB etc.The problems appears in groupA but not in groupB. Seems the nodes are configured differently.While I would love to know if this is a configuration issue, it appears that way to me, there would be little I could do about it. Politics you know, but that's okay, in time someone would listen.

View 3 Replies View Related

Programming :: Create Large Buffer In Program To Send And Eceive On Another Pc More Than 4096 Bytes

Feb 9, 2011

create a large buffer in my program so that I can send, and then receive on another pc, more than 4096 bytes (this seems to be the default for the serial port). I thought this might work:

[code]...

View 9 Replies View Related

Programming :: Create A Separate Thread For Program Which Basically Polls Using The Read Command?

Sep 28, 2010

I'm trying to create a separate thread for my program which basically polls using the read command. However this new thread seems to block the main thread, anyone know why this could happen.

In main I call this function pthread_create(&mainEventThread, NULL, GenericEventThread, NULL);

which calls
/*New threads start function */
void *GenericEventThread()
{
short int i, nError = -1;

[Code]...

I've used pthread_self to check that a new thread is being created, so why is the while loop in one thread blocking the main thread from running, I haven't used the join function anywhere in my code.

View 2 Replies View Related

Programming :: Create A RS232 C Program That Executes A Series Of Commands Down The Line To A Robot?

Jan 5, 2011

I am trying to create a RS232 C program that executes a series of commands down the line to a robot. Everything seems to work fine, except any sequential write to the serial port. At first I thought it was the UART's buffer being filled too fast, but even with a 50 uS delay it still throws the error.

Here is my code:

Code:
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/signal.h>
#include <sys/types.h>

[Code]...

View 1 Replies View Related

Programming :: Updating A Sequence Of Datetimes In Fields With Unique Contrains

Mar 14, 2010

I am faced with the following problem; I need to update all fields of type datetime without ... with the following sort data:01-01-2010 12:10:30.256 - this is just an example.these fields are restricted with a unique constrained. My question is how can I generate the above sort data, especially the last three numbers with leading point. After that how can I update a table with existing data with this newly generated data so that the fields really do carry unique data.As you probably can read out of my question, I read through the help in pgAdmin and came as far as generating date, maybe datetime but not the .123 number. And a little insert script I found in the help, that I modified as UPDATE resulted in updating only the last generated data in all required fields.

View 7 Replies View Related

Programming :: Create A Simple Program With Will Continually Read Input From The User Until They Enter A Blank Line?

Apr 6, 2011

basically i have to create a simple program with will continually read input from the user until they enter a blank linei know how to read in certain input but not sure how to get it continually in a loop

View 2 Replies View Related

Ubuntu :: Dosfsck "Unable To Create Unique Name"

Sep 5, 2010

I have an Archos 605 media player that seems to have become corrupted, so I'm trying to run fsck on it. It mounts as a FAT32 hard drive, so I ran

Code:
sudo dosfsck -a

and this is what I got:

Code:
dosfsck 3.0.7, 24 Dec 2009, FAT32, LFN

There are differences between boot sector and its backup. Differences: (offset:original/backup) 65:03/00 Not automatically fixing this. Unable to create unique name

View 4 Replies View Related

Programming :: Multiple Input Into Seq Command From Pipe - Single Column Unique Numbers

May 13, 2011

Have this script which is reading in a series of files, one at a time with while-do-done loop, each file goes through various greps/awk's where this info is then saved to various files for later use. i.e....

Script is being run on Linux Red Hat,

In one of the grep/awk's the output (currently) are 2 columns (min max), i.e....| awk '{print $1, $2}' | sort -u which outputs (e.g.)

The number of "min max" pairs varies from file to file. Want to output a single column of unique numbers from the min max pairs & get the number of them for input to a file...i.e...

Where <PROCESS> is some process/technique that will generate a single column of integers (increment of 1) to pipe into the next one (sort -u)

i.e. (example from above)

Have tried command seq - only works for single pair input i.e.

Is there any command like seq etc which will output a single column based on a input of min max numbers (increment 1) to pipe onwards to next command?

View 4 Replies View Related

General :: Recovery Algorithms For GPFS(IBM) ?

Mar 21, 2010

some good websites or sources from where I can get recovery algorithms for GPFS(General Paralle File Sytem)..an IBM product?

View 1 Replies View Related

General :: Create A Program File For A New Program?

Mar 8, 2011

How do I create a program file for a new program?

View 1 Replies View Related

Programming :: Create A Message Forwarder Program That Receive A Message On Port A And Pass It On T Port B?

Sep 6, 2010

We are trying to create a message forwarder program that receive a message on Port A and pass it on t Port B. Also receive a message from Port C and Pass it on to Port D as follows.

[Code]...

View 4 Replies View Related

Ubuntu Servers :: Does 10.04 Support Multithread On Mysql 32 Bit?

Jun 18, 2010

does ubuntu 10.04 support multithread on mysql 32 bit?

View 8 Replies View Related

Programming :: HUGE Files - Compare A List Of Patterns From One File And Grep Them Against Another File And Print Out Only The Unique Patterns?

Aug 13, 2010

I am trying to compare a list of patterns from one file and grep them against another file and print out only the unique patterns. Unfortunately these files are so large that they have yet to run to completion. Here's the command that I used:

Code: grep -L -f file_one.txt file_two.txt > output.output Here's some example data:

Code:
>FQ4HLCS01BMR4N
>FQ4HLCS01BZNV6
>FQ4HLCS01B40PB
>FQ4HLCS01BT43K
>FQ4HLCS01CB736
>FQ4HLCS01BU3UM
>FQ4HLCS01BBIFQ

how to increase efficiency or use another command?

View 14 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Programming :: Open Or Run A File/program Through A C++ Program

Jan 15, 2010

Ok so Basically i have 2 questions

1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux

Code:

2. i need to know how to run/execute/open a file in a c++ program im using and its not working

Code:

View 4 Replies View Related

Ubuntu :: Best Program To Create A Flier?

Oct 12, 2010

I'm looking to create a small business flier with some graphics on Ubuntu. Whats the best program that I can use?

View 4 Replies View Related

Debian :: Program To Create Databases Graphically?

May 31, 2011

Is there any program to create databases graphically? Something like Glom maybe?

View 3 Replies View Related

Ubuntu :: Create A Shortcut To Run A Program On Terminal?

Jul 7, 2010

I want to create a shortcut to run a program called RoomEqWizard but the only way I know how to run the program is to open a terminal and type the location to where the program is and call the program file. I already tried creating a shortcut on the main menu but I get a "error creating the child process for this terminal" message every time...

View 1 Replies View Related

Ubuntu :: Draw Program To Create Patents?

Dec 23, 2010

I need a program (to draw or paint patents like the example below
Example:
http://www.google.com./patents?id=-K...page&q&f=false

I remember that the Word version of Windows XP had tools to create drawings but I can not find (or help) equal tools in Ubuntu Ooo.
Also, Windows has the "Paint" program that I used (pasting Word drawings) to erase, create mirror-effects, etc

Can somebody recommend me a good program (not CAD way) for simple drawings for patents?

View 5 Replies View Related

Ubuntu :: Program Cannot Create Files/folders?

Jul 1, 2011

I am running the new Natty install of Ubuntu. I always seem to have this particular problem, particularly with any ubuntu/kubuntu installs, but not other distros.

Basically, I'm trying to run a program -- a text-based game server. The server needs to be able to create new folders and write and delete files within its own directories in order to work.

However, no matter what I try to set in permissions, the program always spits out errors saying it was denied. I have set the directories so that any user/program can write/delete in them, and it still doesn't work.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved