folder Tahribat.com Forumları
linefolder C - C++
linefolder C (Thread,Semaphore) Bilgisayar-Yazılım Mühendisleri Arkadaşlar



C (Thread,Semaphore) Bilgisayar-Yazılım Mühendisleri Arkadaşlar

  1. KısayolKısayol reportŞikayet pmÖzel Mesaj
    Android
    Android's avatar
    Kayıt Tarihi: 12/Aralık/2003
    Erkek

    Evet arkadaşlar c ile ilgili bir problem var hakim olanlar yardımcı olabilir mi?

     

    Problem: Implementation of producer-consumer concept, using multiple threads.

    A. You are asked to implement a banking application, details of which are as follows:

    1) Customer threads produce deposit or credit transactions “customer id, deposit/debit, amount”, using a buffer.

    2) Bank threads process the customer credit/debit transactions, if exist ın the buffer.

    3) For each new customer transaction, a new bank thread is created to process the transaction.

    4) Customer transactions happen randomly in interval of 1-10 seconds.

    5) Allow application to run for 100 seconds.

    6) Assume shared buffer maximum capacity is 1000 entries.

    7) Establish atomicity for buffer updates and related shared variables.

     

    İmplementation notes: You may represent buffer in any way you like, dynamically or statically.

    Hint:

    (1) Use proper variables to act as pointers to control the buffer update by the producer and consumer.

    (2) Use semaphores to allow correct updates

    B. Use pipe instead of the shared buffer to do the same. This time the customer transactions are created by one process, the processing of the customer transactions is done by another. Each transaction is created and processed by a different thread.

     

     

     


    (M.Sc) Master Science, Electronics and Communication Engineering
  2. KısayolKısayol reportŞikayet pmÖzel Mesaj
    herlocksholmes
    herlocksholmes's avatar
    Kayıt Tarihi: 16/Şubat/2014
    Erkek

    En azindan bir seyler yapsaydin, nerede takildin? Eger hepsinde takildiysen tek tek calisman gereken konular yaziyor orada hocam.


  3. KısayolKısayol reportŞikayet pmÖzel Mesaj
    whopper
    whopper's avatar
    Kayıt Tarihi: 26/Haziran/2008
    Erkek

    Bu chapteri anladıktan sonra çözebiliyor olman lazım problemi.

    http://pages.cs.wisc.edu/~remzi/OSTEP/threads-sema.pdf

     

     

    whopper tarafından 09/Nis/19 09:02 tarihinde düzenlenmiştir

    “The Fourteenth Book is entitled, "What can a Thoughtful Man Hope for Mankind on Earth, Given the Experience of the Past Million Years?" It doesn't take long to read The Fourteenth Book. It consists of one word and a period. This is it: "Nothing.” ― Kurt Vonnegut, Cat's Cradle
  4. KısayolKısayol reportŞikayet pmÖzel Mesaj
    whopper
    whopper's avatar
    Kayıt Tarihi: 26/Haziran/2008
    Erkek

    edit. 

    whopper tarafından 09/Nis/19 09:01 tarihinde düzenlenmiştir

    “The Fourteenth Book is entitled, "What can a Thoughtful Man Hope for Mankind on Earth, Given the Experience of the Past Million Years?" It doesn't take long to read The Fourteenth Book. It consists of one word and a period. This is it: "Nothing.” ― Kurt Vonnegut, Cat's Cradle
  5. KısayolKısayol reportŞikayet pmÖzel Mesaj
    TheM4D
    TheM4D's avatar
    Kayıt Tarihi: 26/Mart/2016
    Erkek

    neresine yardımcı olunacak

  6. KısayolKısayol reportŞikayet pmÖzel Mesaj
    end
    end's avatar
    Kayıt Tarihi: 16/Ekim/2016
    Homo
    TheM4D bunu yazdı

    neresinde yardımcı olunacak

    Problemin çözüm ve teslimi kısmında

     

    end tarafından 09/Nis/19 14:13 tarihinde düzenlenmiştir

    0x0480 takilin madem