1. read/write Functions
The READ function reads data from open devices or files.
# Include
Ssize_t read (int fd, void * Buf, size_t count );
Returned value: the number of bytes read successfully. If an error occurs,-1 is returned and errno
1. Install gcc
Sudo apt-Get update
Sudo apt-Get install build-essential
2. Install sun-java6-jdk
Sudo VI/etc/APT/sources. List
Add Deb http://archive.canonical.com/ubuntu lucid partner save exit
You can directly copy the previously
1, download JDK, you can download directly on RHEL, you can also download on the local machine, and then pass through psftp (jdk-6u20-linux-i586-rpm.bin), of course filezilla FTP tools more useful
2. Use Putty to connect to Linux
3.
Copy others' logs ..
When I look at the kernel, I always encounter statements such as if (likely () {} Or if (unlikely (). I don't know what it means at first, so I want to introduce it.
Likely () and unlikely () are two macros defined in
In Linux, touch command parameters are not commonly used. They may be used when you use make to modify the file timestamp or create a new file that does not exist, the following describes how to use the touch command parameters in Linux:
Touch
Searching for a file in a vast Linux environment is a terrible task. I have tried many methods. The simplest and most convenient method is to use the locate command with the updatedb command:
For example, we want to find a file with the "Chen"
Linux is a variant of the UNIX operating system. The principle and idea of writing a driver in Linux is similar to that in other UNIX systems, however, the drivers in the DoS or window environment differ greatly. In a Linux environment, the driver
The explanation is very detailed.
The Linux Kernel provides two interfaces for registering interrupt handler functions: setup_irq and request_irq. Both functions are defined in kernel/IRQ/manage. C.
/*
* Internal function to register an
Recently, I was studying asynchronous message processing and suddenly remembered the Interrupt Processing of the Linux kernel. The kernel runs through the asynchronous processing idea of "doing important things right away and pushing unimportant
Analyze core files
When a program crashes, you may not be able to directly run GDB for debugging. For example, the program may run on another machine, or because the program is sensitive to time, manual tracking and debugging may lead to
1. I have never paid attention to it before. The slightly written command option can only be followed by space and followed by parameters. The standard option can be followed by space or equal signs, such as the date command and date-r filename ;;
I. deadlock
(1) deadlock refers to a phenomenon in which multiple processes wait for each other's resources, but do not release their own resources before obtaining the other's resources. If all processes are waiting for an impossible event, the
Like message queues, the shared memory also has its own data structure, as shown below:
Struct shmid_ds {Struct ipc_perm shm_perm;/* ownership and permissions */Size_tShm_segsz;/* size of segment (bytes )*/Time_tShm_atime;/* Last attach time
I. How to capture signals in the kernel
If the signal processing is a user-defined function, this function is called when the signal is delivered. This function is called capture signal. Because the code of the signal processing function is in the
I. Virtual Memory
Segmentation: it is divided into code segments, data segments, and stack segments. Each memory segment is associated with a privileged level, that is, 0 ~ 3. 0 has the highest privilege level (kernel), and 3 is the lowest
Vfork is used to create a new process. The purpose of the new process is to Exec a new process. Both vfork and fork create a sub-process, but it does not completely copy the address space of the parent process to the child process, and does not copy
I. Separation and hierarchy of Driver Design
Hierarchical Design can improve code reusability. It uses the existing code to perform some overloading or modifications to complete the driver design.
In addition to hierarchical design, there are also
A classic excerpt, the heartbeat of the OS, is very important, but seldom attracts attention unless you encounter problems.
1. Beat rate-Hz: It is 1024 in Alpha architecture, and 10 times in other platforms. 100 (2.6 kernel) on the embedded ARM ).
Linux debugging includes user-layer debugging and kernel debugging. The main tools used include GDB and kgdb.
This article focuses on the working principle, key technologies, and differences in platform dependencies of the debugger in Linux
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service