Search:

Type: Posts; User: hansel13

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,695

    It depends if I'm giving the path name in the...

    It depends if I'm giving the path name in the shell, or given just the command executable. Also, if there is piping or redirection, I call a different function.

    But I'll just show you the one for...
  2. Replies
    6
    Views
    1,695

    Great thanks. I got the signal handler to run,...

    Great thanks. I got the signal handler to run, and if I type sleep 5 &, it works and prints out when finished. However, if I type sleep 5 &, and then type in another command like ls or ps after it,...
  3. Replies
    6
    Views
    1,695

    background & with a report

    So right now my shell does everything fine, and this function runs in the background fine. However, I was wondering if there's a way for me to get a report printed to my screen shell when the...
  4. Thread: Makefile help

    by hansel13
    Replies
    4
    Views
    1,603

    We will see. My Dad is an engineer and works at...

    We will see. My Dad is an engineer and works at Intel, so I might just follow in his footsteps there. Really depends on what school I get into for my Masters and how life plays out. Thanks for your...
  5. Thread: Makefile help

    by hansel13
    Replies
    4
    Views
    1,603

    Thank you sir, it works now.

    Thank you sir, it works now.
  6. Thread: Makefile help

    by hansel13
    Replies
    4
    Views
    1,603

    Makefile help

    I want to change this command line compile code:
    gcc -Wall project.c -o outputFile -lposix4

    to the following makefile:




    CC = gcc
    DEBUG = -g
  7. Replies
    47
    Views
    15,965

    I got this figured out, thanks. Feel free to lock...

    I got this figured out, thanks. Feel free to lock this thread.
  8. Replies
    47
    Views
    15,965

    Well each producer thread writes exactly once....

    Well each producer thread writes exactly once. There's 20 producer threads, and 20 files. I don't care what order they go in, but they do what I want, which is producer a file ONCE.

    Maybe for the...
  9. Replies
    47
    Views
    15,965

    OK Well I almost have everything running, that's...

    OK Well I almost have everything running, that's the good news. The bad news is I really need this done tonight.

    The problem right now is that it seems like only one buffer is being used the...
  10. Replies
    47
    Views
    15,965

    Hey, if they pay is good, I'm always open. I just...

    Hey, if they pay is good, I'm always open. I just know 2 people personally who have taken the route I hope to take, and they are in excellent shape financially. So hopefully with hard work, I can get...
  11. Replies
    47
    Views
    15,965

    Wow, that stuff already blows me away just trying...

    Wow, that stuff already blows me away just trying to comprehend it. I'm actually more interested in moving into management eventually or even sales. I'm going to get my Masters in CS and my MBA. I...
  12. Replies
    47
    Views
    15,965

    I have set up the mutex as you mentioned....

    I have set up the mutex as you mentioned. However, I should have mentioned, for this assignment, I can't use conditional variables. That would definitely make things easier.. Instead I'm using...
  13. Replies
    47
    Views
    15,965

    This is very similar to what I did, except I...

    This is very similar to what I did, except I actually just dequeued inside the producer. I also got rid of that while loop in the producer like you pointed out. It was useless!

    Jeff, I sent you a...
  14. Replies
    47
    Views
    15,965

    YES I finally got it to work for just one buffer...

    YES I finally got it to work for just one buffer slot. Everything is working fine. The TA gave me some tips, apparently my linked list s, should be declared GLOBALLY.

    That and a few other things,...
  15. Replies
    47
    Views
    15,965

    OK, I fully understand that. But when I run the...

    OK, I fully understand that. But when I run the code without the pthread-join, I still don't get why the output only prints the producer twice like so:
    IN PRODUCER
    int = in1.txt
    int = in2.txt
    int...
  16. Replies
    47
    Views
    15,965

    Maybe I'm not understanding how creating pthreads...

    Maybe I'm not understanding how creating pthreads work, but when I use pthread_join and print the file name queue list inside each producer, it prints 19 file names, then 18 file names, then 17 file...
  17. Replies
    47
    Views
    15,965

    Just realized that you don't have my input files,...

    Just realized that you don't have my input files, so that could be why you're having a problem..


    How do I attach my files? I have them in a zip..
  18. Replies
    47
    Views
    15,965

    That's weird that you are getting seg faults, my...

    That's weird that you are getting seg faults, my code compiles and runs perfectly fine without any noticeable errors. But I'll check out what you have in the morning, thanks again!
  19. Replies
    47
    Views
    15,965

    YES! thank you, that's why my buffer was ever...

    YES! thank you, that's why my buffer was ever printing correctly. That solves a small problem, but better then nothing. I still am not getting the output I'm hoping for, but it was baffling me why...
  20. Replies
    47
    Views
    15,965

    Yeah the output order or aesthetically pleasing...

    Yeah the output order or aesthetically pleasing factor, really don't matter. The key is that each piece of text is read once and written once. So the output of my program should just show the content...
  21. Replies
    47
    Views
    15,965

    I probably should, but the thing is, if I take...

    I probably should, but the thing is, if I take out the while loops from the producer/consumer functions, AND I just use buffer[0] as my only slot... And change the pthread creating to what I had...
  22. Replies
    47
    Views
    15,965

    Yeah I'll keep that in mind, can't wait to...

    Yeah I'll keep that in mind, can't wait to graduate with this bachelors degree so I can start my Masters.

    I have my mutex and semaphore set up actually just like that, however when I implemented...
  23. Replies
    47
    Views
    15,965

    Well it won't store any of my file contents into...

    Well it won't store any of my file contents into the buffer, and right now, I'm have problems all together with my output.

    NOTE: The while loops in the consumer and producer functions isn't...
  24. Replies
    47
    Views
    15,965

    Right on, I changed my code to do exactly that. ...

    Right on, I changed my code to do exactly that.

    pthread_t producerVar[PRODUCERS];
    pthread_t consumerVar[CONSUMERS];

    for(i = 0; i < 20; i++)
    {
    ...
  25. Replies
    47
    Views
    15,965

    Teacher's specifications to use 20 producers and...

    Teacher's specifications to use 20 producers and 5 consumers. I'm not sure why these numbers were chosen, but I suppose it's to challenge us more.
Results 1 to 25 of 43
Page 1 of 2 1 2