GithubHelp home page GithubHelp logo

ycalex11 / multhread-mulprocess- Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 13 KB

this is an example with C programming for multiple process and threads parallel matrix multiplication sum

Makefile 3.19% C 96.81%

multhread-mulprocess-'s Introduction

This project is using multiple processes/threads and their inter-process/thread communications respectively with C
Testing create processes/threads, shared memory and solve the critical section problems. 
Key points: mutual exclusion(semaphores), consumer and producer. Consumer : parent process, Producer: child process and child-thread


The whole projects has two parts mul-processes and mul-threads. Read two martixes from two txt file, and calc matrix multiplication sum by mul-processes/threads.
To test the programm: please see readMe in each folder 

For process communication uses shared memory, matrix A, B, C and subtotal are created in parent process before any child processes are created
For inter-thread communication, because threads share memory that means don’t need to explicitly create shared memory for arrays A, B and C, and subtotal. I declared the matrix A, B,C as global variables in parent process, and create the memory. 

multhread-mulprocess-'s People

Contributors

ycalex11 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.