﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-紫蝶∏飛揚↗-文章分类-计算机技术与软件专业技术资格（水平）考试</title><link>http://www.blogjava.net/algz/category/50990.html</link><description>Purple Butterfly Flying
QQ群:7101519
Flex,Ext,Spring,Hibernate,EOS,SpringSecurity,Struts
http://algz.googlecode.com/svn/trunk/</description><language>zh-cn</language><lastBuildDate>Tue, 22 May 2012 01:25:08 GMT</lastBuildDate><pubDate>Tue, 22 May 2012 01:25:08 GMT</pubDate><ttl>60</ttl><item><title>[转]UML类图符号  各种关系说明以及举例</title><link>http://www.blogjava.net/algz/articles/378313.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Wed, 16 May 2012 07:49:00 GMT</pubDate><guid>http://www.blogjava.net/algz/articles/378313.html</guid><wfw:comment>http://www.blogjava.net/algz/comments/378313.html</wfw:comment><comments>http://www.blogjava.net/algz/articles/378313.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/algz/comments/commentRss/378313.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/algz/services/trackbacks/378313.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">UML中描述对象和类之间相互关系的方式包括：依赖（Dependency），关联（Association），聚合（Aggregation），组合（Composition），泛化（Generalization），实现（Realization）等。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">依赖 （Dependency）：元素A的变化会影响元素B，但反之不成立，那么B和A的关系是依赖关系，B依赖A；类属关系和实现关系在语义上讲也是依赖关 系，但由于其有更特殊的用途，所以被单独描述。uml中用带箭头的虚线表示Dependency关系，箭头指向被依赖元素。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">泛化（Generalization）：通常所说的继承（特殊个体 is kind of 一般个体）关系，不必多解释了。uml中用带空心箭头的实线线表示Generalization关系，箭头指向一般个体。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">实现（Realize）：元素A定义一个约定，元素B实现这个约定，则B和A的关系是Realize，B realize A。这个关系最常用于接口。uml中用空心空心箭头和虚线表示Realize关系，箭头指向定义约定的元素。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">关联（Association）：元素间的结构化关系，是一种弱关系，被关联的元素间通常可以被独立的考虑。uml中用实线表示Association关系，箭头指向被依赖元素。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">聚合（Aggregation）：关联关系的一种特例，表示部分和整体（整体 has a 部分）的关系。uml中用带空心菱形头的实线表示Aggregation关系，菱形头指向整体。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">组 合（Composition）：组合是聚合关系的变种，表示元素间更强的组合关系。如果是组合关系，如果整体被破坏则个体一定会被破坏，而聚合的个体则可 能是被多个整体所共享的，不一定会随着某个整体的破坏而被破坏。uml中用带实心菱形头的实线表示Composition关系，菱形头指向整体。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">其中依赖（Dependency）的关系最弱，而关联（Association），聚合（Aggregation），组合（Composition）表示的关系依次增强。换言之关联，聚合，组合都是依赖关系的一种，聚合是表明对象之间的整体与部分关系的关联，而组合是表明整体与部分之间有相同生命周期关系的聚合。</p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">而关联与依赖的关系用一句话概括下来就是，依赖描述了对象之间的调用关系，而关联描述了对象之间的结构关系。</p><p align="left" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">后面的例子将针对某个具体目的来独立地展示各种关系。虽然语法无误，但这些例子可进一步精炼，在它们的有效范围内包括更多的语义。<br /><br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">依赖（Dependency）<br /></p><p align="left" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">实体之间一个&#8220;使用&#8221;关系暗示一个实体的规范发生变化后，可能影响依赖于它的其他实例（<strong>图D</strong>）。 更具体地说，它可转换为对不在实例作用域内的一个类或对象的任何类型的引用。其中包括一个局部变量，对通过方法调用而获得的一个对象的引用（如下例所 示），或者对一个类的静态方法的引用（同时不存在那个类的一个实例）。也可利用&#8220;依赖&#8221;来表示包和包之间的关系。由于包中含有类，所以你可根据那些包中的 各个类之间的关系，表示出包和包的关系。</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">图D</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img height="153" alt="" src="http://www.uml.org.cn/oobject/images/image004.gif" width="543" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " /></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br />关联（Association）<br /></p><p align="left" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">实体之间的一个结构化关系表明对象是相互连接的。箭头是可选的，它用于指定导航能力。如果没有箭头，暗示是一种双向的导航能力。在Java中，关联（<strong>图E</strong>） 转换为一个实例作用域的变量，就像图E的&#8220;Java&#8221;区域所展示的代码那样。可为一个关联附加其他修饰符。多重性（Multiplicity）修饰符暗示 着实例之间的关系。在示范代码中，Employee可以有0个或更多的TimeCard对象。但是，每个TimeCard只从属于单独一个 Employee。</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">图E</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img height="153" alt="" src="http://www.uml.org.cn/oobject/images/image005.gif" width="543" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " /></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">聚合（Aggregation）<br /></p><p align="left" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">聚合（<strong>图F</strong>）是关联的一种形式，代表两个类之间的整体/局部关系。聚合暗示着整体在概念上处于比局部更高的一个级别，而关联暗示两个类在概念上位于相同的级别。聚合也转换成Java中的一个实例作用域变量。<br /><br />关联和聚合的区别纯粹是概念上的，而且严格反映在语义上。聚合还暗示着实例图中不存在回路。换言之，只能是一种单向关系。</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">图F</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img height="153" alt="" src="http://www.uml.org.cn/oobject/images/image006.gif" width="543" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " /></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br /><br />合成（Composition）<br /></p><p align="left" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">合成 （<strong>图G</strong>） 是聚合的一种特殊形式，暗示&#8220;局部&#8221;在&#8220;整体&#8221;内部的生存期职责。合成也是非共享的。所以，虽然局部不一定要随整体的销毁而被销毁，但整体要么负责保持局 部的存活状态，要么负责将其销毁。局部不可与其他整体共享。但是，整体可将所有权转交给另一个对象，后者随即将承担生存期职责。</p><p align="left" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">Employee和TimeCard的关系或许更适合表示成&#8220;合成&#8221;，而不是表示成&#8220;关联&#8221;。</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">图G</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img height="153" alt="" src="http://www.uml.org.cn/oobject/images/image007.gif" width="543" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " /></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">泛化（Generalization）<br /></p><p align="left" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">泛化（<strong>图H</strong>）表示一个更泛化的元素和一个更具体的元素之间的关系。泛化是用于对继承进行建模的UML元素。在Java中，用<em>extends</em>关键字来直接表示这种关系。</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">图H</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img height="153" alt="" src="http://www.uml.org.cn/oobject/images/image008.gif" width="543" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " /></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><br />实现（Realization）<br /></p><p align="left" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">实例（<strong>图I</strong>）关系指定两个实体之间的一个合同。换言之，一个实体定义一个合同，而另一个实体保证履行该合同。对Java应用程序进行建模时，实现关系可直接用<em>implements</em>关键字来表示。</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">图I</p><p align="center" style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img height="153" alt="" src="http://www.uml.org.cn/oobject/images/image009.gif" width="543" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " /><br /><br /><br />转自:<a href="http://blog.csdn.net/kingofbirdzjy/article/details/1967871">http://blog.csdn.net/kingofbirdzjy/article/details/1967871</a>&nbsp;<br /><br /></p><img src ="http://www.blogjava.net/algz/aggbug/378313.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/algz/" target="_blank">紫蝶∏飛揚↗</a> 2012-05-16 15:49 <a href="http://www.blogjava.net/algz/articles/378313.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>主机为202.130.82.97子网屏蔽码为255.255.192.0，它所处的网络为什么</title><link>http://www.blogjava.net/algz/articles/378170.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Tue, 15 May 2012 03:42:00 GMT</pubDate><guid>http://www.blogjava.net/algz/articles/378170.html</guid><wfw:comment>http://www.blogjava.net/algz/comments/378170.html</wfw:comment><comments>http://www.blogjava.net/algz/articles/378170.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/algz/comments/commentRss/378170.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/algz/services/trackbacks/378170.html</trackback:ping><description><![CDATA[<pre mb10"="" id="content-525389197" style="margin-top: 0px; margin-bottom: 10px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; white-space: pre-wrap; word-wrap: break-word; zoom: 1; line-height: 24px; background-color: #ffffff; "> (1)先了解基础运算 <pre mb10"="" id="content-525389197" style="margin-top: 0px; margin-bottom: 10px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; white-space: pre-wrap; word-wrap: break-word; zoom: 1; ">异或运算：相同为0，不同为1 与运算：两者为1时为1，有0为0 或运算：有1为1 <br /> <br />(2)IP网段的计算和划分    <br /> IP和子网掩码   我们都知道，IP是由四段数字组成，在此，我们先来了解一下3类常用的IP  <br /> A类IP段  0.0.0.0 到127.255.255.255   <br /> B类IP段  128.0.0.0 到191.255.255.255   <br /> C类IP段  192.0.0.0 到223.255.255.255    <br /><br /> XP默认分配的子网掩码每段只有255或0   <br />A类的默认子网掩码 255.0.0.0     一个子网最多可以容纳1677万多台电脑   <br />B类的默认子网掩码 255.255.0.0    一个子网最多可以容纳6万台电脑  <br />C类的默认子网掩码 255.255.255.0   一个子网最多可以容纳254台电脑   <br />       我以前认为，要想把一些电脑搞在同一网段，只要IP的前三段一样就可以了，今天，我才知道我错了。如果照我这说的话，一个子网就只能容纳254台电脑？真是有点笑话。我们来说详细看看吧。    <br /><br />       要想在同一网段，只要网络标识相同就可以了，那要怎么看网络标识呢？首先要做的是把每段的IP转换为二进制。（有人说，我不会转换耶，没关系，我们用Windows自带计算器就行。打开计算器，点查看&gt;科学型，输入十进制的数字，再点一下&#8220;二进制&#8221;这个单选点，就可以切换至二进制了。）   <br />        把子网掩码切换至二进制，我们会发现，所有的子网掩码是由一串连续的1和一串连续的0组成的（一共4段，每段8位，一共32位数）。  <br /> 255.0.0.0   11111111.00000000.00000000.00000000   <br /> 255.255.0.0  11111111.11111111.00000000.00000000  <br /> 255.255.255.0 11111111.11111111.11111111.00000000   <br />        这是A/B/C三类默认子网掩码的二进制形式，其实，还有好多种子网掩码，只要是一串连续的1和一串连续的0就可以了（每段都是8位）。如11111111.11111111.11111000.00000000，这也是一段合法的子网掩码。子网掩码决定的是一个子网的计算机数目，计算机公式是2的m次方，其中，我们可以把m看到是后面的多少颗0。如255.255.255.0转换成二进制，那就是11111111.11111111.11111111.00000000，后面有8颗0，那m就是8，255.255.255.0这个子网掩码可以容纳2的8次方（台）电脑，也就是256台，但是有两个IP是不能用的，那就是最后一段不能为0和255，减去这两台，就是254台。我们再来做一个。   <br />         255.255.248.0这个子网掩码可以最多容纳多少台电脑？   计算方法：   把将其转换为二进制的四段数字（每段要是8位，如果是0，可以写成8个0，也就是00000000）   11111111.1111111.11111000.00000000   然后，数数后面有几颗0，一共是有11颗，那就是2的11次方，等于2048，这个子网掩码最多可以容纳2048台电脑。  <br /> 一个子网最多可以容纳多少台电脑你会算了吧，下面我们来个逆向算法的题。   一个公司有530台电脑，组成一个对等局域网，子网掩码设多少最合适？   首先，无疑，530台电脑用B类IP最合适（A类不用说了，太多，C类又不够，肯定是B类），但是B类默认的子网掩码是255.255.0.0，可以容纳6万台电脑，显然不太合适，那子网掩码设多少合适呢？我们先来列个公式。   2的m次方＝560   首先，我们确定2一定是大于8次方的，因为我们知道2的8次方是256，也就是C类IP的最大容纳电脑的数目，我们从9次方一个一个试2的9次方是512，不到560，2的10次方是1024，看来2的10次方最合适了。子网掩码一共由32位组成，已确定后面10位是0了，那前面的22位就是1，最合适的子网掩码就是：11111111.11111111.11111100.00000000，转换成10进制，那就是255.255.252.0。    分配和计算子网掩码你会了吧，下面，我们来看看IP地址的网段。   相信好多人都和偶一样，认为IP只要前三段相同，就是在同一网段了，其实，不是这样的，同样，我样把IP的每一段转换为一个二进制数，这里就拿IP：192.168.0.1，子网掩码：255.255.255.0做实验吧。   192.168.0.1   11000000.10101000.00000000.00000001   （这里说明一下，和子网掩码一样，每段8位，不足8位的，前面加0补齐。）   IP    11000000.10101000.00000000.00000001   子网掩码  11111111.11111111.11111111.00000000   在这里，向大家说一下到底怎么样才算同一网段。   要想在同一网段，必需做到网络标识相同，那网络标识怎么算呢？各类IP的网络标识算法都   是不一样的。A类的，只算第一段。B类，只算第一、二段。C类，算第一、二、三段。   算法只要把IP和子网掩码的每位数AND就可以了。  <br /> AND方法：0和1＝0 0和0＝0 1和1＝1   如：And 192.168.0.1，255.255.255.0，先转换为二进制，然后AND每一位   IP      11000000.10101000.00000000.00000001   子网掩码    11111111.11111111.11111111.00000000   得出AND结果  11000000.10101000.00000000.00000000   转换为十进制192.168.0.0，这就是网络标识，   再将子网掩码反取，也就是00000000.00000000.00000000.11111111，与IP AND   得出结果00000000.00000000.00000000.00000001，转换为10进制，即0.0.0.1，   这0.0.0.1就是主机标识。要想在同一网段，必需做到网络标识一样。    我们再来看看这个改为默认子网掩码的B类IP   如IP：188.188.0.111，188.188.5.222，子网掩码都设为255.255.254.0，在同一网段吗？   先将这些转换成二进制   188.188.0.111 10111100.10111100.00000000.01101111   188.188.5.222 10111100.10111100.00000101.11011010   255.255.254.0 11111111.11111111.11111110.00000000   分别AND，得   10111100.10111100.00000000.00000000   10111100.10111100.00000100.00000000   网络标识不一样，即不在同一网段。   判断是不是在同一网段，你会了吧，下面，我们来点实际的。   一个公司有530台电脑，组成一个对等局域网，子网掩码和IP设多少最合适？   子网掩码不说了，前面算出结果来了11111111.11111111.11111100.00000000，也就是255.255.252.0   我们现在要确定的是IP如何分配，首先，选一个B类IP段，这里就选188.188.x.x吧   这样，IP的前两段确定的，关键是要确定第三段，只要网络标识相同就可以了。我们先来确定网络号。（我们把子网掩码中的1和IP中的?对就起来，0和*对应起来，如下：）   <br />255.255.252.0 11111111.11111111.11111100.00000000   <br />188.188.x.x  10111100.10111100.??????**.********   <br />网络标识   10111100.10111100.??????00.00000000   由此可知，?处随便填（只能用0和1填，不一定全是0和1），我们就用全填0吧，*处随便，这样呢，我们的IP就是   10111100.10111100.000000**.********，一共有530台电脑，IP的最后一段1～254可以分给254台计算机，530/254＝2.086，采用进1法，得整数3，这样，我们确定了IP的第三段要分成三个不同的数字，也就是说，把000000**中的**填三次数字，只能填1和0，而且每次的数字都不一样，至于填什么，就随我们便了，如00000001，00000010，00000011，转换成二进制，分别是1，2，3，这样，第三段也确定了，这样，就可以把IP分成188.188.1.y，188.188.2.y，188.188.3.y，y处随便填，只要在1～254范围之内，并且这530台电脑每台和每台的IP不一样，就可以了。 </pre> </pre><img src ="http://www.blogjava.net/algz/aggbug/378170.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/algz/" target="_blank">紫蝶∏飛揚↗</a> 2012-05-15 11:42 <a href="http://www.blogjava.net/algz/articles/378170.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>软件设计师重点难点---原码,反码,补码,移码计算方式</title><link>http://www.blogjava.net/algz/articles/371231.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Sun, 04 Mar 2012 14:55:00 GMT</pubDate><guid>http://www.blogjava.net/algz/articles/371231.html</guid><wfw:comment>http://www.blogjava.net/algz/comments/371231.html</wfw:comment><comments>http://www.blogjava.net/algz/articles/371231.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/algz/comments/commentRss/371231.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/algz/services/trackbacks/371231.html</trackback:ping><description><![CDATA[<p><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">(1)正数</span></p> <p><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">原码和反码，补码都是一样的，都是正数本身。</span></p> <p><br style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; " /><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">(2)负数</span></p> <p><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">原码是符号位为1,数值部分取X绝对值的二进制。</span><br style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; " /><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">反码是符号位为1,其它位是原码取反。</span><br style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; " /><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">补码是符号位为1,其它位是原码取反，未位加1。</span><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">也就是说，负数的补码是其反码未位加1。</span></p> <p>正负0都为0 000.<br style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; " /> </p> <p><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">(3) 移码</span></p> <p><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">就是将符号位取反的补码.无论正数和负数,0除外,0的补码和移码相同.</span></p> <p><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">也可以理解成:不算符号位外,最高数据位的进位.最高数据位为0,符号位为0;为1,符号位为1.</span></p> <p> </p> <p><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; ">例:</span></p><span style="background-color: #eeeeee; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; "><pre style="padding-bottom: 0px; background-color: #fffcf6; margin-top: 0px; margin-bottom: 10px; padding-left: 0px; padding-right: 0px; zoom: 1; font-family: Arial; font-size: 14px; line-height: 22px; word-wrap: break-word; white-space: pre-wrap; padding-top: 0px; " id="best-answer-content"  mb10"=""><p>      原码       反码       补码       移码</p><p>+0   0 000   0 000    0 000     1 000</p><p>-0    1 000   1 111    0 000      0 000</p><p> </p><p>1011 原码：01011  反码：01011  //正数时，反码＝原码 补码：01011  //正数时，补码＝原码 移码：11011  //原数+10000  －1011 原码：11011 反码：10100  //负数时，反码为原码取反 补码：10101  //负数时，补码为原码取反＋1 移码：00101  //原数+10000  0．1101 原码：0.1101  反码：0.1101  //正数时，反码＝原码 补码：0.1101  //正数时，补码＝原码 移码：1.1101  //原数+1  －0．1101 原码：1.1101 反码：1.0010  //负数时，反码为原码取反 补码：1.0011  //负数时，补码为原码取反＋1 移码：0.0010  //原数+1</p><p> </p></pre></span><img src ="http://www.blogjava.net/algz/aggbug/371231.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/algz/" target="_blank">紫蝶∏飛揚↗</a> 2012-03-04 22:55 <a href="http://www.blogjava.net/algz/articles/371231.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>软件设计师重点难点---磁盘格式化容量,非格式化容量,数据传输率计算</title><link>http://www.blogjava.net/algz/articles/371179.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Sat, 03 Mar 2012 13:22:00 GMT</pubDate><guid>http://www.blogjava.net/algz/articles/371179.html</guid><wfw:comment>http://www.blogjava.net/algz/comments/371179.html</wfw:comment><comments>http://www.blogjava.net/algz/articles/371179.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/algz/comments/commentRss/371179.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/algz/services/trackbacks/371179.html</trackback:ping><description><![CDATA[<p>&nbsp;</p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">非格式化容量 &nbsp; = &nbsp; 位密度&#215;内圆周长&#215;每面磁道数&#215;记录面数&nbsp;</span><br style="font-family: simsun; line-height: 23px; text-align: left; " /><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&nbsp; &nbsp; &nbsp; 格式化容量 &nbsp; = &nbsp; 扇区大小&#215;每磁道扇区数&#215;每面磁道数&#215;记录面数&nbsp;</span><br style="font-family: simsun; line-height: 23px; text-align: left; " /><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&nbsp; &nbsp; &nbsp; 数据传输率 &nbsp; = &nbsp; 扇区大小&#215;每磁道扇区数&#215;转速 &nbsp;&nbsp;</span>&nbsp;<br /></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; ">计算容量时,单位应统一.CM换成MM;MB换成KB;&nbsp;位转换成字节=除以8.<br /></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; ">(1)单记录面磁道数=磁道密度<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(盘面外半径-盘面内半径)</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(2)非格式化容量=</span>&nbsp;记录<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">位密度</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">内圆周长</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">单记录面磁道数</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">记录面数</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">总磁道数=&nbsp;</span>&nbsp;<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">单记录面磁道数</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">记录面数</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; ">内圆周长=3.14*内圆直径=<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 26px; white-space: pre-wrap; ">2</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><a href="http://wenwen.soso.com/z/Search.e?sp=S%E5%9C%86%E5%91%A8%E7%8E%87&amp;ch=w.search.yjjlink&amp;cid=w.search.yjjlink" target="_blank" style="color: #005599; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; line-height: 26px; white-space: pre-wrap; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #005599; ">圆周率</a><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 26px; white-space: pre-wrap; ">半径 = 圆周率</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 26px; white-space: pre-wrap; ">直径</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(3)格式化容量=记录面数</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">单记录面磁道数</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">每个磁道扇区数</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">扇区字节数</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(4)一个磁道存储的字节数=磁盘扇区数</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">扇区字节</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(5)数据传输率=</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">每磁道扇区数&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">扇区大小&#215;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: simsun; line-height: 23px; text-align: left; ">转速</span>&nbsp;</p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 22px; background-color: #ffffff; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">(6)平均等待时间=磁盘转速时间的一半</span><br /><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6; ">平均存取时间是反应磁盘数据操作速度的指标，单位是毫秒（ms），他包括3个时间段：平均寻道时间，平均定位时间，转动延迟，其中后面两个统称为等待时间。</span></p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; ">&nbsp;</p><p style="margin-top: 0.7em; margin-right: 0.7em; margin-bottom: 0.7em; margin-left: 0.7em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #545454; font-family: Tahoma; line-height: 1.6; background-color: #ffffff; "><font size="4"><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 19px; color: #ff0000; "><font color="#000000" face="Arial">举例：<br />假设一个有3个盘片的硬盘，共有4个记录面，转速为7200/分钟，盘面有效记录区域的外直径为30CM，内直径为10CM，记录位密度为250位/MM，磁道密度为8道/mm，每个磁道分16扇区，每扇区512字节。</font></span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 19px; color: #ff0000; "></span><br /></font>总磁道数：Ct=磁盘面数*(外直径-内直径)/2*磁道密度=4*(30-10)*10/2*8=3200<br />非格式化容量：Cuf=总磁道数*内径磁道周长*位密度=3200*(3.14*10*10)*(250/8)字节=29.95M<br />格式化容量：Cf=总磁道数&#215;每扇区数&#215;每扇区字节数=4*=25M<br />平均数据传输速率：Cg＝每磁道扇区数16&#215;每扇区字节数512KB&#215;转速(7200/60S)=983040=960KB/S</p> <p>&nbsp;</p><img src ="http://www.blogjava.net/algz/aggbug/371179.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/algz/" target="_blank">紫蝶∏飛揚↗</a> 2012-03-03 21:22 <a href="http://www.blogjava.net/algz/articles/371179.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>软件设计师重点难点——系统可靠性计算</title><link>http://www.blogjava.net/algz/articles/371157.html</link><dc:creator>紫蝶∏飛揚↗</dc:creator><author>紫蝶∏飛揚↗</author><pubDate>Fri, 02 Mar 2012 15:02:00 GMT</pubDate><guid>http://www.blogjava.net/algz/articles/371157.html</guid><wfw:comment>http://www.blogjava.net/algz/comments/371157.html</wfw:comment><comments>http://www.blogjava.net/algz/articles/371157.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/algz/comments/commentRss/371157.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/algz/services/trackbacks/371157.html</trackback:ping><description><![CDATA[<p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><strong>软件设计师重点难点&#8212;&#8212;系统可靠性计算</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　系统可靠性计算是软件设计师考试的一个重点，近些年几乎每次考试都会考到，但这个知识点的难度不高，了解基本的运算公式，即可轻松应对。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　可靠性计算主要涉及三种系统，即串联系统、并联系统和冗余系统，其中串联系统和并联系统的可靠性计算都非常简单，只要了解其概念，公式很容易记住。冗余系统要复杂一些。在实际的考试当中，考得最多的就是串并混合系统的可靠性计算。所以要求我们对串联系统与并联系统的特点有基本的了解，对其计算公式能理解、运用。下面将对这些计算的原理及公式进行详细的说明。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　<strong>串联系统</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　假设一个系统由n个子系统组成，当且仅当所有的子系统都能正常工作时，系统才能正常工作，这种系统称为串联系统，如图1所示。　</p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/1.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　设系统各个子系统的可靠性分别用R<sub>1</sub>，R<sub>2</sub>，&#8230;&#8230;，R<sub>n</sub>表示，则系统的可靠性R=R<sub>1</sub>&#215;R<sub>2</sub>&#215;&#8230;&#215;R<sub>n</sub>&nbsp;。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　如果系统的各个子系统的失效率分别用&#955;<sub>1</sub>，&#955;<sub>2</sub>，&#8230;&#8230;，&#955;<sub>n</sub>来表示，则系统的失效率&#955;=&#955;<sub>1</sub>&#215;&#955;<sub>2</sub>&#215;&#8230;&#215;&#955;<sub>n</sub>&nbsp;。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　<strong>并联系统</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　假如一个系统由n个子系统组成，只要有一个子系统能够正常工作，系统就能正常工作，如图2所示。</p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/2.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　设系统各个子系统的可靠性分别用R<sub>1</sub>，R<sub>2</sub>，&#8230;&#8230;，R<sub>n</sub>表示，则系统的可靠性R=1－（1－R<sub>1</sub>）&#215;（1－R<sub>2</sub>）&#215;&#8230;&#215;（1－R<sub>n</sub>） 。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　假如所有子系统的失效率均为&#955;，则系统的失效率为&#956;：</p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/3.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　在并联系统中只有一个子系统是真正需要的，其余n-1个子系统都被称为冗余子系统。该系统随着冗余子系统数量的增加，其平均无故障时间也会增加。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　<strong>串并混合系统</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　串并混合系统实际上就是对串联系统与并联系统的综合应用。我们在此以实例说明串并混合系统的可靠性如何计算。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　例1：</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　某大型软件系统按功能可划分为2段P1和P2。为提高系统可靠性，软件应用单位设计了如下图给出的软件冗余容错结构，其中P1和P2均有一个与其完全相同的冗余备份。若P1的可靠度为0.9，P2的可靠度为0.9，则整个系统的可靠度是 。</p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/04.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><span style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　供选择的答案</span><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　A. 0.6561</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　B. 0.81</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　C. 0.9801</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　D. 0.9</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　试题分析</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　当系统采用串联方式时，其可靠度R可由公式R=R1R2&#8230;Rn求得。当系统采用并联方式时，其可靠度R可由公式R=1-（1-R1）*(1-R2)&#8230;(1-Rn)求得。这个系统总的来说是串联,但分成两个并联部分。第一部分的可靠度为：R1=1-(1-0.9)*(1-0.9)=0.99；第二部分的可靠度也为：R2=0.99；所以整个系统的可靠度为：R=R1*R2=0.9801 ，C答案。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　试题答案</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　C</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　上面的例题是属于常规形式的可靠性计算题，如果把这种试题再拨高一个层次，可以。</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　例2：</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　1台服务器、3台客户机和2台打印机构成了一个局域网（如图4所示）。在该系统中，服务器根据某台客户机的请求，数据在一台打印机上输出。设服务器、各客户机及各打印机的可靠度分别为a、b、c，则该系统的可靠度为 。</p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/05.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　A．ab3c3</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　B．a(1-b3)(1-c2)</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　C．a(1-b)3(l-c)2</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　D．a(1-(1-b)3)(1-(l-c)2)</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　<strong>例题分析</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　在试题给出的系统中，客户机之间是并联的（任何一台客户机出现故障，对其他客户机没有影响），同理，打印机之间是也并联关系。然后，客户机、服务器、打印机之间再组成一个串联关系。因此，我们可以把该系统简化为：</p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/6.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　已知服务器、各客户机及各打印机的可用性分别为a、b、c，因此整个系统的可用性为：R=（1-（1-b）<sup>3</sup>）a（1-（1-c）<sup>2</sup>）=a（1-（1-b）<sup>3</sup>）（1-（1-c）<sup>2</sup>）<br />&nbsp;<br />　　例题答案D</p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　<strong>4．模冗余系统</strong></p><p style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　m模冗余系统由m个（m=2n+1为奇数）相同的子系统和一个表决器组成，经过表决器表决后，m个子系统中占多数相同结果的输出可作为系统的输出，如图5所示。</p><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/7.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><span style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: left; background-color: #f5fdff; ">　　在m个子系统中，只有n+1个或n+1个以上的子系统能正常工作，系统就能正常工作并输出正确结果。假设表决器是完全可靠的，每个子系统的可靠性为R0，则m模冗余系统的可靠性为：</span><p align="center" style="font-family: Arial, Helvetica, sans-serif; line-height: 22px; background-color: #f5fdff; "><img alt="" src="http://www.233.com/NewsFiles/2012-2/6/soft/8.gif" border="0" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: top; " /></p><img src ="http://www.blogjava.net/algz/aggbug/371157.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/algz/" target="_blank">紫蝶∏飛揚↗</a> 2012-03-02 23:02 <a href="http://www.blogjava.net/algz/articles/371157.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>