天天看點

[Be a Coding Plasterer] Components 1:get Basic ThingsWritten In The FontHello WorldSoftware FrameworkOS(Operating System)Think in Basic Things of Computer

  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 andram.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,its the start of computer coding.every

programmer likes it.so how ‘hello world’ runs in computer and why its

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?

..

[Be a Coding Plasterer] Components 1:get Basic ThingsWritten In The FontHello WorldSoftware FrameworkOS(Operating System)Think in Basic Things of Computer

  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

[Be a Coding Plasterer] Components 1:get Basic ThingsWritten In The FontHello WorldSoftware FrameworkOS(Operating System)Think in Basic Things of Computer

  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

1

<code>2 * 2 * 65536 * 1024 * 512 kb = 128 gb</code>

    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

[Be a Coding Plasterer] Components 1:get Basic ThingsWritten In The FontHello WorldSoftware FrameworkOS(Operating System)Think in Basic Things of Computer

       3.paging

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

[Be a Coding Plasterer] Components 1:get Basic ThingsWritten In The FontHello WorldSoftware FrameworkOS(Operating System)Think in Basic Things of Computer

  just like our life . from life ,create form life , service life.yes,its the computer.thanks!!