软考中级-软件设计师知识点

本文涉及的产品
密钥管理服务KMS,1000个密钥,100个凭据,1个月
.cn 域名,1个 12个月
简介: 软考中级-软件设计师知识点

1. cpu、总线、io控制方式、寄存器

系统总线:

系统总线主要用于连接处理器(CPU)、主存(内存)和外设部件,负责将计算机的各个部件连接在一起

计算机系统中釆用总线结构,便于实现系统的积木化构造,同时可以减少信息传输量的数量

总线复用方式可以减少总线中信号线的数量,以较少的信号线传输更多的信息。

ISA,EISA,PCI都是系统总线,其中EISA兼容ISA,PCI目前最流行

PCI总线是并行内总线,SCSI 总线是串行内总线

CPU主要组成部分:

CPU主要由,控制单元,运算单元,存储单元,三大部分组成

运算单元:包括 ALU、FPU。

控制单元:包括 指令控制器,时序控制器,总线控制器,中断控制器。

存储单元:包括 通用寄存器,状态寄存器,cache。

运算器、控制器、寄存器、内部总线

输入输出(IO)控制方式:

程序查询方式、中断驱动方式、直接存储器存取方式(DMA)

cpu寄存器

指令寄存器(IR)用来保存当前正在执行的指令。当执行一条指令时,先把它从内存取到数据寄存器(DR)中,然后再传送至IR。指令寄存器中操作码字段的输出就是指令译码器的输入。(指令寄存器对用户完全透明)

地址寄存器(AR)用来保存当前CPU所访问的内存单元的地址

程序计数器(PC)的内容即是从内存提取的第一条指令的地址

计算机指令一般包括操作码和地址码两部分,为分析执行一条指令,其操作码和地址码都应存入指令寄存器(IR)。PC存放的是下一条指令的地址,一般顺序执行,只是简单地+1

状态寄存器用于记录运算中产生的标志信息

通用寄存器,暂存操作数跟地址

累加器 暂存操作数和中间运算结果。

程序计数器、指令寄存器和指令译码器都是CPU中控制单元的部件,加法器是算术逻辑运算单元的部件。

程序计数器(PC)用于存储指令的地址,CPU根据该寄存器的内容从内存读取待执行的指令,程序员可以访问该寄存器。比如实现调度器。

译码器

CPU中译码器的主要作用是进行指令译码

2.cpu和dma

当CPU需要读取数据时,DMA控制器和中断CPU发出的数据地址是主存的物理地址

DMA控制器在需要的时候代替CPU作为总线主设备,在不受CPU干预的情况下,控制I/O设备与系统主存之间的直接数据传输。DMA操作占用的资源是系统总线,而CPU并非在整个指令执行期间即指令周期内都会使用总线,故DMA请求的检测点设置在每个机器周期也即总线周期结束时执行,这样使得总线利用率最高。

中断方式是在外设准备好时给CPU发中断信号,之后再进行数据传输。

中断方式与dma都可以实现外设与cpu之间的并行工作

3.海明码

海明码:是一种利用奇偶性来检错和纠错的校验方法

海明码的构成方法:是在数据位之间的确定位置插入 k 个校验位,通过扩大码距来实现检错和纠错。 对于数据位 n 的数据,加入k位的校验码,它应满足: 2^k 1 ≥ n + k

4.中断向量、中断响应时间、保存现场

中断向量:提供中断服务程序的入口地址

中断响应时间:从发出中断请求到开始进入中断处理程序

保存现场:通常指保存硬件上下文,包括 CPU 寄存器中的数据以及其他与执行程序相关的硬件状态,为了正确返回原程序继续执行

5.补码

原码-0和+0所对应的补码是相同的。

补码表示简化了有符号数的运算和处理,并且转化减法运算为加法运算,更加高效和简洁

符号位也参与运算

对于正数,补码与其真值是一致的,所以在这种情况下是比较简单和直观的。但对于负数,补码的计算规则是将其真值按位取反(除符号位外),然后再加 1,因此既不直观也不简单

6.指令流水线计算公式

1000*2+2+1=2003

对于双缓冲区,可以画时序图

流水线的吞吐率是指单位时间流水线处理机输出的结果的数目,因此流水线的吞吐率为一个流水级时间的倒数,即最长流水级时间的倒数。

7.存储器分类

按访问方式可分为按地址访问的存储器和按内容访问的存储器。按寻址方式可分为随机存储器、顺序存储器和直接存储器。

相联存储器是一种按内容访问的存储器。

闪存不像RAM(随机存取存储器)一样以字节为单位改写数据,因此不能取代RAM,也不能替换主存,因此C选项错误。但是在嵌入式中,可以用闪存代替ROM存储器。

8.总线

处理机主要由处理器、存储器和总线组成

总线包括:数据总线、地址总线和控制总线

若内存容量为4GB,字长为32,则地址总线和数据总线的长度?

由于字长为32位,即数据总线的宽度为32位。

地址总线的宽度就是处理机寻址范围,若地址总线为n位,则可寻址空间为2的n次方字节。

4*1024*1024*1024位,所以地址总线宽度为32

9.补码、移码

正数的补码是它本身

负数的补码是原码取反后+1

移码只要将补码的符号位取反即可。

因此±0的补码和移码是相同的。

由于补码不区分+0和-0,因此可以表示2^n个

10.漏洞扫描

漏洞扫描系统是一种自动检测目标主机安全弱点的程序

11.木马和病毒

特洛伊木马:通过网络传播病毒(试图建立网络连接)

木马病毒:控制操作

宏病毒:文件相关,电子表格

引导区病毒:破坏引导盘,文件目录

震网:破坏工业基础设施(蠕虫)

12.编译与反编译

编译是将高级语言源程序翻译成机器语言程序(汇编形式或机器代码形式),反编译是编译的逆过程。反编译通常不能把可执行文件还原成高级语言源代码,只能转换成功能上等价的汇编程序。

13.死锁判断

若有资源m个,n个进程互斥使用,每个进程对资源的最大需求为w

满足以下条件将不会发生死锁:

m>=n*(w-1)+1

14.数据库三大范式

1NF:原子性

2NF:属性完全依赖于主键,不能只依赖于主键的一部分

3NF:属性直接依赖于主键,不能间接依赖(传递)

BCNF:如果关系模式R(U,F)的所有属性(包括主属性和非主属性)都不传递依赖于R的任何候选关键字,那么称关系R是属于BCNF的。

如果R ∈ 3NF ,且 R 只有一个候选码,则 R 必属于 BCNF 。

1NF的问题:

表中存在冗余、修改操作的不一致,以及插入异常和删除异常

范式判断

15.数据库连结和映射

注意

是自然连接

是笛卡尔积

第一空

题目中是R×S,表示笛卡尔积

满足σ 1 < 6 σ_{1<6}σ1<6为R的第一行,分别与S的第一行和第二行对应

输出结果

第二空

注意是自然连接,因此属性的序号要注意

16.最小生成树

一个连通图的生成树是一个极小的连通子图,它包含图中全部的n个顶点,但只有构成一棵树的n-1条边。

最小生成树

所有生成图中边的权值和最小。

应用场景:铺电路成网,为了使得铺电路成本最低,可以计算最小生成树。

Prim算法和Kruscal算法都是无向连通网的最小生成树的算法

Prim算法:从扩展顶点开始,每次选择与当前顶点集合中距离域短的顶点,适合求解稠密图的

Kruscal算法:从扩展边开始,每次选择剩余的边中最小权重的边,适合求解稀疏图

两个算法,都是基于贪心策略实现的

两个算法在不知道图的情况下,没有优劣之分。

1)Kruscal算法

https://c.biancheng.net/algorithm/kruskal.html

1.首先按边的权值,从小到大进行排序。

2.从小到大遍历边,若此边与其他已选边不会构成环路,就可以选择它组成最小生成树。(n个顶点就只能有n-1条边,来构成最小生成树)

(第2空)采用 Kruskal 算法求解下图的最小生成树,采用的算法设计策略是( )。该最小生成树的权值是( )。

17.连通图、强连通图、强连通分量

连通图

图中从一个顶点到达另一顶点,若存在至少一条路径,则称这两个顶点是连通着的。例如图 1 中,虽然 V1 和 V3 没有直接关联,但从 V1 到 V3 存在两条路径,分别是 V1-V2-V3 和 V1-V4-V3,因此称 V1 和 V3 之间是连通的。

强连通图

有向图中,若任意两个顶点 Vi 和 Vj,满足从 Vi 到 Vj 以及从 Vj 到 Vi 都连通,也就是都含有至少一条通路,则称此有向图为强连通图。

强连通分量

与此同时,若有向图本身不是强连通图,但其包含的最大连通子图具有强连通图的性质,则称该子图为强连通分量。

18. AOV 和AOE网

人们通常用有向图来描述和分析一项工程的计划和实施过程,子工程被称为活动(Activity)。所以以顶点表示活动,有向边表示活动之间的先后关系,这样的图被称为 AOV 网(Activity On Vertex Network)

标准的 AOV 网必须是一个有向无环图,即从任何一个顶点出发,无论怎么走,都无法回到这个顶点自身

若在AOV图的边上带上权值,边上的权值表示该活动持续的时间,则这种带权有向图称为用边表示活动的网(Activity On Edge Network, AOE 网)通常在AOE网中列出了完成预定工程计划所需进行的活动、每项活动的计划完成时间、要发生哪些事件以及这些事件和活动间的关系,从而可以分析。

AOE的关键路径

就是最长的路径。

19.html中的标签

标记用于定义表格中的一行。table row 的缩写

标记用于定义表格中一个或多个列的属性值。

标记用于定义表格中的一个单元格。table data cell 的缩写

</code>标记用于定义文档标题</div><div><code><hr></code> 标记一条横线。(horizontal rule)水平分隔线</div><div><code><i></code> 字斜体</div><div><code><html></code> 限定开始点和结束点</div><div><code>alink</code>用于设置正在被击中的链接的颜色。</div><div><code>vlink</code>用于设置已使用的链接的颜色</div><div><code>background</code>用于设置背景图片的URL。</div><div><code>bgcolor</code>用于设置文档整体背景颜色。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_ec818198893b4d22ad88cf4f74066afe.png%22%2C%22originWidth%22%3A507%2C%22originHeight%22%3A349%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A507%2C%22height%22%3A349%7D"></span></div><h4 id="PcrZf"><a name="t20"></a><a></a>20.CISC和RISC</h4><div><strong>CISC (Complex Instruction Set Computer,复杂指令集计算机)的基本思想是</strong>:进一步增强原有指令的功能,用更为复杂的新指令取代原先由软件子程序完成的功能,实现软件功能的硬件化,导致机器的指令系统越来越庞大而复杂。</div><div><strong>RISC (Reduced Instruction Set Computer,精简指令集计算机)的基本思想是</strong>:通过减少指令总数和简化指令功能,降低硬件设计的复杂度,使指令能单周期执行,并通过优化编译提高指令的执行速度,采用硬布线控制逻辑优化编译程序。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_e307a89d764147bfb2a1d793eddfa32e.png%22%2C%22originWidth%22%3A513%2C%22originHeight%22%3A339%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A513%2C%22height%22%3A339%7D"></span></div><h4 id="eQIw8"><a name="t21"></a><a></a>21.浮点数的表示</h4><div>浮点数的一般表示形式为<span>N = 2 E ∗ F N = 2^E*F</span><em>N</em><span>=</span><span>2</span><span><em>E</em></span><span>∗</span><em>F</em>,其中<span>E E</span><em>E</em>为阶码,<span>F F</span><em>F</em>为尾数。 浮点数所能表示的数值范围主要由阶码决定,所表示数值的精度则由尾数决定。 工业标准IEEE754规定阶码采用移码表示,尾数用补码表示。 规格化就是将尾数的绝对值限定在区间[0.5,1)</div><div>两个浮点数进行相加运算时,首先需要对阶(使它们的阶码一致),然后再进行尾数的相加处理。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_e8aae87d9d29424ebaa17fa5d0ee666d.png%22%2C%22originWidth%22%3A925%2C%22originHeight%22%3A656%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A925%2C%22height%22%3A656%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_5ef29ae5730a46bab76ea80749735f21.png%22%2C%22originWidth%22%3A901%2C%22originHeight%22%3A179%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A901%2C%22height%22%3A179%7D"></span></div><h4 id="wiSJX"><a name="t22"></a><a></a>22.</h4><div>为了使一个系统能检查和纠正一个差错,码间最小距离必须至少是3。</div><div>海明码是一种可以纠正一位差错的编码,是利用奇偶性来检错和纠错的校验方法。</div><div>循环冗余校验码(CRC)编码方法是在k位信息码后再拼接r位的校验码,形成长度为n位的编码,其特点是检错能力极强且开销小,但不能纠错。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_ad58a67b5d1f460c9ee6fcf44a293097.png%22%2C%22originWidth%22%3A915%2C%22originHeight%22%3A361%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A915%2C%22height%22%3A361%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_c68027d88abf4e458d0d3f8a67898cd4.png%22%2C%22originWidth%22%3A853%2C%22originHeight%22%3A151%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A853%2C%22height%22%3A151%7D"></span></div><h4 id="AKGvP"><a name="t23"></a><a></a>23.cache</h4><div>Cache是一个高速小容量的临时存储器,可以用髙速的静态存储器(SRAM)芯片实现。</div><div>Cache的设计思想是在合理成本下提高命中率</div><div>在程序的执行过程中,Cache与主存的地址映像由(专门的硬件自动完成 )。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_60aa2ef6795247cf83f400e543e0a00a.png%22%2C%22originWidth%22%3A639%2C%22originHeight%22%3A405%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A639%2C%22height%22%3A405%7D"></span></div><div>Cache的地址映射方法主要有三种,即全相联映像、直接映像和组相联映像</div><div>全相联方式意味着主存的任意一块可以映像到Cache中的任意一块,其特点是块冲突概率低,但成本高</div><div>直接映像方式是指主存的每一块只能映像到Cache的一个特定的块中,但是容易冲突</div><div>组相联方式是对上述两种方式的折中处理,对Cache分组,实现组间直接映射,组内全相联</div><h4 id="40nPk"><a name="t24"></a><a></a>24.数据库容灾</h4><div>数据容灾是指建立一个异地的数据系统,为保护数据安全和提高数据持续可用性</div><div>数据库容灾属于<em>系统安全</em>和<em>应用安全</em>考虑范畴</div><h4 id="CcHsB"><a name="t25"></a><a></a>25.数字证书</h4><div>用户获取网站的数字证书后通过验证CA的签名来确 认数字证书的有效性,从而验证网站的真伪。(验证CA的签名时使用的是CA的公钥。)</div><div>在用户与网站进行安全通信时,<strong>用户</strong>发送数据时使用网站的<strong>公钥</strong>(从数字证书中获得)<strong>加密</strong>,收到数据时使用<strong>网站的公钥验证网站的数字签名</strong>,<strong>网站</strong>利用自身的<strong>私钥</strong>对发送的消息签名和对收到的消息<strong>解密</strong>。</div><h4 id="Msemp"><a name="t26"></a><a></a>26.位图与矢量图</h4><ul><li>矢量图法实质上是用数学的方式(算法和特征)来描述一幅图形图像。</li><li>位图图像是指用像素点来描述的图。</li></ul><div>位图占用空间大,处理侧重于获取和复制,显示速度快;矢量图占用空间小,处理侧重于绘制和创建,显示速度慢。</div><h4 id="sS3N1"><a name="t27"></a><a></a>27.数据库中派生属性和多值属性</h4><div>派生属性是指可以由其他属性经过运算得到的属性,因而派生属性产生冗余,通常不存储</div><div>多值属性是指一个实体在该属性上会同时取多个属性值</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_0c87832d5d324d35aa81a18448c84ada.png%22%2C%22originWidth%22%3A920%2C%22originHeight%22%3A95%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A920%2C%22height%22%3A95%7D"></span></div><div>如上所示,出生年月可以推断出年龄,年龄是派生属性。</div><div>出生年月信息更加详细,可以推出年龄,反之不可以,而且年龄会变化,因此选用出生年月作为属性更为合适。</div><h4 id="Sp6na"><a name="t28"></a><a></a>28.邻接表和邻接矩阵</h4><div>接矩阵和邻接表是图(网)的两种基本存储结构,对于具有n个顶点、e条边的图</div><div>采用邻接表遍历图时,时间复杂度为O(N+E)</div><div>采用邻接矩阵遍历图时,时间复杂度为O(N^2)</div><div>下图是邻接表</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_9eb6d37d703e485ebc6caf70933be227.png%22%2C%22originWidth%22%3A796%2C%22originHeight%22%3A304%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A796%2C%22height%22%3A304%7D"></span></div><div>下图是邻接矩阵</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_c387bd83ec8f45c7a23114ee2ae526f0.png%22%2C%22originWidth%22%3A326%2C%22originHeight%22%3A280%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A326%2C%22height%22%3A280%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_e4a290bf4e434db99b664c14984f9936.png%22%2C%22originWidth%22%3A674%2C%22originHeight%22%3A346%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A674%2C%22height%22%3A346%7D"></span></div><div>稠密图适合邻接矩阵,稀疏图适合邻接表</div><h4 id="ILKV7"><a name="t29"></a><a></a>29.栈和队列</h4><div>入队序列与出队序列关系为<strong>1:1</strong>,而入栈序列与出栈序列关系是<strong>1:n</strong>(n≥1)。</div><div>上面1:1的意思是,1种入队序列,出队也就只有1种序列。</div><div>1:n的意思就是,1种入栈序列,出栈可能有n种。</div><div>比如1,2,3入栈,那么出栈可能是3,2,1或者 进一个出一个就是1,2,3 或者 2,1,3等。。。</div><h4 id="xKB87"><a name="t30"></a><a></a>30.快速排序(归并排序、插入排序)</h4><div>快排是一种不稳定的排序算法</div><div>平均时间复杂度为O(NlongN),最坏时间复杂度为O(N^2)</div><div>快排是一种分治算法</div><div>基本有序情况下,插入排序是最佳选择</div><div>若关键字取值范围较小,则计数排序是最佳选择</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_acb392be4efb4ff9bb19ee7339a659f6.png%22%2C%22originWidth%22%3A895%2C%22originHeight%22%3A315%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A895%2C%22height%22%3A315%7D"></span></div><div>以最左元素为基准,85为最大数,12为最小数,因此pivot在边上,效率最低。B、C排除</div><div><strong>对于A来说</strong></div><div>经过第一轮排序后</div><div>12,30,25,45,67,52,85</div><div>12最小,67中间大</div><div><strong>对于D来说</strong></div><div>经过第一轮排序后</div><div>12,25,30,45,85,52,67</div><div>12最小,85最小,都不是取到中间值。</div><div>因此A的排序效率最高。</div><div><strong>归并排序</strong>(未解决)</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_a8a6f5aca3024ae6ad7be5cb93fe1cab.png%22%2C%22originWidth%22%3A901%2C%22originHeight%22%3A111%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A901%2C%22height%22%3A111%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_38ee39648b04412ab88736e74a11b99d.png%22%2C%22originWidth%22%3A828%2C%22originHeight%22%3A352%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A828%2C%22height%22%3A352%7D"></span></div><div>当基本有序时,选择插入排序,时间复杂度为O(n).</div><div>归并和堆排序为O(nlogn),此使快排O(n^2)</div><div><strong>插入排序</strong></div><div><a href="https://blog.csdn.net/qq_41680771/article/details/121306446?spm=a2c6h.13046898.publish-article.239.72246ffarTwVs9" target="_blank">参考链接</a></div><div>从i=1开始,每次与前一个元素比较大小,若小,则将该数不断往前推;如果顺序增长,那么复杂度只有O(n),一般情况下时间复杂度是O(n^2)</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_d44d16702d7c4482b2e5f988b409d32d.png%22%2C%22originWidth%22%3A761%2C%22originHeight%22%3A341%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A761%2C%22height%22%3A341%7D"></span></div><div>比如这题,可以直接计算逆序对数量,逆序对越多,需要比较的也就越多</div><h4 id="SfAAk"><a name="t31"></a><a></a>31.网络互连设备</h4><div>中继器是物理层设备</div><div>交换机是由硬件构成的多端口网桥,也是一种数据链路层设备</div><div>路由器是网络层设备</div><h4 id="XoB7a"><a name="t32"></a><a></a>32.可靠度计算</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_8e296f87c03b41efa3419846978da39a.png%22%2C%22originWidth%22%3A861%2C%22originHeight%22%3A243%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A861%2C%22height%22%3A243%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_44043baa4f2b4c048ae7b1878f81ba3c.png%22%2C%22originWidth%22%3A410%2C%22originHeight%22%3A42%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A410%2C%22height%22%3A42%7D"></span></div><h4 id="9jFbn"><a name="t33"></a><a></a>33.MPGE</h4><div><strong>VCD</strong>使用了<strong>MPEG-1</strong>标准作为其音、视频信息压缩编码方案,</div><div><strong>MPEG-2</strong>标准中的音、视频压缩编码技术被应用到<strong>DVD</strong>中</div><h4 id="IWTd9"><a name="t34"></a><a></a>34.页面淘汰</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_410bba462b2043aebab222d6b07d3431.png%22%2C%22originWidth%22%3A901%2C%22originHeight%22%3A317%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A901%2C%22height%22%3A317%7D"></span></div><div>为了访问页面3,而页面3不在内存中,因此要加入到内存中。然而系统只分配了3个存储块,分别被页面0、页面2和页面4占用,因此要淘汰一个页面。按照规则,应该先淘汰最近未被访问的;当都访问过时,应该淘汰最近未修改的。 看表中数据发现,页面0、2、4都访问过,但页面0未修改,因此淘汰页面0。</div><div>逻辑地址=页号+页内地址;物理地址=物理块号+页内地址。一个页面为4KB,也就是2^12。也就是说逻辑地址2C25H中,2为页号,C25H是页内地址。那么物理地址,为4C25H</div><h4 id="5CaaA"><a name="t35"></a><a></a>35.磁盘读取数据时间计算</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_2177008c9e2c4353a8834dedb526756a.png%22%2C%22originWidth%22%3A906%2C%22originHeight%22%3A245%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A906%2C%22height%22%3A245%7D"></span></div><div>一个磁道可以理解为一个同心圆环,磁盘一旦开始转,就不会停下来。根据题意,磁道上有9个物理块,每个物理块的读取时间为27/9=3ms,并且由于是单缓冲区,读出的数据必须处理完才能继续读,也就是说R0读取并处理完,才能读R1。那么读取和处理R0,花费3+3=6ms。而此时磁头已指向R2开头,要读取并处理R1,还要花费再转一圈27ms和处理时间3ms,因此。读取和处理完R1~R8需8*(27+3)=240ms,加上之前的R0,就是246ms。</div><div>由于读取时间为3ms,处理时间也为3ms。根据第一题可知处理完物理块1,磁头位于物理块3开头….假设从R0开始,如果让物理块1为R0,物理块3为R1,物理块5为R2,物理块7为R3,物理块9为R4,物理块2为R5,物理块4为R6,物理块6为R7,物理块8为R8。那么只要读取+处理完一个物理块 就能紧接着 读取+处理,因此耗时(3+3)*9=54ms</div><h4 id="scrxd"><a name="t36"></a><a></a>35.二分查找</h4><div>对n个元素的有序表A[1…n]进行二分(折半)查找(除2取商时向下取整),查找元素A[i] 时,最多与A中的( )个元素进行比较。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_d5d5efe9ee9645619552d81a05879cc2.png%22%2C%22originWidth%22%3A129%2C%22originHeight%22%3A31%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A129%2C%22height%22%3A31%7D"></span></div><div>因为二叉树高度为log2n+1</div><h4 id="pjjEg"><a name="t37"></a><a></a>36.哈夫曼树(最优二叉树)</h4><div>给定N个权值作为N个叶子结点,构造一棵二叉树,若该树的带权路径长度达到最小,称这样的二叉树为最优二叉树,也称为哈夫曼树(Huffman Tree)。哈夫曼树是带权路径长度最短的树,权值较大的结点离根较近。</div><div><strong>哈夫曼树的构造过程</strong></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_576aaed1c9034514984017209577f4a7.png%22%2C%22originWidth%22%3A530%2C%22originHeight%22%3A220%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A530%2C%22height%22%3A220%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_177d06bf4cc74d0a8170d39c036ec68e.png%22%2C%22originWidth%22%3A932%2C%22originHeight%22%3A347%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A932%2C%22height%22%3A347%7D"></span></div><div>二叉树具有以下性质:度为2的结点(双分支结点)数比度为0 (叶子结点)数正好少1。而根据最优二叉树(哈夫曼树)的构造过程可知,最优二叉树中只有度为2和0的结点,因此,其结点总数为2n-1。</div><div><strong>哈夫曼编码</strong></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_fb9d88104a8b4ea39c38009bae7d8321.png%22%2C%22originWidth%22%3A991%2C%22originHeight%22%3A210%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A991%2C%22height%22%3A210%7D"></span></div><div><strong>定长编码</strong>:采用同样数目的二进制位表示消息中的每个字符</div><div>上题中,有6个字符,因此码长应位3位,他能表示8个字符。</div><div><strong>Huffman编码</strong>是一种最优的不定长编码方法,可以有效的压缩数据</div><div>首先构造哈夫曼树,然后计算编码</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_3e476ef2ffc74cbdb927a243ce8685df.png%22%2C%22originWidth%22%3A936%2C%22originHeight%22%3A452%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A936%2C%22height%22%3A452%7D"></span></div><div>因此字符序列“face”的编码应为1100 0 1001101。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_b591f0770aa64eb7acb77dcbd8a78784.png%22%2C%22originWidth%22%3A910%2C%22originHeight%22%3A506%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A910%2C%22height%22%3A506%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_7401de7f8dac4808aa9342d0627cc244.png%22%2C%22originWidth%22%3A878%2C%22originHeight%22%3A145%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A878%2C%22height%22%3A145%7D"></span></div><h4 id="c1Kt7"><a name="t38"></a><a></a>37.端口号</h4><div>SMTP服务器的端口是25</div><div>http :80</div><div>https:443</div><div>POP3服务器默认端口为110</div><div>FTP服务器的控制端口为21,数据端口为20。</div><div>POP3:110端口,邮件收取。</div><div>SMTP:25端口,邮件发送。</div><div>FTP:20数据端口/21控制端口,文件传输协议。</div><div>HTTP:80端口,超文本传输协议,网页传输。</div><div>DHCP:67端口,IP地址自动分配。</div><div>SNMP:161端口,简单网络管理协议。</div><div>DNS:53端口,域名协议,记录域名与IP的映射关系。</div><div>TCP:可靠的传输层协议。</div><div>UDP:不可靠的传输层协议。</div><div>ICMP:因特网控制协议,PING命令来自该协议。</div><div>IGMP:组播协议。</div><div>ARP:地址协议,IP地址转换为MAC地址。</div><div>RARP:反向地址协议,MAC地址转IP地址。</div><h4 id="QSyex"><a name="t39"></a><a></a>38.存储</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_690c9adf91d84bb08f34e0ee4b610218.png%22%2C%22originWidth%22%3A932%2C%22originHeight%22%3A355%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A932%2C%22height%22%3A355%7D"></span></div><div>2KX4位的意思是2k个存储单元,一个存储单元占4位。(实际上这个芯片就是2k*4/8=1kb大小)而16KX8位是16k个存储单元,存储单元占8位。因此凑8位存储单元需要2个2KX4位芯片,也就变成2KX8位。以8位作为存储单元的大小还需要8个2KX8位芯片,因此03FFH应该划分为8段。</div><div>常用的虚拟存储器由( 主存-辅存)两级存储器组成。(虚拟存储器是为用户提供一个比主存储器大得多的可随机访问的地址空间的技术)</div><div>某文件管理系统采用位示图(bitmap)记录磁盘的使用情况。如果系统的字长为32位,磁盘物理块的大小为4MB,物理块依次编号为:0、1、2、位示图字依次编号为:0、1、2、那么16385号物理块的使用情况在位示图中的第(<strong>512</strong> )个字中描述;如果磁盘的容量为1000GB,那么位示图需要( <strong>8000</strong>)个字来表示。</div><div>如题所示,位示图中一个字表示一个物理块的地址,因此<code>16385/32=512.03</code>,因此使用第512个字来描述。</div><div>第二空,物理块数量为<code>1000*1024/4,</code>需要的字数量<code>1000*1024/4/32</code></div><h4 id="fu8oM"><a name="t40"></a><a></a>40.网络攻击</h4><div>拒绝服务(DoS):使用大量的连接请求攻击计算机,使得所有可用的系统资源都被消耗殆尽</div><div>口令入侵:是指使用某些合法用户的账号和口令登录到目的主机,然后再实施攻击活动。</div><div>网络攻击分为主动攻击和被动攻击两种。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_db08ce65591b46f3a58d5d2ca8a3b163.png%22%2C%22originWidth%22%3A467%2C%22originHeight%22%3A358%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A467%2C%22height%22%3A358%7D"></span></div><div>主动与被动主要区别是是否修改数据。被动攻击包括嗅探、信息收集等攻击方法,其中有流量分析,系统干涉</div><h4 id="82m6p"><a name="t41"></a><a></a>41.编译原理</h4><div>词法分析、语法分析、语义分析、中间代码生成、代码优化和目标代码生成。</div><div>其中中间代码生成、代码优化非必须。</div><div>对声明语句,填入合理组织的符号表</div><div>对可执行语句,则是翻译成中间代码或目标代码</div><div>语法制导翻译是一种(静态语义分析 )方法。(随着语法分析的进行,执行属性值的计算,完成语义分析和翻译的任务。)</div><h4 id="xD3TK"><a name="t42"></a><a></a>42.文件系统</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_6016705a6ab842f5b0a81101d9d976b5.png%22%2C%22originWidth%22%3A914%2C%22originHeight%22%3A95%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A914%2C%22height%22%3A95%7D"></span></div><div>磁盘块的大小为512B,每个块号需占3B,因此一个磁盘物理块可存放512/3=170个块号。</div><div>根索引采用一级索引时的文件最大长度为:</div><div>170X512/1024=87040/1024=85KB</div><div>根索引采用二级索引时的文件最大长度为:</div><div>170X170X512/1024=28900X512/1024=14450KB</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_dd9d4d802cfb4ea3b5f8815d7ea8cf15.png%22%2C%22originWidth%22%3A818%2C%22originHeight%22%3A355%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A818%2C%22height%22%3A355%7D"></span></div><div>根据题意,磁盘索引块为1KB字节,每个地址项大小为4字节,故每个磁盘索引块可存放1024/4=256个物理块地址。又因为文件索引节点中有8个地址项,其中5个地址项为直接地址索引,这意味着逻辑块号为0〜4的为直接地址索引;2个地址项是一级间接地址索引,这意味着第一个地址项指出的物理块中存放逻辑块号为5〜260的物理块号,第一个地址项指出的物理块中存放逻辑块号为261〜516的物理块号;1个地址项是二级间接地址索引,该地址项指出的物理块存放了256个间接索引表的地址,这256个间接索引表存放逻辑块号为517〜66052的物理块号。</div><div>经上分析不难得出,若要访问文件的逻辑块号分别为5和518,则系统应分别采用一级间接地址索引和二级间接地址索引。</div><h4 id="p9Few"><a name="t43"></a><a></a>43.冗余技术</h4><div>冗余技术分为4类:</div><div>(1)结构冗余,按其工作方法可以分为静态、动态和混合冗余;</div><div>(2)信息冗余,指的是为了检测或纠正信息在运算或传输中的错误另外加的一部分信息</div><div>(3)时间冗余,是指以重复执行指令或程序来消除瞬时错误带来的影响;</div><div>(4) 冗余附件技术,是指为实现上述冗余技术所需的资源和技术。</div><h4 id="ZIdis"><a name="t44"></a><a></a>44.有限自动机DFA和无限自动机NFA</h4><div>确定的有限自动机和不确定的有限自动机的判断:</div><div>就是看关于该结点的路径相同数字是否到达不同的结点,如果相同数字不同结点就是不确定的有限自动机。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_19ce6ab89f6449c0a3c9b499f0cdb392.png%22%2C%22originWidth%22%3A865%2C%22originHeight%22%3A458%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A865%2C%22height%22%3A458%7D"></span></div><div>上图中M1是不确定的有限自动机、M2是确定的有限自动机</div><div>因为,M1中状态A的输入为0时可以转换成状态A也能转换成状态B,对于同一输入没有唯一的转换状态</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_fae589d327bf44649e33320fcc8602af.png%22%2C%22originWidth%22%3A544%2C%22originHeight%22%3A362%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A544%2C%22height%22%3A362%7D"></span></div><div>由于a和b都是n次,不能用正规式表示。且a都在b前,无法用有限</div><div>正规集可用正规式描述,用有限自动机识别</div><div>在编译过程中,有限自动机(NFA或DFA)是进行( 词法分析)的适当工具</div><h4 id="zYbCE"><a name="t45"></a><a></a>46.</h4><div>CIF是常用的标准化图像格式,CIF视频格式的图像分辨率为352X288像素。</div><div>计算机通过MIC (话筒接口)收到的信号是音频模拟信号,(声卡将其转化为数字信号,存储至计算机)</div><div>音乐合成技术主要有调频(FM)音乐合成、波形表(WaveTable)音乐合成两种方式。wavetable的音质更好</div><div>SMTP传输的邮件报文需采用ASCII进行编码。</div><div>dpi是描述图像分辨率的单位,表示每英寸多少像素点, 即组成一幅图像的像素密度。</div><h4 id="yGiPc"><a name="t46"></a><a></a>47.可靠性和可用性</h4><div>可靠性:一定时间间隔内,一定条件下无失效运作的概率</div><div>可用性:一定时间点上,正确运行的概率</div><div>可维护性:在一定时间间隔内,完成维护活动的概率</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_2fe4bbb587a048e1abcac9d8ccb7f889.png%22%2C%22originWidth%22%3A904%2C%22originHeight%22%3A362%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A904%2C%22height%22%3A362%7D"></span></div><h4 id="BVTzV"><a name="t47"></a><a></a>48.数据库(主属性和非主属性)</h4><div>给定关系模式R,U = {A,B,C},F={AB→C,C→B}。关系R( )且分别有( )。</div><div>第一空:AB和AC</div><div>第二空:0个非主属性和3个主属性</div><div>由于AB、AC都属于候选码,包含在候选码中的属性都称为主属性,</div><h4 id="zGlR7"><a name="t48"></a><a></a>49.哈希冲突(线性探测的开放定址法)</h4><div>对于关键字序列(26,25,72,38,8,18,59),采用散列函数H(Key)=Key mod 13构造散列表(哈希表)。若采用线性探测的开放定址法解决冲突(顺序地探查可用存储单元), 则关键字59所在散列表中的地址为( )。</div><div>首先根据Key mod 13 将26,25,72,38,8,18填到表中</div><div>59%13=7,然而位置7处有值,产生冲突。因此地址+1,位置8也冲突。地址继续+1,位置9不冲突,因此59存放在位置9</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_4fbda16755644a8fa21cbd40c485628d.png%22%2C%22originWidth%22%3A892%2C%22originHeight%22%3A189%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A892%2C%22height%22%3A189%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_d9d1817940a74ab58e724bc80692aca1.png%22%2C%22originWidth%22%3A935%2C%22originHeight%22%3A350%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A935%2C%22height%22%3A350%7D"></span></div><h4 id="XlBNC"><a name="t49"></a><a></a>50.数据库赋权限</h4><div>将Students表的插入权限赋予用户UserA,并允许其将该权限授予他人,应使用的SQL语句为: GRANT ( ) TABLE Students TO UserA ( );</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_121b770b675648cfbb7145bed9a78a8f.png%22%2C%22originWidth%22%3A945%2C%22originHeight%22%3A218%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A945%2C%22height%22%3A218%7D"></span></div><div>授权语句的格式如下:</div><div>GRANT〈权限> [,<权限>]…[ON<对象类型><对象名>]</div><div>TO <用户>[,<用户][WITH GRANT OPTION];</div><div>若在授权语句中指定了 “WITH GRANT OPTION”子句,那么,获得了权限的用户还可以将该权限赋给其他用户。</div><h4 id="GX5dw"><a name="t50"></a><a></a>51.指令寻址</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_ec2b5d605f404592a83b4bab28b040ec.png%22%2C%22originWidth%22%3A796%2C%22originHeight%22%3A176%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A796%2C%22height%22%3A176%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_3e4b7cdca9e64f37a259838577e74d52.png%22%2C%22originWidth%22%3A896%2C%22originHeight%22%3A342%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A896%2C%22height%22%3A342%7D"></span></div><div>R1是寄存器,属于寄存器寻址方式,45是立即数,属于立即寻址方式。</div><h4 id="BEfkx"><a name="t51"></a><a></a>52. 渐进符号</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_d354ef135535415b9c24fd00bd26d10b.png%22%2C%22originWidth%22%3A822%2C%22originHeight%22%3A331%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A822%2C%22height%22%3A331%7D"></span></div><div>f(n)就是表达式左边的,<span>g ( n ) g(n)</span><em>g</em><span>(</span><em>n</em><span>)</span>就是表达式右边<span>Θ Θ</span><span>Θ</span>里的内容</div><div><span>Θ Θ</span><span>Θ</span>相当于紧确界,要求<span>c 1 g ( n ) ≤ f ( n ) ≤ c 2 g ( n ) c_1g(n)≤ f(n)≤c_2g(n)</span><em>c</em><span><span>1</span></span><span></span><em>g</em><span>(</span><em>n</em><span>)</span><span>≤</span><em>f</em><span>(</span><em>n</em><span>)</span><span>≤</span><em>c</em><span><span>2</span></span><span></span><em>g</em><span>(</span><em>n</em><span>)</span></div><div><span>O O</span><em>O</em>表示上界,要求<span>f ( n ) < = c g ( n ) f(n)<=cg(n)</span><em>f</em><span>(</span><em>n</em><span>)</span><span><=</span><em>c</em><em>g</em><span>(</span><em>n</em><span>)</span></div><div><span>Ω 表 Ω表</span><span>Ω</span><span>表</span>示下界,要求<span>f ( n ) > = c g ( n ) f(n)>=cg(n)</span><em>f</em><span>(</span><em>n</em><span>)</span><span>>=</span><em>c</em><em>g</em><span>(</span><em>n</em><span>)</span></div><div>由于无法满足<span>N 2 < C N N^2<CN</span><em>N</em><span><span>2</span></span><span><</span><em>CN</em>,    C选项错误</div><h4 id="W5NXL"><a name="t52"></a><a></a>53.协议</h4><ul><li>SSL(Secure Socket Layer)和TLS(Transport Layer Security) :都是传输层安全协议,TLS是SSL3.0的后续版本</li><li>PGP(Pretty Good Privacy):优良保密协议,用于对消息进行加密与验证<br />IPsec:网络层安全协议</li></ul><div>ICMP是网络层协议,是一个差错报告机制</div><div>SNMP简单网络管理协议</div><div>ARP和ICMP都属于网络层协议</div><div>X.25是分组交换网上的协议,也归于网络层。</div><div>TELNET是远程登录服务的标准协议</div><div>在发送电子邮件附加多媒体数据时需采用(MIME )协议来支持邮件传输。(MIME它是一个互联网标准,扩展了电子邮件标准,使其能够支持多媒体数据。)</div><div>使用ADSL接入Internet,用户端需要安装(PPPoE )协议。</div><div><strong>邮件协议</strong></div><div>SMTP邮件传输协议。</div><div>POP3邮件收取协议。</div><div>IMAP4协议与POP3协议一样也是规定个人计算机如何访问网上的邮件的服务器进行收发邮件的协议,但是IMAP4协议同POP3协议相比更高级。</div><div>MIME(Multipurpose Internet Mail Extensions)多用途互联网邮件扩展类型。</div><h4 id="JFwmw"><a name="t53"></a><a></a>54.数据库-视图</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_f93f0b5ea4004631b647871f4a7f2ddb.png%22%2C%22originWidth%22%3A833%2C%22originHeight%22%3A566%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A833%2C%22height%22%3A566%7D"></span></div><div>with check option保证了修改不会使得</div><div><a href="https://blog.csdn.net/weixin_46218781/article/details/105332073?spm=a2c6h.13046898.publish-article.240.72246ffarTwVs9" target="_blank">关于视图中with check option</a></div><h4 id="2tsZR"><a name="t54"></a><a></a>55.防火墙</h4><div>防火墙三个区域,按照受保护程序,从高到低正确的排列次序为(内网、DMZ和外网)</div><h4 id="IZ0yj"><a name="t55"></a><a></a>56.进程和死锁</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_9b2c6aef500c4f08a54c8ea3bf7d06e0.png%22%2C%22originWidth%22%3A825%2C%22originHeight%22%3A513%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A825%2C%22height%22%3A513%7D"></span></div><div>资源指出去的箭头表示预分配的资源,指向资源的表示申请的资源。</div><div>图(a)中,由于P1申请R2,R2不足,P1阻塞;P2申请R1,R1不足,R2阻塞</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_e06984d7f0684f42a21db0a8aad2f7b7.png%22%2C%22originWidth%22%3A823%2C%22originHeight%22%3A528%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A823%2C%22height%22%3A528%7D"></span></div><div>图(b)中,R1都分配完了,R2还剩下1个。因此P1和P3非阻塞,P2阻塞。</div><h4 id="RWtim"><a name="t56"></a><a></a>57.加密算法</h4><div>ECC、DSA和RSA都属于公开密钥加密算法,DES是典型的私钥加密体制</div><h4 id="W6vag"><a name="t57"></a><a></a>58.算法(动态规划、回溯)</h4><div>在求解某问题时,经过分析发现该问题具有最优子结构性质,求解过程中子问题被<strong>重复求解</strong>,则采用( <strong>动态规划</strong>)算法设计策略;若定义问题的解空间,以<strong>深度优先的方式搜索解空间</strong>,则采用(<strong>回溯</strong> )算法设计策略。</div><div><strong>分支限界法</strong>则是通过<strong>广度优先方式搜索解空间</strong>。</div><h4 id="Kqee4"><a name="t58"></a><a></a>59.IPV6和IPV4</h4><div>隧道技术:两个IPv6结点可以通过现有的IPv4网络进行通信</div><div>翻译技术:使得纯IPv6结点可以与纯IPv4结点进行通信</div><div>ipv4地址是32位,ipv6地址是128位</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_9abbe9cd20c149cf863fc9d657a824b8.png%22%2C%22originWidth%22%3A912%2C%22originHeight%22%3A345%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A912%2C%22height%22%3A345%7D"></span></div><div>无效的IP地址:169.254.X.X(windows) 和 0.0.0.0(linux)。</div><h4 id="aKv9B"><a name="t59"></a><a></a>60.算法时间复杂度计算</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_c65542fc08184ff3890ae84017d54a02.png%22%2C%22originWidth%22%3A917%2C%22originHeight%22%3A103%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A917%2C%22height%22%3A103%7D"></span></div><div>直接展开递归式T(n)=T(n-l)+n</div><div>=T(n - 2) + (n - 1) + n</div><div>=T(n - 3) + (n - 2) + (n - 1) + n</div><div>=1 + 2 + … + n</div><div>=n(n -1) / 2</div><div>因此渐进时间复杂度为O(n^2)</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_fd1f999001264f8bba5d65408ddd0613.png%22%2C%22originWidth%22%3A797%2C%22originHeight%22%3A128%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A797%2C%22height%22%3A128%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_4ed48cae8e524b96bfd1592d69cd880d.png%22%2C%22originWidth%22%3A1018%2C%22originHeight%22%3A127%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A1018%2C%22height%22%3A127%7D"></span></div><div>通过计算可知<span>l o g 2 8 = 3 log_2^8=3</span><em>l</em><em>o</em><em>g</em><span><span>2</span></span><span><span>8</span></span><span></span><span>=</span><span>3</span> 因此第一空时间复杂度为O(n^3)</div><div>第二空为了满足<span>l o g 4 x < 3 log_4^x<3</span><em>l</em><em>o</em><em>g</em><span><span>4</span></span><span><em>x</em></span><span></span><span><</span><span>3</span> x最大值为63</div><h4 id="vLfOO"><a name="t60"></a><a></a>61. 计算机体系结构分类</h4><div>Flynn分类法,是一种计算机体系结构分类法</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_c84708d530e44a0f8c6847839b381a46.png%22%2C%22originWidth%22%3A932%2C%22originHeight%22%3A325%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A932%2C%22height%22%3A325%7D"></span></div><div>单指令流单数据流机器(SISD)</div><div>单指令流多数据流机器(SIMD)</div><div>多指令流单数据流机器(MISD)</div><div>多指令流多数据流机器(MIMD)</div><div>在实际情况中,采用多指令流处理多数据流才是更有效的方法。因此MISD只是作为理论模型出现</div><h4 id="xBK14"><a name="t61"></a><a></a>62.据库结构设计</h4><div>数据库设计主要分为需求分析、概念结构、逻辑结构和物理结构设计四个阶段</div><div>关系规范化在数据库设计的(逻辑设计 )阶段进行。</div><h4 id="qnSr2"><a name="t62"></a><a></a>63.嵌入式系统</h4><div>嵌入式系统初始化过程可以分为3个主要环节,按照自底向上、从硬件到软件的次序依次为:<strong>片级初始化、板级初始化和系统级初始化。</strong></div><h4 id="d4iui"><a name="t63"></a><a></a>65.URL</h4><div data-card-type="block" data-ready-card="codeblock" data-card-value="data:%7B%22mode%22%3A%22plain%22%2C%22code%22%3A%22protocol%20%3A%2F%2F%20hostname%5B%3Aport%5D%20%2F%20path%20%2Ffilename%5Cn%E2%80%A2%201%22%2C%22id%22%3A%22dKeI5%22%7D"></div><div>其中,protocol指定使用的传输协议,最常见的是HTTP或者HTTPS协议,也可以有其他协议,如file、ftp、, gopher、mms、ed2k等;hostname是指主机名,即存放资源的服务域名或者IP地址;port是指各种传输协议所使用的默认端口号,该选项是可选选项,例如http的默认端口号为80,一般可以省略,如果为了安全考虑,可以更改默认的端口号,这时,该选项是必选的;path是指路径,有一个或者多个“/”分隔,一般用来表示主机上的一个目录或者文件地址;filename是指文件名,该选项用于指定需要打开 的文件名称。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_7d373a97fe534a3987c2aef38f6df119.png%22%2C%22originWidth%22%3A583%2C%22originHeight%22%3A369%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A583%2C%22height%22%3A369%7D"></span></div><div>一般情况下,一个URL可以采用“主机名.域名”的形式打开指定页面,也可以单独使用“域名”来打开指定页面,但是这样实现的前提是需进行相应的设置和对应。</div><h4 id="Io2Uh"><a name="t64"></a><a></a>66.基本概念</h4><div>VLIW:(Very Long Instruction Word,超长指令字)一种非常长的指令组合,它把许多条指令连在一起,增加了运算的速度。</div><h4 id="eStTK"><a name="t65"></a><a></a>67.语法分析方法</h4><div>语法分析方法分为两类:自上而下(自顶向下)分析法和自下而上(自底向上)分析法,</div><div><strong>递归下降分析法</strong>和<strong>预测分析法</strong>属于自上而下分析法</div><div><strong>移进-归约</strong>分析法属于自下而上(自底向上)分析法。</div><h4 id="foz1H"><a name="t66"></a><a></a>68.指令周期</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_5c6828760238449794259f5e21c56b10.png%22%2C%22originWidth%22%3A920%2C%22originHeight%22%3A378%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A920%2C%22height%22%3A378%7D"></span></div><div>指令周期是执行一条指令所需要的时间,一般由若干个机器周期组成,是从取指令、分析指令到执行完所需的全部时间。CPU执行指令的过程中,根据时序部件发出的时钟信号按部就班进行操作。在取指令阶段读取到的是指令,在分析指令和执行指令时,需要操作数时再去读操作数。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_a383380b8cac48c0a842f5dc450bcbd2.png%22%2C%22originWidth%22%3A906%2C%22originHeight%22%3A348%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A906%2C%22height%22%3A348%7D"></span></div><div>CPU首先从程序计数器(PC)获得需要执行的指令地址,从内存(或高速缓存)读取到的指令则暂存在指令寄存器(IR),然后进行分析和执行。</div><h4 id="6cXRI"><a name="t67"></a><a></a>69.浮点数</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_0e3b98531e1c404884be93415df3a5e1.png%22%2C%22originWidth%22%3A918%2C%22originHeight%22%3A391%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A918%2C%22height%22%3A391%7D"></span></div><div>浮点格式表示一个二进制数N的形式为N=2eXF,其中E称为阶码,F叫做尾数。在浮点表示法中,阶码通常为含符号的纯整数,尾数为含符号的纯小数。</div><div>指数为纯整数,阶符1位、阶码6位在补码表示方式下可表示的最大数为63(26-1),最小数为-64(-26)。尾数用补码表示时最小数为-1、最大数为1-2-8,因此该浮点表示的最小数为-263,最大数为(1-2-8)×263。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_f719000fb36f4fcea93b3f5d74ca6c1f.png%22%2C%22originWidth%22%3A812%2C%22originHeight%22%3A306%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A812%2C%22height%22%3A306%7D"></span></div><div>是尾数向后,右,不是看小数点</div><h4 id="IHCCF"><a name="t68"></a><a></a>70.加密算法</h4><div>RSA是一种非对称加密算法,由于加密和解密的密钥不同,因此便于密钥管理和分发,同时在用户或者机构之间进行身份认证方面有较好的应用;</div><div>SHA-1是一种安全散列算法,常用宁对接收到的明文输入产生固定长度的输出,来确保明文在传输过程中不会被篡改;</div><div>MD5是一种使用最为广泛的报文摘要算法;</div><div>RC5是一种用于对明文进行加密的算法,在加密速度和强度上,均较为合适,适用于大量明文进行加密并传输。</div><h4 id="LQqGd"><a name="t69"></a><a></a>71.模块的内聚</h4><div>模块的内聚是一个模块内部各个元素彼此结合的紧密程度的度量。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_ca4d96f5d0394197b014febdac525af3.png%22%2C%22originWidth%22%3A862%2C%22originHeight%22%3A303%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A862%2C%22height%22%3A303%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_d35463755ab64105a1fb175061ec009c.png%22%2C%22originWidth%22%3A933%2C%22originHeight%22%3A399%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A933%2C%22height%22%3A399%7D"></span></div><h4 id="D0eL9"><a name="t70"></a><a></a>72.主存(sram、dram)</h4><div>计算机系统的主存主要是由( DRAM)构成的。</div><div>随机访问存储器(RAM)有两类:静态的(SRAM)和动态的(DRAM), SRAM 比DRAM速度更快,但也贵得多。RAM用来作为高速缓冲存储器(Cache), DRAM 用来作为主存及图形系统的帧缓冲区。</div><div>SRAM与DRAM的区别只在于一个是静态一个是动态。由于SRAM不需要刷新电路就能够保存数据,所以具有静止存取数据的作用。而DRAM则需要不停地刷新电路,否则内部的数据将会消失。</div><div>LASH和EEPROM都能掉电存储数据,不需要刷新电路,FLASH按扇区操作,EEPROM则按字节操作</div><div>DRAM集成率相对较低,功耗相对较大,需要动态刷新。SRAM集成率相对较高,功耗相对较小,不需要动态刷新</div><h4 id="Wxt7z"><a name="t71"></a><a></a>73.编程语言</h4><div>声明式系内函数式程序设计语言:Lisp</div><div>命令式系内过程式程序设计语言:C Fortran</div><div>面向对象结构化设计语言c++ c# java physon</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_9f56947face14fc98375cf763bb73cb3.png%22%2C%22originWidth%22%3A434%2C%22originHeight%22%3A169%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A434%2C%22height%22%3A169%7D"></span></div><div>即时编译:可以进行热编译</div><div>php.javascript都属于动态语言,脚本语言都是动态语言</div><h4 id="fBeQM"><a name="t72"></a><a></a>74.sql语句</h4><div>sql函数定义</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_5f8221dd4e954faea7cefab8fe60ae36.png%22%2C%22originWidth%22%3A936%2C%22originHeight%22%3A617%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A936%2C%22height%22%3A617%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_6172442eb7d24404874f93a79e2a6573.png%22%2C%22originWidth%22%3A921%2C%22originHeight%22%3A608%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A921%2C%22height%22%3A608%7D"></span></div><h4 id="YnBna"><a name="t73"></a><a></a>75.RAM和ROM</h4><div>RAM(random access memory)即随机存储内存,这种存储器在断电时将丢失其存储内容,故主要用于存储短时间使用的程序。ROM(Read-Only Memory)即只读内存,是一种只能读出事先所存数据的固态半导体存储器。 手机中的RAM和ROM分别对应电脑的内存和硬盘,内存负责程序的运行以及数据交换</div><div>在微机系统中,BIOS(基本输入输出系统)保存在( ROM)中。</div><h4 id="EUQSP"><a name="t74"></a><a></a>76.CMM</h4><div>CMM分为五个等级</div><div>(1)初始级(initial):工作无序</div><div>(2)可重复级(Repeatable):管理制度化, 初步实现标准化</div><div>(3)已定义级(Defined):已实现标准化、文档化。</div><div>(4)已管理级(Managed):产品和过程已建立了定量的质量目标</div><div>(5)优化级(Optimizing):可集中精力改进过程</div><div>CMMI是把所有现存的与将被发展出来的各种能力成熟度模型,集成到一个框架中去</div><h4 id="66ZmW"><a name="t75"></a><a></a>77.</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_0fb47d70bd674a2c9c4a3bf5e3df8c6c.png%22%2C%22originWidth%22%3A913%2C%22originHeight%22%3A316%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A913%2C%22height%22%3A316%7D"></span></div><div>计算得到CPI为3.5时钟周期</div><div>也就是说一条指令的平均时钟周期</div><div>那么一条指令执行的时间为3.5/2.8G</div><div>运算速度为1/指令执行时间:1/(3.5/2.8G)=800M</div><h4 id="VmhLG"><a name="t76"></a><a></a>78.稀疏矩阵</h4><div><strong>稀疏矩阵的存储方式</strong></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_12bd8dc6ccdc48e286e3847c8bd1a497.png%22%2C%22originWidth%22%3A459%2C%22originHeight%22%3A373%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A459%2C%22height%22%3A373%7D"></span></div><h4 id="yp2Z5"><a name="t77"></a><a></a>79.堆</h4><div>对 数组 A=(2,8,7,1,3,5,6,4)构建大顶 堆 为( )(用 数组 表示)</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_63a34c7676e04f3c855bc857bfe07cc7.png%22%2C%22originWidth%22%3A914%2C%22originHeight%22%3A246%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A914%2C%22height%22%3A246%7D"></span></div><div><a href="https://blog.csdn.net/li13437542099/article/details/130510567?spm=a2c6h.13046898.publish-article.241.72246ffarTwVs9" target="_blank">建立堆</a></div><h4 id="mJKwH"><a name="t78"></a><a></a>80.冯诺依曼计算机</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_2bb323eaf8e24649b5ed5f872f1be384.png%22%2C%22originWidth%22%3A572%2C%22originHeight%22%3A348%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A572%2C%22height%22%3A348%7D"></span></div><div>主要特征是:指令与数据都以二进制形式储存在存储器里;指令根据其储存的顺序执行。</div><div>是一种将程序指令存储器和数据存储器合并在一起的计算机设计概念结构。</div><h4 id="UYZWr"><a name="t79"></a><a></a>81.可靠度计算</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_c9538f03f1c345a59b223bc48d05724b.png%22%2C%22originWidth%22%3A951%2C%22originHeight%22%3A439%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A951%2C%22height%22%3A439%7D"></span></div><div>“计算机系统的可靠性是指从它开始运行(t=0)到某时刻t这段时间内能正常运行的概率”。</div><div>所以正常运行概率=(2000-4)÷2000=0.998</div><h4 id="6FVJO"><a name="t80"></a><a></a>82.域名计算</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_014f0a5923a442bd99ad97de013eeab2.png%22%2C%22originWidth%22%3A950%2C%22originHeight%22%3A374%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A950%2C%22height%22%3A374%7D"></span></div><h4 id="3hdZU"><a name="t81"></a><a></a>83.故障</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_f70ad38d2f78405cb295aa701dda318e.png%22%2C%22originWidth%22%3A900%2C%22originHeight%22%3A360%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A900%2C%22height%22%3A360%7D"></span></div><div>事务内部的故障:如运算溢出故障、并发事务死锁故障</div><div>系统故障:操作系统漏洞、停电等</div><div>介质故障:磁盘损坏等</div><div>计算机病毒故障</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_ec010538e9dc4cc6b7fc38245454df2c.png%22%2C%22originWidth%22%3A847%2C%22originHeight%22%3A621%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A847%2C%22height%22%3A621%7D"></span></div><h2 id="z8n8x"><a name="t82"></a><a></a>数据结构</h2><h4 id="09w0L"><a name="t83"></a><a></a>1.树转为二叉树、森林转化成树</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_64b01f5122e34a74b17f7251fddbc9d1.png%22%2C%22originWidth%22%3A897%2C%22originHeight%22%3A480%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A897%2C%22height%22%3A480%7D"></span></div><div>将一棵树转换成二叉树的方法是,对于每个结点,其左子树即为原来的第一个孩子,右子树连向下一个兄弟结点。假设第一棵树转换成的二叉树为 T1,第二棵树转换成的二叉树为 T2,第三棵树转换成的二叉树为 T3。将三棵树合并成一棵二叉树的过程是,将 T2 作为 T1 的右子树,再将 T3 作为 T2 的右子树。因此,该二叉树的右子树包含第二棵树和第三棵树中所有结点。所以,该二叉树的右子树包含结点总数为 n2 + n3</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_3d82abef3cb54fc0894ba238c705cd89.png%22%2C%22originWidth%22%3A829%2C%22originHeight%22%3A492%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A829%2C%22height%22%3A492%7D"></span></div><h4 id="jx7rT"><a name="t84"></a><a></a>2.b树/b+树</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_9c2ad826745947efa011edd477ff8238.png%22%2C%22originWidth%22%3A909%2C%22originHeight%22%3A690%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A909%2C%22height%22%3A690%7D"></span></div><div>在m阶B-树的定义中,要求:</div><div>①树中的每个节点至多有M棵子树</div><div>②若根节点不是叶子节点,则至少有两棵子树。</div><div>③除根之外的所有非终端节点至少有[M/2]棵子树。</div><div>即 M/2<=X<=M</div><div>因此,题图中所示B-树最可能为4阶B树。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_7ffd3d6336b442349ed2006d3221403e.png%22%2C%22originWidth%22%3A378%2C%22originHeight%22%3A391%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A378%2C%22height%22%3A391%7D"></span></div><div>D为B+树的特性</div><h4 id="2YFeE"><a name="t85"></a><a></a>3.哈希表</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_1264d47135d6427b91c6e39e2ec68262.png%22%2C%22originWidth%22%3A584%2C%22originHeight%22%3A444%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A584%2C%22height%22%3A444%7D"></span></div><div>要减少冲突,就要设法使哈希函数尽可能<strong>均匀</strong>地把关键字映射到存储区的各个存储地址上,这样就可以提高查找效率。而不是复杂</div><div>关键字就是要存储的数据</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_4a8176f0b76c419eaf1a99d67013df0a.png%22%2C%22originWidth%22%3A591%2C%22originHeight%22%3A348%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A591%2C%22height%22%3A348%7D"></span></div><div>若与同义词冲突,还要与哈希值得到的地址+1处比较,因此不仅仅与同义词比较。</div><div>线性探测法虽然空间利用率高,但容易聚集在一块</div><h4 id="zoTuN"><a name="t86"></a><a></a>4.排序的应用题</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_7f5451ce7c524f168136794ba7392f34.png%22%2C%22originWidth%22%3A913%2C%22originHeight%22%3A372%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A913%2C%22height%22%3A372%7D"></span></div><div>排序码是指sort中的key,题目中排序码就是指每个数值。相同的数值相对位置不变,就是说<code>21</code>和<code>21*</code>(这个*用来区分21)的相对位置要保持不变,才能算稳定的排序算法。</div><div>因此只要用选择排序来检查一下,看看会不会影响<code>21</code>和<code>21*</code>之间的顺序。</div><h4 id="rHiau"><a name="t87"></a><a></a>5.优先队列</h4><div>其中除了获得优先队列的最大元素的时间复杂度为(Θ1)之外,其他几个操作的时间复杂度均为二叉树的高度,即Θ(lgn)。</div><h4 id="KZEVD"><a name="t88"></a><a></a>6.二叉树形态数</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_6174c73f192d4e84b055d83d98d19707.png%22%2C%22originWidth%22%3A793%2C%22originHeight%22%3A391%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A793%2C%22height%22%3A391%7D"></span></div><div>题干给出具有3个结点的二叉树有5种,多增加一个根节点之后,可以有左右不同的3结点二叉树,所以左右分别有单个3结点子树的二叉树有2*5=10种;除此之外,3个结点可以构造成2结点子树和单节点子树,所有不同共有4种。</div><div>综上,具有4个结点的二叉树有14种。</div><div>记住<code>f(n)=(2n)! / n!(n+1)!</code> 结点数n与二叉树形态f(n)的关系式</div><h4 id="x4wYS"><a name="t89"></a><a></a>7.循环队列</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_a3313776521e47be98507ebe8de9d99e.png%22%2C%22originWidth%22%3A457%2C%22originHeight%22%3A392%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A457%2C%22height%22%3A392%7D"></span></div><div>循环队列一般有首尾两个指针,不在同一个端点。</div><h4 id="kpiut"><a name="t90"></a><a></a>8.树的节点计算</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_631e255bbd394778a6cd1fbcb5be82d8.png%22%2C%22originWidth%22%3A912%2C%22originHeight%22%3A66%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A912%2C%22height%22%3A66%7D"></span></div><div><strong>利用公式,分支数量+1=节点总数</strong></div><div>设树中的节点总数为n、分支数目为m,那么n=5+4+2+叶子节点数,m=5X1+4X2+2X3。</div><div>在树中,节点总数等于分支数目加上1,即n=m+1。</div><div>因此,叶子节点数=5X1+4X2+2X3+1-5-4-2=9</div><h4 id="WGr4x"><a name="t91"></a><a></a>数组</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_b3fbde4e6bf94e6386f8b065bc9ee024.png%22%2C%22originWidth%22%3A924%2C%22originHeight%22%3A370%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A924%2C%22height%22%3A370%7D"></span></div><h4 id="lrJTP"><a name="t92"></a><a></a>UML图</h4><div>类图(Class Diagram)展现了一组对象、接口、协作和它们之间的关系。</div><div>对象图(Object Diagram)展现了某一时刻一组对象以及它们之间的关系。</div><div>用例图(Use Case Diagram)展现了一组用例、参与者(Actor)以及它们之间的关系。</div><div>交互图用于对系统的动态方面进行建模。一张交互图表现的是一个交互,由一组对象和它们之间的关系组成,包含它们之间可能传递的消息。</div><div>部署图(Deployment Diagram)是用来对面向对象系统的物理方面建模的方法,展现了运行时处理结点以及其中构件(制品)的配置。</div><div>组件图(Component Diagram)展现了一组组件之间的组织和依赖。</div><h4 id="01rHj"><a name="t93"></a><a></a>设计模式的应用</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_4818d444af804618a0bb03b667c7f635.png%22%2C%22originWidth%22%3A677%2C%22originHeight%22%3A333%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A677%2C%22height%22%3A333%7D"></span></div><div>图形用户界面(GUI)组件定义不同平台的并行类层次结构,适合采用此模式,其中抽象工厂声明一个创建抽象界面组件的操作接口,具体工厂实现创建产品对象的操作。</div><h2 id="YtlgV"><a name="t94"></a><a></a>操作系统</h2><h4 id="E4dp2"><a name="t95"></a><a></a>磁盘容量计算</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_0c41628938b740c4ba53b5523e226fe0.png%22%2C%22originWidth%22%3A929%2C%22originHeight%22%3A442%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A929%2C%22height%22%3A442%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_ec9d9b198f7f4e039d34868cb6e29918.png%22%2C%22originWidth%22%3A863%2C%22originHeight%22%3A318%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A863%2C%22height%22%3A318%7D"></span></div><div>乘10是因为单位cm转为mm,除以2是为了直径转为半径</div><h4 id="QIjPC"><a name="t96"></a><a></a>线程</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_be0b9794e06e4acbbfd1124bb4eebea3.png%22%2C%22originWidth%22%3A654%2C%22originHeight%22%3A351%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A654%2C%22height%22%3A351%7D"></span></div><div>线程的代码段,全局变量共享,但不共享栈指针</div><h4 id="FKHPK"><a name="t97"></a><a></a>文件系统</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_98b9685e965a4fab9286e64573381b3c.png%22%2C%22originWidth%22%3A936%2C%22originHeight%22%3A381%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A936%2C%22height%22%3A381%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_ebdfd0b2f2d64a8c845cfceb28e0723d.png%22%2C%22originWidth%22%3A894%2C%22originHeight%22%3A873%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A894%2C%22height%22%3A873%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_1fb3e90968a344c5a8e2de93482fe104.png%22%2C%22originWidth%22%3A925%2C%22originHeight%22%3A388%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A925%2C%22height%22%3A388%7D"></span></div><div>一个数据块可以放1kb/4b=256个地址,因此一级索引为256。二级索引为256<em>256<br />于是可表示最大长度为5+256+256</em>256</div><h4 id="eOmhn"><a name="t98"></a><a></a>send</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_9ba4aaace0cd47af9f2563052d517141.png%22%2C%22originWidth%22%3A801%2C%22originHeight%22%3A316%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A801%2C%22height%22%3A316%7D"></span></div><div>就是设置成了阻塞状态,对方接受缓冲区满了,send阻塞</div><h4 id="SkOpB"><a name="t99"></a><a></a>双缓冲区读写</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_9d82a9e4adae46f29ed50577cd29995d.png%22%2C%22originWidth%22%3A935%2C%22originHeight%22%3A424%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A935%2C%22height%22%3A424%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_961a3c9d91d74f75afa9675d511c3bc4.png%22%2C%22originWidth%22%3A891%2C%22originHeight%22%3A608%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A891%2C%22height%22%3A608%7D"></span></div><h2 id="HtQHj"><a name="t100"></a><a></a>语言</h2><h4 id="w9iT5"><a name="t101"></a><a></a>python</h4><ol><li><br /></li></ol><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_18dedd88d74c4302ae356811c53ff3b2.png%22%2C%22originWidth%22%3A452%2C%22originHeight%22%3A343%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A452%2C%22height%22%3A343%7D"></span></div><div>在 Python 语言中,用逗号分隔一组值,可以创建一个元组,A和B均可以</div><div>D中应该添加逗号,(1,)来表示元组,否则会有歧义</div><ol start="2"><li><br /></li></ol><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_2843fce6ed21481e97d8d10128506e8f.png%22%2C%22originWidth%22%3A491%2C%22originHeight%22%3A143%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A491%2C%22height%22%3A143%7D"></span></div><div>python中for和while后面都可以接else</div><ol start="3"><li><br /></li></ol><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_48524dec5d8743dbb4ed0fccd779380e.png%22%2C%22originWidth%22%3A522%2C%22originHeight%22%3A352%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A522%2C%22height%22%3A352%7D"></span></div><div>注意是list</div><div>4.</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_8a8d2229c8e64b8eb15983da98bc11c5.png%22%2C%22originWidth%22%3A377%2C%22originHeight%22%3A350%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A377%2C%22height%22%3A350%7D"></span></div><div>5.</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_84ca020d0ca54bcca8999154a91856ab.png%22%2C%22originWidth%22%3A678%2C%22originHeight%22%3A396%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A678%2C%22height%22%3A396%7D"></span></div><div>输入的都是str</div><h4 id="vZxav"><a name="t102"></a><a></a>词法分析</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_ef84d3d85aba4aff96233686c6470c15.png%22%2C%22originWidth%22%3A905%2C%22originHeight%22%3A342%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A905%2C%22height%22%3A342%7D"></span></div><div>一个文法的语言是该文法能产生的句子的集合。一个文法产生的句子是从文法开始符号出发推导出的所有终结符号串。</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_dbf0e4ed5960462dbd76580a216df4f9.png%22%2C%22originWidth%22%3A854%2C%22originHeight%22%3A723%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A854%2C%22height%22%3A723%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_8aad34c299204b2d8fc41b06fb8f09d7.png%22%2C%22originWidth%22%3A928%2C%22originHeight%22%3A234%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A928%2C%22height%22%3A234%7D"></span></div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_61033f2e74554c05b974693b92401cee.png%22%2C%22originWidth%22%3A868%2C%22originHeight%22%3A391%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A868%2C%22height%22%3A391%7D"></span></div><h4 id="QM9ef"><a name="t103"></a><a></a>中间代码</h4><div>常用的中间代码有树、后缀式、三元式和四元式等形式。</div><h4 id="4qK94"><a name="t104"></a><a></a>存储</h4><div>在对高级语言源程序进行编译的过程中,为源程序中变量所分配的存储单元的地址属于(逻辑地址 )。(在运行时装入,再映射为物理地址)</div><h4 id="H5WFm"><a name="t105"></a><a></a>编程语言文法</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_54be46ca36aa48ddb01149a5e2e2ddd3.png%22%2C%22originWidth%22%3A430%2C%22originHeight%22%3A343%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A430%2C%22height%22%3A343%7D"></span></div><div><strong>短语结构文法</strong>或无限制文法也称为0型文法:可使用任何的语法描述形式。</div><div><strong>上下文有关文法</strong>也称为1型文法:语法形式为:xSy->xAy。也就是说,S (非终结符号)推导出A (非终结符号与终结符号的混合串)是和上下文x,y相关的,即S只有在上下文x,y的环境中才能推导出A。</div><div><strong>上下文无关文法</strong>也称为2型文法:语法形式如下:S->A,即S可以无条件的推导出A,与上下文无关。</div><div><strong>正规文法</strong>也称为3型文法,等价于正则表达式,其描述能力相当于有穷自动机,语法形式如下:S->Aa,其中最后一个a必须为非终结符。</div><h2 id="K8mpj"><a name="t106"></a><a></a>软件测试</h2><h4 id="SLYyz"><a name="t107"></a><a></a>McCabe度量法</h4><div>McCabe复杂性度量又称<strong>环路度量</strong>,单一的顺序结构最为简单,循环和选择所构成的环路越多,程序就越复杂。</div><div><a href="https://blog.csdn.net/HLComet_Bay_WC/article/details/114956928?spm=a2c6h.13046898.publish-article.242.72246ffarTwVs9" target="_blank">参考链接</a></div><div>(1)流图中的区域数等于环形复杂度。</div><div>(2)流图G的环形复杂度V(G)=E-N+2,其中,E是流图中边的条数,N是结点数。</div><div>(3)流图G的环形复杂度V(G)=P+1,其中,P是流图中判定结点的数目。</div><div>通常使用方法2和方法3。推荐使用方法三</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_30b3b9b78d4a4620a22ef253daaa9958.png%22%2C%22originWidth%22%3A1239%2C%22originHeight%22%3A665%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A1239%2C%22height%22%3A665%7D"></span></div><div>作图中判定节点有2个,右图中有4个(看有没有分支就行了。)</div><div>因此他们的Mccabe复杂度分别为3和5</div><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_78b05e10140c4986a08119840c24724e.png%22%2C%22originWidth%22%3A904%2C%22originHeight%22%3A812%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A904%2C%22height%22%3A812%7D"></span></div><div>第一空:要满足条件覆盖,要求三个判断框的Y和N至少要经过一次,,即1Y2Y;1Y2N;1N3Y;1N3N,至少需要4个测试用例。(1Y表示第一个判断为Yes,3N表示第三个判断为No)</div><div>第二空:3个判断,因此复杂度为4</div><h4 id="MhD3d"><a name="t108"></a><a></a>软件开发模型</h4><div>瀑布模型:适用于项目开始时,需求确定</div><div>V模型:瀑布模型的变种,将测试和软件设计相结合起来</div><div>原型模型:需求模糊时,开发人员快速开发系统以理解或澄清问题,原型的用途是获知用户的真正需求。</div><div>螺旋模型:把开发活动和风险管理结合起来</div><h2 id="Syby0"><a name="t109"></a><a></a>面向对象</h2><h4 id="OzPWc"><a name="t110"></a><a></a>领域类模型</h4><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_cf6f5b674f6143d185d9622214b76b75.png%22%2C%22originWidth%22%3A330%2C%22originHeight%22%3A309%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A330%2C%22height%22%3A309%7D"></span></div><div>领域模型是从按对象分类的角度来创建对象领域的描述,包括定义<strong>概念</strong>、<strong>属性</strong>和<strong>关联</strong></div><div>其结果用一组显示领域概念和对象的图形一一类图来组织</div><h2 id="izHwP"><a name="t111"></a><a></a>软件工程</h2><h4 id="MW4VL"><a name="t112"></a><a></a>极限编程</h4><div>极限编程(XP)的十二个最佳实践:</div><div>计划游戏、小的发布、系统隐喻、简单设计、测试驱动、重构、结对编程、集体所有权、持续集成、每周工作40小时、现场客户和编码标准</div><h2 id="uU7LS"><a name="t113"></a><a></a>题目集合</h2><div><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_bbe3d70284ae4e65beb9212439ceeab1.png%22%2C%22originWidth%22%3A817%2C%22originHeight%22%3A385%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A817%2C%22height%22%3A385%7D"></span></div><div>鼠标等硬件和中断处理程序接近</div><div style="text-align: center; background-color: #F5F6F7;"><span data-card-type="inline" data-ready-card="image" data-card-value="data:%7B%22src%22%3A%22https%3A%2F%2Fucc.alicdn.com%2Fpic%2Fdeveloper-ecology%2Ficrbyoup3irem_bb31918eb2774a2d8e63a762b6d101b6.png%22%2C%22originWidth%22%3A1820%2C%22originHeight%22%3A1024%2C%22size%22%3A0%2C%22display%22%3A%22inline%22%2C%22align%22%3A%22left%22%2C%22link%22%3Anull%2C%22linkTarget%22%3A%22_blank%22%2C%22status%22%3A%22done%22%2C%22style%22%3A%22none%22%2C%22search%22%3A%22%22%2C%22margin%22%3A%7B%22top%22%3Afalse%2C%22bottom%22%3Afalse%7D%2C%22width%22%3A22%2C%22height%22%3A1024%7D"></span></div>
相关文章
|
6月前
|
敏捷开发 测试技术 项目管理
【软件设计师备考 专题 】准备软件设计师资格考试:复习指南和策略
【软件设计师备考 专题 】准备软件设计师资格考试:复习指南和策略
277 0
|
1月前
|
安全 测试技术 项目管理
中级软件设计师考试(软考中级)计算机专业英语
一些常用的英语词汇和短语,可能在软考中级设计师考试中有所帮助。
77 0
|
6月前
|
传感器 监控 算法
【软件设计师备考 专题 】模块测试的方法和实践
【软件设计师备考 专题 】模块测试的方法和实践
137 0
软件设计师考试思维导图
软件设计师考试思维导图
89 0
|
6月前
|
算法
【中级软件设计师】—(针对下午题)数据结构与算法基础(十)
【中级软件设计师】—(针对下午题)数据结构与算法基础(十)
【中级软件设计师】—(针对下午题)数据结构与算法基础(十)
|
6月前
|
存储 算法 搜索推荐
【中级软件设计师】—数据结构与算法基础考点总结篇(八)
【中级软件设计师】—数据结构与算法基础考点总结篇(八)
【中级软件设计师】—数据结构与算法基础考点总结篇(八)
|
11月前
|
存储 安全 算法
软件设计师笔记
软件设计师笔记
79 0
软件设计师笔记
|
设计模式 算法 网络协议
软件设计师(中级)详细复习过程总结
软件设计师(中级)详细复习过程总结
|
设计模式
|
算法 Java 测试技术
软考中级备考经验
软考中级备考经验
377 0
软考中级备考经验