How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Computer'sGuru Your Own Question

Computer'sGuru
Computer'sGuru, Computer Software Engineer
Category: Computer
Satisfied Customers: 9668
Experience:  Computer Engineer with lots of knowledge and skills
29751445
Type Your Computer Question Here...
Computer'sGuru is online now
A new question is answered every 9 seconds

6) Describe the purpose of a buffer and give an example from

Customer Question

6) Describe the purpose of a buffer and give an example from your own experience where its use clearly benefits system response.
7) Rewrite each of the following arithmetic expressions to take advantage of concurrent processing and then code each? use the terms COBEGIN and COEND to delimit the sections of concurrent code.
a. A + B * R * Z - N * M + C²
b. ( X * ( Y * Z * W * R ) + M + N + P )
c. ( ( J + K * L * M * N ) * I )
Submitted: 4 years ago.
Category: Computer
Expert:  Computer'sGuru replied 4 years ago.
6) Describe the purpose of a buffer and give an example from your own experience where its use clearly benefits system response.
Purpose of a buffer:
Buffers are used whenever data is received in sizes that may be different than the ideal size for the hardware or software that uses the buffer. For example, a 64-bit processor on a 16-bit bus may have a buffer to hold 16-bit requests until they equal 64-bits. Another use of buffers is to keep hardware from getting overwhelmed with information. In that scenario, you use a large buffer to hold data until a device or program is ready to receive it, instead of just pushing it onto a device that might not be ready. Buffers must be optimized in size to work efficiently for the purpose they are designed.
An example from your own experience:
When letters are typed on keybaord in MS DOS program (Like a command prompt), these are line buffered until carriage return is pressed. The keyboard buffer stores the data temporarily and this data is transferred to the input output controller when it has a meaning.
This increases the responsiveness of the command prompt. If there is no keyboard buffer, the over all responsiveness would be decreased. As each letter would be passed to controlller for processing and the control would revert back to keyboard involving overheads.


7) Rewrite each of the following arithmetic expressions to take advantage of concurrent processing and then code each? use the terms COBEGIN and COEND to delimit the sections of concurrent code.

a. A + B * R * Z - N * M + C²

COBEGIN
T1 = B*R*Z
T2=N*M
T3 = C*C
COEND
T4=A+T1
T5 = T2+T3
ANS = T4-T5

b. ( X * ( Y * Z * W * R ) + M + N + P )

COBEGIN
T1 = Y*Z
T2 = W*R
T3 = M+N
COEND
COBEGIN
T4 = T1*T2
T5 = P+T3
COEND
T6 = X*T4
ANS = T6+T5

c. ( ( J + K * L * M * N ) * I )

COBEGIN
T1 = K*L
T2 = M*N
COEND
T3 = T1*T2
T4 = J+T3
ANS = T4*I

Edited by Computer'sGuru on 3/4/2010 at 4:39 AM EST
Computer'sGuru, Computer Software Engineer
Category: Computer
Satisfied Customers: 9668
Experience: Computer Engineer with lots of knowledge and skills
Computer'sGuru and 12 other Computer Specialists are ready to help you
Customer: replied 4 years ago.
Is there anyway to explain how you came up with the answers for question 7 a- c? I want to actually learn in the process :) Thanks!
Expert:  Computer'sGuru replied 4 years ago.
Hi,
First modify and correct 7a to
a. A + B * R * Z - N * M + C²

COBEGIN
T1 = B*R
T2=N*M
T3 = C*C
COEND
T4=T1*Z
T5=T4+A
T6 = T2+T3
ANS = T5-T6

Everything else is fine


it is simple, you need to find out the operations which are not dependant on other.
e.g.
in
a. A + B * R * Z - N * M + C²

we can decompose the operations on the basis of precedence as follows
(A) + (B * R * Z) - (N * M) + C²

(A) + ((B * R) * Z) - (N * M) + (C*C)
Now the operand in parenthesis can be operated parallely
There are three such sets (B * R), (N * M) and (C*C)
((B * R) * Z) cannot be proccessed parallely as product of ((B * R) * Z) depands on the product of (B * R)

Process these three parallely as

COBEGIN
T1 = B*R
T2=N*M
T3 = C*C
COEND

Store their results in temporary variables T1, T2, T3
perform aother calculation sequentially as they depand on each other (The output of one becomes the input of another)

T4=T1*Z
T5=T4+A
T6 = T2+T3
ANS = T5-T6


Edited by Computer'sGuru on 3/4/2010 at 5:52 AM EST

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
  • I am very happy with my very fast response. Eric is very knowledgeable in the subject area. Thank you! RP Austin, TX
  • Hi John, Thank you for your expertise and, more important, for your kindness because they make me, almost, look forward to my next computer problem. After the next problem comes, I'll be delighted to correspond again with you. I'm told that I excel at programing. But system administration has never been one of my talents. So it's great to have an expert to rely on when the computer decides to stump me. God bless, Bill Bill M. Schenectady, New York
  • The Expert answered my Mac question and was patient. He answered in a thorough and timely manner, keeping the response on a level that could understand. Thank you! Frank Canada
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
 
 
 

Meet The Experts:

 
 
 
  • Andy

    Computer Consultant

    Satisfied Customers:

    5311
    11yr exp, Comp Engg, Internet expert, Web developer, SEO
< Last | Next >
  • http://ww2.justanswer.com/uploads/EN/Engineer1010/2012-6-9_132423_jaj12a.64x64.jpg Andy's Avatar

    Andy

    Computer Consultant

    Satisfied Customers:

    5311
    11yr exp, Comp Engg, Internet expert, Web developer, SEO
  • http://ww2.justanswer.com/uploads/BA/barrenrock/2011-10-19_215925_JamesJAFinal.64x64.jpg James's Avatar

    James

    Sr. Computer Support Expert

    Satisfied Customers:

    8376
    20 years of experience building, fixing and servicing PCs and operating systems.
  • http://ww2.justanswer.com/uploads/zeyank/2009-09-26_154244_P8110079.png Ryan H.'s Avatar

    Ryan H.

    Computer Support Specialist

    Satisfied Customers:

    1741
    A+ Certified Technician - 10 Years experience working with all types of computer systems.
  • http://ww2.justanswer.com/uploads/JA/jadedangel57/2011-11-8_193134_janenewsm.64x64.jpg Jane Lefler's Avatar

    Jane Lefler

    Sr Prog Analyst / Technician

    Satisfied Customers:

    0
    Computer Programmer / Technician/ Consultant 16+ years
  • http://ww2.justanswer.com/uploads/RO/robmpreston/2013-9-23_233814_mijiFZm.64x64.jpg RPI Solutions's Avatar

    RPI Solutions

    Support Specialist

    Satisfied Customers:

    3476
    5+ Years in IT, BS in Computer Science
  • http://ww2.justanswer.com/uploads/BA/barunrath/2012-7-5_201954_Profilepic2.64x64.jpg B. Rath's Avatar

    B. Rath

    Computer Support Specialist

    Satisfied Customers:

    8671
    Certified Computer/Networking Support Specialist.
  • http://ww2.justanswer.com/uploads/FS/fszcze/2012-6-18_181848_500test.64x64.jpg Frederick S.'s Avatar

    Frederick S.

    Computer Specialist

    Satisfied Customers:

    7240
    Computer technician and founder of a home PC repair company.
 
 
 

Related Computer Questions