1llusion


  • 首页

  • 关于

  • 标签

  • 分类

  • 归档

计算机系统漫游

发表于 2016-01-24 | 分类于 计算机系统 |

计算机系统是由硬件和软件组成的,它们共同工作来运行应用程序。

源程序实际上就是一个由值0和1组成的位(bit)序列,8个位被组织成一组,成为字节。每个字节表示程序中某个文本字符。

大部分的现代系统都使用ASCII标准来表示文本字符,这种方式实际上就是一个唯一的单字节大小的整数值来表示每个字符。

系统中所有的信息——包括磁盘文件、存储器中的程序、存储器中存放的用户数据以及网络上传送的数据,都是由一串位表示的。区别不同数据对象的唯一方法是我们读到这些数据对象时的上下文。

编译系统(compilation syste)

  1. 预处理阶段。预处理器(cpp)根据以字符#开头的命令,修改原始的C程序。
  2. 编译阶段。编译器(ccl)将文本文件hello.i翻译成文本文件hello.s它包含一个汇编语言程序。
  3. 汇编阶段。接下来,汇编器(as)将hello.s翻译成机器语言指令,把这些指令打包成一种叫做可重定位目标程序的格式。并将结果保存在目标文件hello.o中。
  4. 链接阶段。请注意,hello程序调用了printf函数,它是每个C编译器都会提供的标准C库中的一个函数。printf函数存在于一个名为printf.o的单独的预编译好了的目标文件中,而这个文件必须以某种方式合并到我们的hello.o程序中。连接器(ld)就负责处理这种合并。结果就得到hello文件,它是一个可执行目标文件,可以被加载到内存中,由系统执行。
    阅读全文 »

关于ZooKeeper

发表于 2015-05-28 | 分类于 分布式系统 |

What is ZooKeeper

Because coordinating distributed systems is a Zoo.

因为协调分布式系统就想动物园。。。

ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.

Zookeeper是一个分布式协调服务,可用于服务发现,分布式锁,分布式选举,配置管理等。

Reference

https://cwiki.apache.org/confluence/display/ZOOKEEPER/Index

https://zhuanlan.zhihu.com/p/24996631

62

发表于 2015-01-24 | 分类于 1llusion |

很多人在二三十岁的时候就死去了。因为一旦过了那个年龄,他们只是自己的影子,余生都会在模仿自己中度过。 ——罗曼·罗兰《约翰·克里斯多夫》

1…34
一

一

One more light goes out.

33 日志
12 分类
18 标签
© 2018 一
由 Hexo 强力驱动
|
主题 — NexT.Mist