Professional Documents
Culture Documents
Experiment 6
Experiment 6
Lab Exercise(s):
1. Write a program using pthread to concatenate the strings, where multiple
strings are passed to thread function.
Output:
2. Write a program using pthread to find the length of string, where strings
are passed to thread function.
Output:
Viva Questions:
1. Provide two examples in which multithreaded process provide an
advantage over single threaded solution.
1) A web server that services each request in a separate thread.
2) 2) A web browser with separate threads playing sound,
downloading a file, collecting user input, etc.
6. Which pthread function passes the value from thread function to main
function.
The pthread_create() routine permits the programmer to pass one
argument to the thread start routine.