Search:

Type: Posts; User: brandon236

Search: Search took 0.01 seconds.

  1. Drawing tangents for a bezier curve in OpenGL

    I'm currently trying to draw a bezier curve using 4 control points. I'm currently drawing the curve using the cubic equation in a for loop where my t value increments by 0.1 each time:


    for...
  2. Replies
    10
    Views
    7,144

    I actually didn't use that code. The code at the...

    I actually didn't use that code. The code at the end of my post was given to me as part of the first come first serve algorithm and I added that for loop at the top. I know how priority scheduling...
  3. Replies
    10
    Views
    7,144

    I'm just trying to figure everything out and it's...

    I'm just trying to figure everything out and it's very confusing. So what I want to happen is I want to know when the task has arrived and when it has arrived I want to insert it into the linked...
  4. Replies
    10
    Views
    7,144

    So then could I do something like this? ...

    So then could I do something like this?


    if (tasks[current_tick].arrival_time <= current_tick + 1){
    nodes[current_tick].priority = tasks[current_tick].priority;
    ...
  5. Replies
    10
    Views
    7,144

    I'm still confused over how to store a task in a...

    I'm still confused over how to store a task in a linked list. So if a task arrives then I want to put it in my ready queue and place these tasks in the linked list based on their priority number....
  6. Replies
    10
    Views
    7,144

    Implementing priority CPU scheduling.

    I need to implement a non-preemptive priority scheduling in C. I'm having a few problems figuring out how this works. Here's what I have so far:


    void priority_scheduling()
    {
    int...
  7. Replies
    1
    Views
    2,287

    How to use pthread_cond_wait() in c.

    So in my code, I'm adding and removing items from a bounded buffer and if an item cannot be added or removed then the code waits. This is the wait I'm using for add.


    void add_to_buffer(int...
  8. Replies
    2
    Views
    2,940

    Ok so I found out that operand is not an integer...

    Ok so I found out that operand is not an integer but the address to an integer. So I guess my question is how do I pass in the actual integer instead of the address?
  9. Replies
    2
    Views
    2,940

    Adding items to a bounded buffer in C

    So I'm trying to write a program that adds items to a bounded buffer:


    #include <pthread.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include "bbuffer.h"
  10. With circular buffers, I can see that it's like a...

    With circular buffers, I can see that it's like a queue where if you remove a value, it'll be the first one in the queue. The problem with my implementation is that I'm using a type of stack which...
  11. One last thing. So for removing and adding...

    One last thing. So for removing and adding values, I'm supposed to add them in the next available "in" position and remove them from the next available "out" position. What does that mean? I also...
  12. Adding and removing items from the bounded buffer (producer/consumer problem).

    I'm trying to write a program in C where I remove, add, and initialize a bounded buffer for the consumer/producer problem. Here's what my bounded buffer program looks like:

    #include <pthread.h>...
Results 1 to 12 of 12