Login|Contact Us
Question and Answer

Computer

Ask a Computer Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

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

 
Computer'sGuru's Avatar
  • Answered by:Computer'sGuru
  • Computer Software Engineer
  • Positive Feedback: 98.8 %
  • Accepted Answers: 370
Verified Expert
in Computer

Recent Feedback

Positive
fast response.
Positive
fast response
Positive
great
Positive
Thank you
Positive
Thank you
Positive
He responded quickly to my question with a solid answer.
Positive
Perfect as usual
Positive
thank you
Positive
thank you
Positive
Outstanding help!

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: 1129 days ago.
Category: Computer
Value: $14
Status: CLOSED

Accepted Answer

Picture
Expert:  Computer'sGuru replied 1129 days 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*IComputer'sGuru40241.1942318634

Expert TypeComputer Software Engineer
Category: Computer
Pos. Feedback: 98.8 %
Accepts: 370
Answered: 3/4/2010

Experience: Computer Engineer with lots of knowledge and skills

Ask this Expert a Question >
Customer replied 1129 days 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!

Picture
Expert:  Computer'sGuru replied 1128 days and 23 hours 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
Computer'sGuru40241.2450621875

 
Tweet

11 Tech Support Specialists are Online Right Now

Ask Your Question Now
Computer Questions Date Submitted
The last few days when using the computer to look up real estate, 3/28/2013
Using Incredimail to Export Data and Settings from old computer 3/28/2013
I scan quite a few magazine articles into my computer and store 3/28/2013
Brother DCP-167C Printer. Cannot get scanner to work. I 3/28/2013
I currently have a computer with an Asus M2A-VM Micro ATX motherboard 3/28/2013
unable to open pdf's in Browser 3/28/2013
Incoming phone calls get routed to my computer but my phone 3/28/2013
I cannot get my computer to recognize my scanner/printer. 3/28/2013
I have a new Toshiba P850 with Windows 8. When I typed some 3/28/2013
I am trying to use Nero 12 to transfer video from a Canon Video 3/28/2013
RSS
Next 10 >
Ask A Tech Support Specialist
Type Your Computer Question Here...
characters left:

Top Computer Experts

See More Tech Support Specialists

In The News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More
close
Find Expert answers related to your question.
Sign up using email
We will never post anything without your permission.
Already have an account? Sign in

Ask a Tech Support Specialist

Get a Professional Answer. 100% Satisfaction Guaranteed.
137 Tech Support Specialists are Online Now
Type Your Computer Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us
© 2003-2013 JustAnswer LLC