12 Discussion / Question Topics
Remove Filter
|
|
Hi All, I am trying some experiments with pthread scheduling policies. I have a couple of apps and within all these apps, I set the thread policy to SCHED_RR and I set the priority to MAX - 1. Now, I see that the CPU utilization as reported by top for … |
|
can anyone help me in making a c program for displaying the grades(A(>60),B(45>b<60),C(30>c<45),F(fail)) of students in the form of histograms and for each grade calculation and histogram we need to use pthreads!!! so that it satisfies parallel processing!! |
|
In a past prac. exam for an algorithm course I'm doing is the challenge below, and their are no solutions but it seems like a really interesting one to solve. Can someone please help and point me in the right direction, I would like to try this on my own, … |
|
The assignment is to implement the Banker's Algorithm using pthreads and mutex locks. We implemented the Banker's Algorithm and it works fine. When we began implementing the pthreads and mutex locks we ran into problems. We know that each process is a thread, and that the mutex lock is acquired … |
|
Hi people. I wonder how I can free the pthreads' allocated memory? #include <pthread.h> #include <stdio.h> #include <stdlib.h> #define NUM_OF_THREADS 10 void* print_thread_id(void* tid) { printf("Greetings from thread %d\n", (*(int*)tid)); pthread_exit(NULL); } int main(int argc, char* argv[]) { pthread_t threads[NUM_OF_THREADS]; int status, i; int* n_thread; for(i = 0; i < … |
|
My basic problem is that I'm having a hard time implementing a Pthread that consists of a round robin dequeuing 4 arrays consisting of ints. Followed by a Pthread that creates random numbers with which to enqueue them with. I've written most of the code for the queue itself and … |
|
Hi I'm trying to create a program that gathers data from some ADC connected and do some averaging on the data. It's build up around classes containing systeminterface and sensors making a datamodel. The program is pretty big, but has worked intil implemention of pthreads I wanted to create a … |
|
All I have to do is take an array of n integers and run p threads to sort equally divided p blocks of the same and finally merge them. There is occuring some problem in my code. If I run the threads one by one, by using pthread_join's before next … |
|
I am using a) Linux b) Pthreads I want to write a program, with two pthreads, to cater for two queues of people. People arrive at each queue at a random interval of 1 - 10 seconds. Each time a person arrives, print out the number of people in each … |
|
hello im new to linux programming and i am experiencing a bit of diffuclty with pthreads...basically the pthread_create() function in my code below i tend to pass an integer variable as the argument for my runner() function but i get a warning and an error..i have tried several ways of … |
|
I'm working on a project that utilizes producers and consumers for an operating systems class. Each producer and each consumer will be its own thread. The producers will generate records that will be stored in a global buffer, in which the consumer will then access to use the data. I … |
|
Can anyone help me improve my source code below? I tried fixing it but apparently, there's not much success. [CODE] #define NUM_THREADS1 1 void *go_to_website2(void *program); void *go_to_website1(void *program) { char* str[3]; str[0] = (char *)program; str[1] = "http://www.google.com"; //supposedly 2nd website to go to str[2] = '\0'; char* new_prog … |
The End.