Skip to content

Implement with semaphores for project 4 #2

@khashf

Description

@khashf

Current solution is done by putting #pragma omp barrier directives inside corresponding function of each threads

#pragma omp parallel sections default(none) shared(NowGrainHeight, NowNumDeer)
        {
            #pragma omp section
            {
                Grain();            
            }
            #pragma omp section
            {
                Deer();
            }
            #pragma omp section
            {
                Watcher();
            }
        } // omp parallel sections

When have time, try to solve with semaphores.
CS475 instructor, Matthew Meyn, confirmed that this can be done with semaphores.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions