難得糊塗,吃虧是福。

Writer:BYSocket(泥沙砖瓦浆木匠)

    微博:BYSocket

    豆瓣:BYSocket

Reprint it anywhere u want.

 

Written In The Font

  I am writing at home.Today it is windy,but I am feeling isuitable and warm.Why the title is called ‘Be a Coding Plasterer’? I think that a good computer programmer should know something about Hardware and how the code runs with CPU and RAM.so when I am learning ,I wanna say somthing about them after thinking.

pieces:

1. Hello World

2. Software Framework

3. OS(Operating System)


 

Hello World

  Hello World,its the start of computer coding.every programmer likes it.so how ‘Hello World’ runs in computer and why its designed so.I wrote an article before,go to C++的Hello,World! .Here what I think,

1. A simple code is not simple.Like a tree,start from the root,its a little complex in the body.‘Dont let yourself stop learning’

2. Learning the basic things is so nice.‘Just a boy find ways to go home when being lost.

  After learning,some Questions in my head.

Q: IO chips,PCI,ISA.. What are they?

Q: Runtime Library,Operating System Kernel .. What are they? How they work together?

..

image

 

Software Framework

  In daily life when we wanna cross the river,what we want is just a bridge. How the same meaning use in the computer.Long age,there are many problems in computer development.But after solving them, a saying is

  ‘Any problem in computer science can be solved by another layer of indirection.’

  A software need to call the system.And its very complex but interesting.There are many layers of indirections between them.I will give a picture about computer software architecture

KPU[2RR_7[4@CB)V3H1XLYY

 

OS(Operating System)

  1. CPU

    CPU nerver stops.

    Multiprograming:

      It is monitoring the cpu.when its useless,let it handle other things.

    Time-Sharing System:

      After a process running for some time , it lets the CPU handle others for some time.each has the opportunity to run for a period of time.

    Mutil-tasking System:

      All softwares run with processes. Every process has its priority.Each has the independent space.Each gets the CPU by its priority.When its overtime,it pauses.Its called ‘Preemptive’.CPU switches bewteen processes.

  2. Device Driver

    Device Driver is a part of OS,running with the OS Kernel.

    Hard Disk:

      Basic storage unit is Sector. Every sector has 512 Bytes. For example, one hard disk has 2 discs,every disc has 65536 tracks,every track has 1024 sectors.So

2 * 2 * 65536 * 1024 * 512 KB = 128 GB

    about CPU

      CPU has some commands for I/O and others.Like,provides ‘in’‘out’to read or write in hardware.

  3. Memory

    Memory,Like what in our head.We store everything in head.So the computer does.

    Q: How the computer provides the limited physical memory to some programs? and we can see many problems: 1.no isolation of address room.  2.week efficiency of memoryusing  3.program running adress is not sure.

    A:

       1.Using the Virtual Address to make the isolation of address. Like the saying:‘Any problem in computer science can be solved by another layer of indirection.’,we solve it .Every process has own Virtual Address and it means the process has a own Physical Address.

       2.Segmentaion

image

       3.Paging

       Processes’s virtual addresses have the mappings with the hard disk.

image

           

Think in Basic Things of Computer

  Just like our life . From Life ,Create Form Life , Service Life.Yes,Its the computer.Thanks!!

Writer:BYSocket(泥沙砖瓦浆木匠)

    微博:BYSocket

    豆瓣:BYSocket

Reprint it anywhere u want.

 

"万千世界,飘过的我是竹叶般..."

博主:BYSocket,博主的\'编程之美\'群(365234583
自言自语:
写写博,编编书,听听歌,健健身,练练字,写写文。医科大信息本科生,开源作者,半吊子书法爱好者,半吊子创业爱好者,半吊子...... 我在试错,我不知道以后会干什么,但我享受现在试错给我的惊讶的生活~

如果你喜欢,可以及时得到博客文章的推送或者留言给我,扫下左边我的公众号

这是我喜欢的一些话:
“路漫漫其修远兮,吾将上下而求索”
任何事情,方向对了,千方百计地去做,做任何事情朝这个方向,物理上的正功也有,负功也有,像溪水向下流碰到石头就转弯,肯定会有小成就。还有最主要的开心~





代码牛平台,让技术学习变的更高效、更简单 !
如果你的技术脆弱得需要提升,向有经验的人学习吧 !
如果你技术足够牛逼,有偿帮助那些需要技术提高的人吧 !


大牛或即将成为大牛的小白,欢迎加入\'代码牛JavaEE技术交流\'群(522369560

来找我吧,扫下左边二维码下载 APP,填上我的邀请码:CaEcmQ ,成为大牛吧~