<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sunflower_zzn的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/sunflower_zzn</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sunflower_zzn]]></copyright><item><title><![CDATA[霍尔管程&习题理解]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/112441582</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/112441582</guid><author>sunflower_zzn</author><pubDate>Sun, 10 Jan 2021 20:29:47 +0800</pubDate><description><![CDATA[管程
设计目的

将分散在各进程中的临界区集中起来管理
避免进程有意无意的违法同步操作
便于用高级语言来书写程序

定义
管程是由局部于自己的若干公共变量及其说明和所有访问这些公共变量的过程所组成的软件模块
形式结构


条件变量

条件变量是出现在管程内的一种数据结构，只能在管程中被访问，对管程内的所有过程是全局的，只能通过两个原语操作来控制它。


wait©：阻塞调用进程并释放管程，直到另一个进程在条件变量c上执行signal
signal©： 如果存在其他进程由于对条件变量c执行wait()而被阻塞]]></description><category></category></item><item><title><![CDATA[PV操作习题]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/112433904</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/112433904</guid><author>sunflower_zzn</author><pubDate>Sun, 10 Jan 2021 17:25:27 +0800</pubDate><description><![CDATA[记录PV操作学习过程中的一些习题相关代码

1、读者/写者问题
两组并发进程：读者/写者，共享一个文件F：

多个读者可以同读【允许同读】
只允许一个写者写文件【同写互斥】
写者写时不能被读者读【读写互斥】
写者写之前应该让已有读者写者都退出

读者优先
用wmutex来限制写者，使读者优先
semaphore rmutex=1，wmutex=1;
int readcount=1;

cobegin
    process Reader_i(){
    	while(true){
        	P(.]]></description><category></category></item><item><title><![CDATA[GDT与LDT]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/111669120</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/111669120</guid><author>sunflower_zzn</author><pubDate>Fri, 25 Dec 2020 11:54:34 +0800</pubDate><description><![CDATA[GDT与LDT

LDT属于进程，GDT属于系统，所有进程共享一个GDT
GDT/LDT都是保护模式！

参考：
GDT、GDTR、LDT、LDTR的理解
两张图看懂GDT、GDTR、LDT、LDTR的关系
GDT与LDT
入口地址
GDT的入口地址存放在GDTR中，使用 LGDT xxxxxxxx:yyyy 将GDT的入口地址装入GDTR 48位

LDT的入口地址存放在GDT的表项中，LDTR 16位存放LDT描述符在GDT中的索引，通过 lldt xxxx 存入LDTR
段选择子
GDT/LDT表项的]]></description><category></category></item><item><title><![CDATA[实模式与保护模式]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/111669031</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/111669031</guid><author>sunflower_zzn</author><pubDate>Fri, 25 Dec 2020 11:52:19 +0800</pubDate><description><![CDATA[实模式与保护模式

8086有20根地址总线，共1MB的寻址空间，但是寄存器只有16位，所以其页式第一个支持内存分段模型的处理器。当时的8086处理器还只支持实模式，后来的32位处理器在8086的基础上支持了保护模式，可以使用32根地址线，4GB内存

实模式与保护模式都是CPU的工作模式
参考：实模式与保护模式
实模式
8086的20根地址线导致设计者决定使用分段内存，段号 + 偏移量寻址。这里的段号为16位段寄存器左移4位，即：
物理地址（physicaladdress）=段值（segment） * 1]]></description><category></category></item><item><title><![CDATA[段寄存器与段式存储管理]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/111668643</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/111668643</guid><author>sunflower_zzn</author><pubDate>Fri, 25 Dec 2020 11:50:47 +0800</pubDate><description><![CDATA[段式存储管理

计算机需要对内存进行分段，以分配给不同的程序使用
段式存储与页式存储不同，段的大小不定，段内地址连续，段间地址不连续
段表结构 ： 段长度 + 段基址 + （用index隐式表示的段号）
段的逻辑地址 = 段号 + 段内地址（偏移量）
段的物理地址 = 段起地址 + 偏移量

通过段表获取段起地址，并且检查偏移量是否越界



参考：段式、页式、段页式存储管理辨析
段寄存器

以下段寄存器均为8086CPU中的情况：

四个段寄存器（16位）：

CS：代码段寄存器
DS：数据段寄存器
SS]]></description><category></category></item><item><title><![CDATA[win10下scala+spark+hadoop搭建]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/109548663</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/109548663</guid><author>sunflower_zzn</author><pubDate>Sat, 07 Nov 2020 16:22:16 +0800</pubDate><description><![CDATA[本文主要介绍win10环境下搭建hadoop伪分布式集群
说明：不推荐使用3.0以上Hadoop，因为笔者在HDFS格式化时出现主机地址映射问题无法解决

文章目录环境搭建JDK 1.8ScalaSparkHadoopwinutils支持jdk支持Hadoop分布式集群配置分布式集群配置启动HadoopHDFS应用管理查询节点状态文件管理参考文章
环境：

JDK：1.8.0.261
scala：2.12.12
spark：3.0.1
hadoop：2.7.7

环境搭建
JDK 1.8
下载地址：htt.]]></description><category></category></item><item><title><![CDATA[Makefile入门]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/109548569</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/109548569</guid><author>sunflower_zzn</author><pubDate>Sat, 07 Nov 2020 16:16:35 +0800</pubDate><description><![CDATA[参考教程：Makefile入门教程
文章目录Makefile概述Makefile规则Makefile工作流程清除过程文件Makefile通配符Makefile变量的定义和使用变量赋值简单赋值递归赋值条件赋值追加赋值自动化变量Makefile目标文件搜索VPATHvpathMakefile隐含规则Makefile条件判断ifeq 和 ifneqifdef 和 ifndefMakefile常用字符串处理函数
Makefile概述
Makefile是一个工程文件的编译规则，一般用于Linux环境下工程的自动化编译]]></description><category></category></item><item><title><![CDATA[Lambda Interpreter]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/92713918</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/92713918</guid><author>sunflower_zzn</author><pubDate>Mon, 17 Jun 2019 21:20:36 +0800</pubDate><description><![CDATA[Lambda Interpreter
南京大学2018级软工（一）期末大作业：lambda解释器
代码参考：
200行JS代码实现lambda解释器
PP大佬代码
解释器构造
一个lambda interpreter主要由一下几个方面构成：

词法分析器（Lexer）：将字符流分解为符号流（token流）
语法分析器（Parser）：根据语法，利用符号流构建抽象语法树AST
语法解释器/语法制导的...]]></description><category></category></item><item><title><![CDATA[19-GUI]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90715405</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90715405</guid><author>sunflower_zzn</author><pubDate>Fri, 31 May 2019 14:20:23 +0800</pubDate><description><![CDATA[Graphical User Interface(图形用户界面)

Component 组件
Layout 布局
Event 事件

Event and Graphics

内部类：

MVC Design Pattern（设计模式）

模型：存储内容
视图：显示内容
控制器：处理⽤户输⼊


Layout 布局
BorderLayout：东西南北中
FlowLayout：流式布局
BoxLayo...]]></description><category></category></item><item><title><![CDATA[17-异常]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90712494</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90712494</guid><author>sunflower_zzn</author><pubDate>Fri, 31 May 2019 10:57:04 +0800</pubDate><description><![CDATA[异常：处理/抛出
异常处理：
try{
  // 程序代码
}catch(异常类型1 异常的变量名1){
  // 程序代码
}catch(异常类型2 异常的变量名2){
  // 程序代码
}finally{
  // 程序代码
}

异常抛出：(向调用方法的上一级抛出一个异常)
 public void example() throws RemoteException
  {
    // M...]]></description><category></category></item><item><title><![CDATA[面向对象--接口]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90642468</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90642468</guid><author>sunflower_zzn</author><pubDate>Tue, 28 May 2019 16:46:52 +0800</pubDate><description><![CDATA[接口
接口是百分百纯抽象类：只含有抽象方法（无实体）
接口VS抽象类
一、区别
interface：只有方法没有具体实现  方法只能是public或者不写默认为public ；
变量全为final——不可修改。即接口本身的特性规定了只能定义常量，否则实现的子类a改变了其定义的值，那么其他实现类的值都将随之变化，这样就成了抽象类的特征了，失去了接口更高级的抽象意义。
abstract class：方...]]></description><category></category></item><item><title><![CDATA[面向对象——继承与多态]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90291576</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90291576</guid><author>sunflower_zzn</author><pubDate>Fri, 17 May 2019 13:35:09 +0800</pubDate><description><![CDATA[继承
好处：

避免重复的代码
定义一个公共的类的契约

创建继承树
特点：

子类继承了父类所有的成员变量和方法
可以增加成员变量和成员方法
可以覆盖父类的成员方法
不可以覆盖父类的成员变量

问题：子类继承了父类所有的成员变量和方法，包括父类的私有变量吗？
抽象类与抽象方法
抽象类本身没有用，除非他被继承，有了子类。抽象类的子类可以实例化。

非抽象类不可以有抽象方法
抽象类中可以有非抽象方法...]]></description><category></category></item><item><title><![CDATA[html随笔]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90216594</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90216594</guid><author>sunflower_zzn</author><pubDate>Tue, 14 May 2019 22:22:33 +0800</pubDate><description><![CDATA[1.文字逐渐打出（打字机效果）
&lt;html&gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;Charlie是我们E1的头！&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;...]]></description><category></category></item><item><title><![CDATA[JVM与字节码基础]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90209242</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/90209242</guid><author>sunflower_zzn</author><pubDate>Tue, 14 May 2019 16:19:33 +0800</pubDate><description><![CDATA[1.JVM与字节码
字节码在虚拟机中执行(.class)
语言无关性

2.class文件结构

⼀组以8位字节为基础单位的⼆进制流
魔数

0xCAFEBABE


版本号
常量池

字⾯量
符号引⽤


访问标志
类索引、⽗类索引与接⼝索引集合
字段表集合
⽅法表集合
属性表集合 （代码的实现作为⼀个属性值


...]]></description><category></category></item><item><title><![CDATA[软件工程建模]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89923953</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89923953</guid><author>sunflower_zzn</author><pubDate>Tue, 07 May 2019 16:33:49 +0800</pubDate><description><![CDATA[数学建模
问题空间 to 数学模型 to 解空间
计算机建模
指令的执行过程:

取指
译指
执行
问题空间 to 数学模型 to 计算机模型 to 解空间
为什么数学能做的还要用计算机来做?
节省人力
计算的快速
储存的海量

软件工程建模
需求是什么?————一个好用的计算器软件
多人协作开发，在一定时间，一定预算内，一群人来求解空间
软件工程的目的是满足真实的需求，在这个过程中考验了对时间、...]]></description><category></category></item><item><title><![CDATA[面向对象编程--协作]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89851844</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89851844</guid><author>sunflower_zzn</author><pubDate>Sun, 05 May 2019 17:39:39 +0800</pubDate><description><![CDATA[回顾
基本问题求解的原则：分解与抽象
⾯向对象⽅法的原则：职责与协作
⾯向对象⽅法的三要素：封装、继承、多态
协作模型
协作模型描述的是⼀些关于如何做，何时做和与谁⼯作的动态⾏为。
抽象对象之间的协作，这两种⽅法,⼀般是同时运⽤的,共同来完成对协作的抽象

从小到大,将对象的小职责聚合形成大职责;
从大到小,将大职责分配给各个小对象。

可以协作对象

该对象⾃身
任何以参数形式传⼊的对象
被该对...]]></description><category></category></item><item><title><![CDATA[java学习随笔(2)]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89789867</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89789867</guid><author>sunflower_zzn</author><pubDate>Fri, 03 May 2019 18:05:06 +0800</pubDate><description><![CDATA[1.字符串转数组

转字符数组：String.toCharArray()方法，返回char[]
转字符串数组:String.split()方法,返回String[]

2.数组转字符串


字符数组转字符串


方法1：直接在构造String时转换。
char[] data = {'a', 'b', 'c'};
String str = new String(data);

方法2：调用Strin...]]></description><category></category></item><item><title><![CDATA[面向对象编程--封装]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89715178</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89715178</guid><author>sunflower_zzn</author><pubDate>Tue, 30 Apr 2019 20:09:35 +0800</pubDate><description><![CDATA[面向对象编程思维
1.职责
在一起
属性：方法计算所需要的属性
方法：拥有数据之后必须体现出的方法
面向对象过程中职责的分配
类与对象：抽象与具体
视角的变化：

行为视角：结构化方法
数据视角：数据为中心方法
职责视角：面向对象方法

如何获得对象？

寻找候选对象：名词：类、属性+动词：行为

什么是类？

类是指具有共同属性的对象的描述
类是一个描述或蓝图，用于定义组成某类特定的对象的所有的...]]></description><category></category></item><item><title><![CDATA[part2(一)Java面向对象]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89321628</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89321628</guid><author>sunflower_zzn</author><pubDate>Mon, 15 Apr 2019 21:40:32 +0800</pubDate><description><![CDATA[类和对象

类：模型，确定对象将会拥有的特征（属性）和行为（方法）

对象：类的实例化体现

属性：对象具有的各种静态特征（对象有什么？）

方法：对象具有的各种静态行为（对象能做什么？）

创建类

包名的命名规则：1.全小写2.域名的倒叙（e.g：com.imooc.cat）

成员属性：类的参数

方法：类的功能

实例化对象




//对象实例化

Cat one = ...]]></description><category></category></item><item><title><![CDATA[part1(七)Java方法]]></title><link>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89321589</link><guid>https://blog.youkuaiyun.com/sunflower_zzn/article/details/89321589</guid><author>sunflower_zzn</author><pubDate>Mon, 15 Apr 2019 21:38:50 +0800</pubDate><description><![CDATA[方法




//主方法_程序执行的入口
public static void main (String[] args)
//其他遇到过的方法
Scanner sc=new Scanner(System.in);﻿​
sc.nextInt();
sc.next();

使用对象名来调用方法/使用类名去调用方法

方法——用来解决一类问题的代码的有序组合（轮子，函数）

方法声明

与主方法结构相...]]></description><category></category></item></channel></rss>