yinquan

All articles by yinquan

 

The Static Linker

What steps to convert the program from the code to the executable file? Pre-compile cpp hello.c > hello.i gcc -E hello.c -o hello.i delete all “define” and replace all the macro definition handle all condition pre-compile: #if, #ifdef,#elif,#else,#endif handle #include: insert the file to the code. This is recursive. delete all comments of the code
Continue reading...  

The Computer Basic Constructure

Computer System Design Bus Transfer data to certain department Because the transferring speed is different, you must distinguish different bus (north bridge and south bridge) CPU From SMP (Symmetrical Multi-Processing) to Multi-core Processor. What problem the Computer Operating System want to solve? CPU The CPU is as the resource to Operating System. The system can
Continue reading...  

Operating System – Page III

Structure of the Page Table The most common techniques for structuring the page table Hierarchical Paging Most modern computer systems support a large logical-address space. In such an environment, the page table itself becomes excessively large. The one page table already isn’t enough for so large space. One simple solution to this problem is to
Continue reading...  

Operating System – Page II

Protection Memory protection in a paged environment is accomplished by protection bits that are associated with each frame. The one bit Normally, these bits are kept in the page table. One bit can define a page to be read-write or read-only. The protection bits can be checked to verify that no writes are being made
Continue reading...  

Operating System – Page I

The memory-management scheme that permits the physical-address space of a process to be noncontiguous. Paging avoids the considerable problem of fitting the varying-sized memory chunks onto the backing store. The paging in its various forms is commonly used in most operating systems. Frames Vs. Paging Frame Physical memory is broken into fixed-sized blocks called frame
Continue reading...  

Operating System MM IV

In the contiguous memory allocation,each process is contained in a single continuous section of memory. Memory Protection protecting the operation system from the user processes and protecting the user processes from one another The relocation register is used for this protection. The relocation register contains the value of the smallest physical address; the limit register
Continue reading...  

Operating System (MM) III

How to execute for process in the memory. The process is round-robin and need execute by order. So the swapping is necessary. Swapping A process, however, can be swapped temporarily out of memory to a backing store, and then brought back into memory for continuous. The quantum must also be sufficiently large that reasonable amount
Continue reading...  

Operating System (MM) II

How to optimise the memory usage: Dynamic Loading, Dynamic Linking, Shared Libraries, Overlays Dynamic Loading When a routine needs to call another routine, the calling routine first checks to see whether the other routine has been loaded. If not, the relocatable linking loader is called to load the desired routine into memory and to update
Continue reading...  

Operating System (MM) I

Ignore how a memory address is generated by program. Interesting in only the sequence of memory addresses generated by the running program Addressing Binding The process must be executed in the memory, so memory manager is needed by every process Input Queue: The collection of processes on the disk that is waiting to be brought
Continue reading...  

Understanding Pointers (for beginners)

Variable definition: The symbol table is used to get the actually address of variable name. Pointer Variable is: The pointer type need two elements, name and type. The name of point represents the address of variable.By the name, we can find the other address (rvalue). The type of point represents the length that the point
Continue reading...  

gcc asm code analysis

The structure: .LFB0: .LFE0
Continue reading...