Basics of programming in Linux (7): Concepts of read/write functions and (non-) blocking I/O

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

Ubuntu Linux Command collection

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

RedHat Linux 5 Sun JDK Installation

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.

Linux likely and unlikely

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

Linux touch command parameter modification file Timestamp

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

Use the locate command to quickly find files in Linux

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"

How to compile a Linux Device Driver

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

Setup_irq and request_irq in Linux Kernel

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

Linux interrupt handling

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

GDB usage (2) Generate and debug core files in Linux

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

Notes on the basic commands of laruence's Linux private house

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 ;;

Communication basis between processes in Linux Network Programming (II): Introduction to deadlocks, semaphores, and PV primitives

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

System V shared memory and series functions for Linux Network Programming

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

Linux programming signal (4): signal capturing and sigaction Functions

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

Advanced Programming in UNIX environment-Linux Process address space and virtual memory

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

Socket (13) in Linux Network Programming: epoll series functions, differences from select and poll

1. Introduction to epoll series Functions # Include Int epoll_create (INT size );Int epoll_create1 (INT flags );Int epoll_ctl (INT epfd, int op, int FD, struct epoll_event * event );Int epoll_wait (INT epfd, struct epoll_event * events, int

Differences between Linux fork and vfork

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

Enrich Linux drive content notes (2)

  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

Linux basic series-timer and time management

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 basic series-Debug

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

Total Pages: 5467 1 .... 4819 4820 4821 4822 4823 .... 5467 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.