Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Operating System Practical Presentation Jonathan Arturo Alvarado Mata    1441616 Carlos Eduardo Triana Sarmiento 1412573 O...
What we did? We made the program of Bounded buffer producer-consumer. Our program use a thread for producer, and other thr...
Practical presentation Where is our code? Our code is in the file nachos/code/threads/threadtest.cc   How do we compile ou...
Producer Function semaphore mutex = 1;  semaphore empty = N;  semaphore full = 0;   void producer() {        while (1) {  ...
Bibliography <ul><ul><li>http://www.isi.edu/~faber/cs402/notes/lecture7.html </li></ul></ul><ul><li>  </li></ul><ul><ul><l...
Upcoming SlideShare
Loading in …5
×

Practical presentation

369 views

Published on

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

Practical presentation

  1. 1. Operating System Practical Presentation Jonathan Arturo Alvarado Mata    1441616 Carlos Eduardo Triana Sarmiento 1412573 Obed David Guevara Ibarra           1447478 Blog: http://os-ocj.blogspot.com/
  2. 2. What we did? We made the program of Bounded buffer producer-consumer. Our program use a thread for producer, and other thread for consumer.   What we use? We use 2 kinds of semaphores ... A two-valued or binary semaphore that implements mutual exclusion And the other kind of semaphore is a multiple-valued or counting semaphores that implements synchronized counts of shared resources
  3. 3. Practical presentation Where is our code? Our code is in the file nachos/code/threads/threadtest.cc   How do we compile our code? We open a terminal and go to /nachos/code Then we type: make This instruction will compile all our code of nachOS How do we execute our code? In the terminal we go to /nachos/code/threads/  Then we type: ./nachos This will execute our code
  4. 4. Producer Function semaphore mutex = 1;  semaphore empty = N;  semaphore full = 0;   void producer() {        while (1) {            P(empty);            P(mutex);            Product++;            V(mutex);            V(full);        }   } void consumer() {        while(1) {               P(full);               P(mutex);               V(mutex);               V(empty);               Product--;       }      } Consumer Function
  5. 5. Bibliography <ul><ul><li>http://www.isi.edu/~faber/cs402/notes/lecture7.html </li></ul></ul><ul><li>  </li></ul><ul><ul><li>http://black.goucher.edu/~kelliher/cs42/oct02.html </li></ul></ul><ul><li>  </li></ul><ul><ul><li>http://www.mitecnologico.com/Main/Mutex </li></ul></ul>

×