The first Linux assembly-general Linux technology-Linux programming and kernel information. The following is a detailed description. Today I learned the nasm assembly language in linux and posted the source code so that I can recall it later.
Function:
Obtain CPU Information
Source code file: cpuid. s
. Secti
How to Read file data in LINUX-General Linux technology-Linux programming and kernel information. This is my WINDOWS. execution passed,
Push 0
Push 80
Push 3
Push 0
Push 1
Push 80000000
Push 00478924; ASCII "c: \ windows \ neptune. dat" file to be read
Call
Put the file return handle in EAX.
Push 51BF
Mov ed
process to the ESP register */\"Movl$1f,%[Prev_ip]\ n\ t"/* Save current process EIP */"Pushl%[Next_ip]\ n\ t/* Press the EIP of the next process into the stack */__switch_canary"JMP __switch_to\ n"/* regparm call */"1:\ t"/* The next process starts executing */" POPL%%EBP\ n\ t"/* Restore EBP */"POPFL\ n"/* Restore Flags */ /* OUTPUT Parameters */:[Prev_sp]"=m" (PREV-GT;THREAD.SP), [Prev_ip]"=m" (PREV-GT;THREAD.IP),"=a" (last),
Process switching and general implementation of the system one, the content summary and analysis process scheduling and process scheduling process scheduling requirements of the classification:The first classification method:I/O-bound (frequent I/O, often spending a lot of time waiting for I/O operations )Cpu-bound (computationally intensive, takes a lot of CPU time to perform operations)The second classification method:Batch process (background, typical: compiler, scientific calculation)Real-ti
(5.3post-0.20021129.18rh)Copyright 2003 Free Software Foundation, Inc.GDB is free software, covered by the GNU General Public License, and you areWelcome to change it and/or distribute copies of it under certain conditions.Type "show copying" to see the conditions.There is absolutely no warranty for GDB. Type "show warranty" for details.This GDB was configured as "i386-redhat-linux-gnu "...
Execute RMT macro(GDB) RMTBreakpoint () at kgdbstub. C: 1005
Compile the linux0.00 kernel (full Linux Kernel Analysis-based on the 0.12 kernel)
I have bought a fully-analyzed Linux kernel written by Zhao Ke-based on the 0.12 kernel. It seems that the principles of the first four chapters have never had the courage to practice them by myself. Recently, I have made up my mind to take a good look at this book, and I plan to write some study notes to record some gains an
Basics of Linux Learning
1, what is Linux?
To be exact, the Linux kernel (the core program of the system), whose kernel copyright belongs to Linus Torvalds, is issued under the GPL (GNU general public License) Copyright Agreement, and anyone can copy (copy) and modify ( Change), package distribution (distribute), sales, but can not add any restrictions at the tim
copies of it under certain conditions.Type "show copying" to see the conditions.There is absolutely no warranty for GDB. Type "show warranty" for details.This GDB was configured as "i386-redhat-linux-gnu "...
Execute RMT macro(GDB) RMTBreakpoint () at kgdbstub. C: 10051005 atomic_set ( kgdb_setting_breakpoint, 0 );
At this time, the kernel on the target is in the debugging status. You can view its variables, set breakpoints, view stacks, and so on, j
(LOCK_PREFIX "decl (% eax) \ n" \ # as shown here, if count is first subtracted from the thread, SF is not equal to 1 (not equal to negative ), execute it later, that is, obtain the lock. then, if the thread that tries to obtain the lock executes this atomic operation (in the unlocked state), SF equals 1, so that void (*) (atomic_t *) is executed *) type Function to enter the waiting queue. therefore, this locking atomic operation can be completed with a single command. in non-SMP scenarios, a
. System call access is a very frequently used process that can be used thousands of times per second, and its time efficiency is important. Moreover, the system call access process also involves the user space and system space between the switch, and for this purpose some instructions in the C language does not have the corresponding language components, so, the system calls to enter and return obviously must use assembly language to write.In some special occasions, the space efficiency of a pr
entry and return of system calls is a typical example. System call access is a very frequently used process that can be used thousands of times per second, and its time efficiency is important. Moreover, the system call access process also involves the user space and system space between the switch, and for this purpose some instructions in the C language does not have the corresponding language components, so, the system calls to enter and return obviously must use assembly language to write.
Using SSH to transfer files between Linux and Linux,linux and WindowsTransferring files between Linux and Linux:SCP file [email protected]: Document Address Example:SCP Abc.txt [Email protected]:/home/endall/abc.txtTransferring files between Windows and Linux:The author uses Putty's built-in PSCP. Other such as SSH Sec
Linux knowledge point Review: single-user mode, rescue mode, clone Virtual Machine and Linux machine logon explanation, linux knowledge point1.13 single-user mode
In linux, when the password is forgotten, the password is changed (prerequisite: the password must be manually operated on a physical machine or server)
At t
After linux is loaded into memory by bootloader, the linux kernel code initially executed by the cpu is/header. start_of_setup function in the S File. after some preparation, this function will jump to the main file in the boot directory. c main function execution, in this main function we can first... after linux is loaded into memory by bootloader, the
, its thread and process have no difference in structure. This is why Linux is powerful, because the structure of the Linux Process system is reasonable enough to implement thread functions without additional data structures, the thread implementation function can also be expanded, because you can select shared resources as needed. Oh, Is it great?
1 clone () system call
In
Linux entry record: 16. Multi-command collaboration in Linux: pipelines and redirection, linux redirectionI. Multi-command collaboration
In Linux, most commands are very simple, and there are few complex functional commands. Each command often only implements one or more simple functions. By combining commands of diffe
[Linux] The local and server files are uploaded and downloaded, Linux server files are uploaded and downloaded, and linux Files are uploaded.
I. File Transfer in Linux and scp command instance
1. Directory replication in Linux: Local> Remote Server
Scp-r/home/abc/test1 root@
[Linux] install Nginx on Linux and nginx on linux
This article describes how to install Nginx in Linux. the Linux system is CentOS 7.2.
1. Download Nginx from the official Nginx website. The version used here is 1.13.6.
2. Upload the downloaded Nginx to
In the Linux environment, the compilation language programming is preliminary-use the gdb debugging program-general Linux technology-Linux programming and kernel information. The following is a detailed description. Debugging is an eternal topic in programming, unless your program has never been wrong. This article describes how to use gdb to debug assembler in
In the Linux environment, the compilation language programming is preliminary-using C library functions-general Linux technology-Linux programming and kernel information. The following is a detailed description. Cpuid. the s program uses the Linux System Call (int $0x80) to display the string and exit the program. If t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.