⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page49.html

📁 Data Structures And Algorithms With Object-Oriented Design Patterns In Python (2003) source code and
💻 HTML
字号:
<HTML><HEAD><TITLE>A Simplified Model of the Computer</TITLE></HEAD><BODY bgcolor="#FFFFFF"> <a href="../index.html" target="_top"><img src="../icons/usins.gif" alt="Logo" align=right></a><b>Data Structures and Algorithms with Object-Oriented Design Patterns in Python</b><br><A NAME="tex2html1766" HREF="page50.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html1764" HREF="page36.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html1758" HREF="page48.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html1768" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H1><A NAME="SECTION002200000000000000000">A Simplified Model of the Computer</A></H1><A NAME="secmodelsimplified">&#160;</A><P>The detailed model of the computer given in the previous sectionis based on a number of different timing parameters-- <IMG WIDTH=35 HEIGHT=14 ALIGN=MIDDLE ALT="tex2html_wrap_inline57635" SRC="img7.gif"  >,  <IMG WIDTH=33 HEIGHT=14 ALIGN=MIDDLE ALT="tex2html_wrap_inline57637" SRC="img8.gif"  >,  <IMG WIDTH=16 HEIGHT=15 ALIGN=MIDDLE ALT="tex2html_wrap_inline57647" SRC="img10.gif"  >,  <IMG WIDTH=16 HEIGHT=10 ALIGN=MIDDLE ALT="tex2html_wrap_inline57649" SRC="img11.gif"  >,  <IMG WIDTH=15 HEIGHT=12 ALIGN=MIDDLE ALT="tex2html_wrap_inline57651" SRC="img12.gif"  >,  <IMG WIDTH=16 HEIGHT=13 ALIGN=MIDDLE ALT="tex2html_wrap_inline57653" SRC="img13.gif"  >, <IMG WIDTH=16 HEIGHT=14 ALIGN=MIDDLE ALT="tex2html_wrap_inline57655" SRC="img14.gif"  >,  <IMG WIDTH=26 HEIGHT=14 ALIGN=MIDDLE ALT="tex2html_wrap_inline57659" SRC="img16.gif"  >,  <IMG WIDTH=42 HEIGHT=14 ALIGN=MIDDLE ALT="tex2html_wrap_inline57661" SRC="img17.gif"  >,  <IMG WIDTH=29 HEIGHT=14 ALIGN=MIDDLE ALT="tex2html_wrap_inline58033" SRC="img126.gif"  >, and  <IMG WIDTH=18 HEIGHT=14 ALIGN=MIDDLE ALT="tex2html_wrap_inline57695" SRC="img31.gif"  >.While it is true that a model with a large number of parametersis quite flexible and therefore likely to be a good predictor of performance,keeping track of the all of the parameters during the analysisis rather burdensome.<P>In this section, we present a simplified model which makes theperformance analysis easier to do.The cost of using the simplified model is that it is likely tobe a less accurate predictor of performance than the detailed model.<P>Consider the various timing parameters in the detailed model.In a real machine, each of these parameters is a multipleof the basic clock period<A NAME=861>&#160;</A>of the machine.The clock frequency<A NAME=862>&#160;</A>of a modern computer is typically between 500&nbsp;MHz and 2&nbsp;GHz.Therefore, the clock period is typically between 0.5 and 2&nbsp;ns.Let the clock period of the machine be <I>T</I>.Then each of the timing parameters can be expressed as an integermultiple of the clock period.For example,  <IMG WIDTH=103 HEIGHT=22 ALIGN=MIDDLE ALT="tex2html_wrap_inline58063" SRC="img129.gif"  >, where  <IMG WIDTH=64 HEIGHT=22 ALIGN=MIDDLE ALT="tex2html_wrap_inline58065" SRC="img130.gif"  >,  <IMG WIDTH=65 HEIGHT=22 ALIGN=MIDDLE ALT="tex2html_wrap_inline58067" SRC="img131.gif"  >.<P>The simplified model eliminates all of the arbitrary timing parametersin the detailed model.This is done by making the following two simplifying assumptions:<UL><LI> All timing parameters are expressed in units of clock cycles.	In effect, <I>T</I>=1.<LI> The proportionality constant, <I>k</I>, for all timing parameters	is assumed to be the same: <I>k</I>=1.</UL>The effect of these two assumptions is that we no longer need to keeptrack of the various operations separately.To determine the running time of a program,we simply count the total number of cycles taken.<P><BR> <HR><UL> <LI> <A NAME="tex2html1769" HREF="page50.html#SECTION002210000000000000000">An example-Geometric Series Summation</A><LI> <A NAME="tex2html1770" HREF="page51.html#SECTION002220000000000000000">About Arithmetic Series Summation</A><LI> <A NAME="tex2html1771" HREF="page52.html#SECTION002230000000000000000">Example-Geometric Series Summation Again</A><LI> <A NAME="tex2html1772" HREF="page53.html#SECTION002240000000000000000">About Geometric Series Summation</A><LI> <A NAME="tex2html1773" HREF="page54.html#SECTION002250000000000000000">Example-Computing Powers</A><LI> <A NAME="tex2html1774" HREF="page55.html#SECTION002260000000000000000">Example-Geometric Series Summation Yet Again</A></UL><HR><A NAME="tex2html1766" HREF="page50.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html1764" HREF="page36.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html1758" HREF="page48.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html1768" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <P><ADDRESS><img src="../icons/bruno.gif" alt="Bruno" align=right><a href="../copyright.html">Copyright &#169; 2003</a> by <a href="../signature.html">Bruno R. Preiss, P.Eng.</a>  All rights reserved.</ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -