20120628

vi   ~/.exrc后在vi中输入:
“set   number”可以添加行号
“set   tabstop=x”可以设置Tab键的自动缩进为x个字符。注意=边上不要有空格
“set   autoindent”可以自动缩进
:后直接加数字可以使光标跳到相应的行

然后保存~/.exrc文件后再进入vi就可以了。

--------------------------------------------------

real , user and sys process time statistics

real is wall clock time-time from start to finish of the call,this is all elapsed time including time slices used by other processes and time the process spends blocked(for example if it is waiting for I/O to complete).

user is the amount of CPU time spent in user-mode code(outside the kernel) within the process.this is only actual CPU used in executing the process.other processes and time the process spends blocked do not count towards this figure.

sys is the amount of CPU time spent in the kernel within the process.this means executing CPU time spent in system calls within the kernel,as opposed to library code,which is still running in user-space.like 'user' ,this is only CPU time used by the process.

user+sys will tell you how much actual CPU time your process used. note that this is across all CPUs, so if the process has multiple threads it could potentially exceed the wall clock time reported by real( different threads or processes may run in parallel),note that in the output these figures include the user and sys time of all child processes as well.although the system calls return the statistics for the process and its children separately.

------------------------------------------------------

int fflush(FILE *stream);
If stream points to an output stream or an update stream in which
the most recent operation was not input, the fflush function causes
any unwritten data for that stream to be delivered to the host environment
to be written to the file;
otherwise, the behavior is undefined.

http://www.cnitblog.com/wujian-IT/archive/2007/10/15/34891.html

---------------------------------------------------

Name
syscalls - Linux system calls
Synopsis
Linux system calls.
Description
The system call is the fundamental interface between an application and the Linux kernel.
System calls and library wrapper functions
System calls are generally not invoked directly, but rather via wrapper functions in glibc (or perhaps some other library). For details of direct invocation of a system call, see intro(2).
Often, but not always, the name of the wrapper function is the same as the name of the system call that it invokes. For example, glibc contains a function truncate() which invokes the underlying "truncate" system call.

Often the glibc wrapper function is quite thin, doing little work other than copying arguments to the right registers before invoking the system call, and then setting errno appropriately after the system call has returned. (These are the same steps that are performed by syscall(2), which can be used to invoke system calls for which no wrapper function is provided.) Note: system calls indicate a failure by returning a negative error number to the caller; when this happens, the wrapper function negates the returned error number (to make it positive), copies it to errno, and returns -1 to the caller of the wrapper.

Sometimes, however, the wrapper function does some extra work before invoking the system call. For example, nowadays there are (for reasons described below) two related system calls, truncate(2) and truncate64(2), and the glibc truncate() wrapper function checks which of those system calls are provided by the kernel and determines which should be employed.

---------------------------------
http://www.chinaunix.net/old_jh/23/437639.html

常用算法设计方法。

猜你喜欢

转载自wwwjjq.iteye.com/blog/1569785