A computer consists of hardware and software that coorperate to run application programs. Information inside the computer is represented as groups of bits that are interpreted in different ways depending on different context.
Programs are translate to different forms by other programs.
1)Source program (.c) : writen by some high-level programming language, such as C. It will be modified by proprocessor according to the derectives begin with # character.
2)Modified program (.i): It will be translate to assembly language program by compiler. assembly language's statements exactly describes machine-language instructions. This is the key difference between high-level language and assembly-language.
3)Assembly language program (.s): It will be translate to machine-level language program by assembler.
4)Relocatable object (.o): It will be linked together with other relocatable objects to form a executable object.
Memory hierachy:
Register file-->L1 & L2 cache(SRAM)-->Main memory(DRAM)-->Disk
Virtual memory:
It is an abstraction that provides each process with the illusion that it has exclusive use of main memroy. Each process has the same uniform of memroy which is called virtual address space. virtual address space in linux likes below:
Kernel virtual memory(reserved for system)
User stack(created at run time)
Memroy mapped region for shared libraries
Run-time heap(create at run time by malloc)
Read/Write code and data
Read-only code and data
Unused
posted on 2006-12-08 19:26
coffee 阅读(125)
评论(0) 编辑 收藏 引用