mutlithreading question


 
Thread Tools Search this Thread
Top Forums Programming mutlithreading question
# 1  
Old 11-15-2006
Lightbulb mutlithreading question

i'm planning to write a simple application that utilizes multithreading. any suggestions on what application i can use? thanks.
# 2  
Old 11-15-2006
You said that you want to write the threaded application. What do you mean by use? Are you asking what library to use? If so, look at pthread.
# 3  
Old 11-15-2006
multithread question

i already know what library to use...my question is in what application(e.g. sorting, matrix addition and the likes) can i use multithreading...? what application can you suggest that would show the importance of multithreading. thanks.
# 4  
Old 11-15-2006
Hmm. Sounds like homework - see the forum rules.

Short answer - any task that has completely separate sub-tasks may benefit performance-wise by dividing the sub-tasks into separate threads of control - especially when the computer running the code has more than one cpu. ex: chat program - one thread talks to the internet socket, the other one interacts with the user window.
# 5  
Old 11-15-2006
I think is some sort of project.

Maybe I can give you the idea ( not more than that ).As you already know you have to use POSIX threads , pthreads .

What aplication , is better for you to wsho the importance of multithreading ?
I build myself an useful chat program.Where is multithreading ?

My chat program is composed in 3 part's . One main part ( in main() function ) for Internet socket connection ( .. ) , and to threads ( POSIX threads ) , one receives the data's ( strings from server ) and writes them to main window and the another POSIX thread ( pthread ) , using a loop for ( for(;Smilie ) , send data ( strings ) to server [ to be send to others clients by they client socket descriptor .. retain somewhere in a structure , or I don't know .. what do you want ..].


Clear enough ? The importance of multreading aplication ? You can use POSIX threads in a chat server / client aplication , for better exchange of information ( one thread to send , other to receive/write , and maybe other to show live time ./ clock . or something else ).


Cheer's ! Smilie
# 6  
Old 11-26-2008
can u plz mail me ur chat code using multithreading..plz..
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. AIX

df question

Hi, Can anyone please explain a little about df command. I have following question: Following example is showing % used as 4 where as total free blocks are 15.46 out of 16.00 MB blocks. df -m /test Filesystem MBblocks Free %Used Iused %Iused ... (5 Replies)
Discussion started by: itsabhi9
5 Replies

2. Hardware

question

How to add 3 moniters to a pc set up? (2 Replies)
Discussion started by: clicstic
2 Replies

3. UNIX for Dummies Questions & Answers

Another question???

20) What will the following command will do ? $cut -c 3-5 data1 a) Displays 3 char from 5th position b) Displays 2 char from 1st position. c) Displays 2 chars from 3rd position. d) Displays 5 chars from 3rd position (1 Reply)
Discussion started by: skyineyes
1 Replies

4. Shell Programming and Scripting

question about wc

Hey my friend was asking me if i knew a way to cout how many different words in a file. I told him no not off hand, but i was thinking about it, and i started to wonder also. I imagine this is probably pretty simple im just missing something, I keep confusing my self with how you would compair and... (16 Replies)
Discussion started by: yodadbl07
16 Replies

5. UNIX for Dummies Questions & Answers

mv question

Hello if I like to move file from defined directories system to new directory that not contained any directories system structure . But I like to create the same file system structure as source directory for example : I have 2 directories: foo1 and foo2 foo1 have directories and foo2 have... (2 Replies)
Discussion started by: umen
2 Replies

6. Solaris

vi question

Im trying to edit a 113 meg file in VI and i get the error TMP FILE TOO LARGE. Does someone know how to get around this? Thanks! (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

7. UNIX for Dummies Questions & Answers

Next Question:

what is the function of swap in linux why i have to create apsolutely a particion for the swap when i install (i installed lnx4win mandrake and made an automat. disk particion and the install program one of my disk partitions that was 3gb devidet in 4 one native 700mb swap 600mb and the others i... (1 Reply)
Discussion started by: user666
1 Replies
Login or Register to Ask a Question