EssayNICE | 24/7 Homework Help

Essaynice Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

Assignment help 7736

by | Jun 24, 2023 | Posted Assignments

The system used a shared buffer that would accept blocks of characters from a measurement process P1 and forward blocks of data to the output process, P2.  The designer has written the following routines, one for P1 and one for P2.

      full = 0

      max = buffer size

          p1Generate( )                                          p2Transmit( )

      {                                                           {

P2

P1

head

buffer

while (full < max)                                   while (full > 0)

{                                                           {

      buffer(head) = anItem;                           anItem  = buffer(head);

      (head = head + 1) mod max;                  (head = head – 1) mod max;

      full++ ;                                                  full–;

}                                                           }

            }                                                           }

Occasionally the system either looses data or forwards garbage data.

Can you explain why?

Please propose (in detail) a way to fix the problem.  Modify the existing code as necessary.

Please show how your design solves the problem.

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

Open chat
1
Powered by essaynice
Hello! Welcome to to our whatapp support.
We offer READY solutions, HIGH QUALITY PLAGIARISM FREE essays and term-papers.

We are online and ready to help