#define MINUTE 60
#define HOUR (60*minute)
#define DAY (24*hour)
#define YEAR (365*day)/* Interestingly, we assume leap-years */
static int month[12] = {
0,
day* (31),
day* (31+29),
day* (31+29+31),
day* (31+29+31+30),
day* (31+29+31+30+31),
day* (31+29+31+30+31+30),
day* (31+29+31+30+31+30+31),
day* (31+29+31+30+31+30+31+31),
day* (31+29+31+30+31+30+31+31+30),
day* (31+29+31+30+31+30+31+31+30+31),
day* (31+29+31+30+31+30+31+31+30+31+30)
};
details Baidu http://blog.csdn.net/hazir/article/details/9429017
- 3. about do_signal * (&EIP) = Sa_handler
(1)http://www.oldlinux.org/oldlinux/viewthread.php?tid=14839&extra=page%3d2* (&EIP) = Sa_handler with EIP = Sa_ What's different about handler?
Online there is because the type of two is not the same as a long one unsigned long, feeling that this is not the reason.
Should be another way of saying EIP = Sa_handler this statement may causecompileris optimized and the value in the stack does not change, it should be. (2)
ljmp TSS Segment selector Such statements cause task switching, the CPU automatically saves the TSS content of the current task, and restores the TSS content of the task that needs to be switched to, causing the task to switch. The description of Task 1 and Task 2 is similar to task 0.
In order to be in physical memory, the new process shares the same memory area as the original process when it calls fork () to generate a new process. Only when one of the processes is writing does the system allocate a separate memory page for it. This is the concept of copy-on-write.
- 6. Demand load (load on demand)/requirement paging (demand-paging)
- 8. I/O ports and addressing
SPARC for unified addressing, ld,st command access
- 9. Interface Access Control
- C program compilation and linking
The names of the registers used by different processors here should not be the same. Currently see the data are corresponding to the x86 eax,ebx what ... But what I'm going to do, SPARC.
- 13. Combined statements in parentheses
- 14. target File symbol table and string part
- 15. Connector pre-defined variables
ARINC 653 Project has encountered ... You have defined an end variable, the value is always wrong ... The original link program is pre-defined
However, in the Qiu Zongyan translation of the "Programming practice", this terminology is not translated as "big end" and small end, but "high tail" and "LowEnd", it is good to understand: if a number as a string, such as 11223344 as " 11223344 ", at the end is a ', ' 11 ' to ' 44 ' occupy a storage unit, then its tail (low-byte) is obviously 44, the front of the high or must not indicates the end of the high address or low address , its in-memory in the method is very intuitive, Such as:
X86 small end, SPARC big endian
- 17. Fragmentation mechanism
- 18. Consistent/non-uniform code snippets
Consistent code snippet:
The simple understanding is that the operating system is taken out of the shared code snippet, which can be accessed directly by users of the lower privileged level.
typically these shared codes are "not access" protected resources and certain types of exception handling. For example, some mathematical function libraries, for purely mathematical calculations, are used as a consistent code segment.
Restrictions on consistent code snippets
1. Privileged programs do not allow access to low-privileged data: The core State does not allow user-state data to be invoked.
2. Privileged-level programs can access high-privileged data. But the privilege level does not change: the user state or the user state.
non-Uniform code snippet:
system code that is protected by the operating system in order to avoid low privilege level access.
Limitations of non-uniform Code snippets
1. Only peer access is allowed.
2. Absolute prohibition of different levels of access: Nuclear mentality is not user-state. The user state also does not use nuclear mentality.
Typically, low-privileged code must pass "Gates" to access and invoke high-privileged code.
transfer rules between different levels of code snippets are verified by CPL/RPL/DPL.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Linux Kernel complete anatomy learning note typing too tired continuous update