By Daniel P. Bovet, Marco Cesati

In order to completely comprehend what makes Linux tick and why it really works so good on a wide selection of platforms, you want to delve deep into the center of the kernel. The kernel handles all interactions among the CPU and the exterior international, and determines which courses will proportion processor time, in what order. It manages constrained reminiscence so good that hundreds of thousands of procedures can proportion the method successfully, and expertly organizes information transfers in order that the CPU isn't really saved ready any more than worthy for the particularly sluggish disks.

The 3rd version of Understanding the Linux Kernel takes you on a guided journey of the main major facts constructions, algorithms, and programming methods utilized in the kernel. Probing past superficial good points, the authors supply worthy insights to those that need to know how issues quite paintings inside of their computing device. vital Intel-specific good points are mentioned. suitable segments of code are dissected line via line. however the e-book covers greater than simply the functioning of the code; it explains the theoretical underpinnings of why Linux does issues how it does.

This variation of the booklet covers model 2.6, which has obvious major adjustments to almost each kernel subsystem, fairly within the parts of reminiscence administration and block units. The e-book specializes in the subsequent topics:

  • Memory administration, together with dossier buffering, technique swapping, and Direct reminiscence entry (DMA)
  • The digital Filesystem layer and the second one and 3rd prolonged Filesystems
  • Process construction and scheduling
  • Signals, interrupts, and the fundamental interfaces to gadget drivers
  • Timing
  • Synchronization in the kernel
  • Interprocess verbal exchange (IPC)
  • Program execution

Understanding the Linux Kernel will acquaint you with all of the internal workings of Linux, yet it is greater than simply an educational workout. you will study what stipulations carry out Linux's most sensible functionality, and you can see the way it meets the problem of offering reliable process reaction in the course of approach scheduling, dossier entry, and reminiscence administration in a large choice of environments. This booklet may also help you are making the main of your Linux system.

Show description

Read or Download Understanding the Linux Kernel, Third Edition PDF

Similar Computers books

Database Modeling and Design: Logical Design, 4th Edition (The Morgan Kaufmann Series in Data Management Systems)

Database structures and database layout know-how have passed through major evolution lately. The relational facts version and relational database platforms dominate company functions; in flip, they're prolonged through different applied sciences like information warehousing, OLAP, and knowledge mining. How do you version and layout your database program in attention of recent know-how or new company wishes?

Computer Networking: A Top-Down Approach (6th Edition)

&>Computer Networking keeps with an early emphasis on application-layer paradigms and alertness programming interfaces (the most sensible layer), encouraging a hands-on event with protocols and networking thoughts, prior to operating down the protocol stack to extra summary layers. This publication has develop into the dominant publication for this path as a result of the authors’ reputations, the precision of clarification, the standard of the artwork application, and the worth in their personal vitamins.

The Guru's Guide to Transact-SQL

On the grounds that its advent over a decade in the past, the Microsoft SQL Server question language, Transact-SQL, has develop into more and more renowned and extra robust. the present model activities such complex gains as OLE Automation aid, cross-platform querying amenities, and full-text seek administration. This booklet is the consummate consultant to Microsoft Transact-SQL.

Data Structures and Problem Solving Using Java (4th Edition)

Information buildings and challenge fixing utilizing Java takes a pragmatic and special approach to facts constructions that separates interface from implementation. it really is appropriate for the second one or 3rd programming direction.   This e-book presents a pragmatic advent to facts buildings with an emphasis on summary considering and challenge fixing, in addition to using Java.

Additional info for Understanding the Linux Kernel, Third Edition

Show sample text content

The wmb( ) macro is de facto less complicated since it expands into barrier( ). the reason for this is that latest Intel microprocessors by no means reorder write reminiscence accesses, so there's no have to insert a serializing meeting language guide within the code. The macro, notwithstanding, forbids the compiler from shuffling the directions. discover that during multiprocessor structures, all atomic operations defined within the past part "Atomic Operations" act as reminiscence obstacles simply because they use the lock byte. Spin Locks A frequent synchronization procedure is locking. while a kernel keep an eye on direction needs to entry a shared information constitution or input a serious quarter, it must gather a "lock" for it. A source secure through a locking mechanism is kind of just like a source restrained in a room whose door is locked whilst an individual is inside of. If a kernel regulate direction needs to entry the source, it attempts to "open the door" via buying the lock. It succeeds provided that the source is unfastened. Then, so long as it desires to use the source, the door continues to be locked. whilst the kernel keep watch over course releases the lock, the door is unlocked and one other kernel keep an eye on course might input the room. determine 5-1 illustrates using locks. 5 kernel keep watch over paths (P0, P1, P2, P3, and P4) try to entry serious areas (C1 and C2). Kernel keep watch over direction P0 is inside of C1, whereas P2 and P4 are ready to go into it. while, P1 is inside of C2, whereas P3 is ready to go into it. discover that P0 and P1 may possibly run at the same time. The lock for severe zone C3 is open simply because no kernel regulate course must input it. determine 5-1. keeping serious areas with a number of locks Spin locks are a distinct form of lock designed to paintings in a multiprocessor atmosphere. If the kernel keep watch over course unearths the spin lock "open," it acquires the lock and maintains its execution. Conversely, if the kernel regulate direction reveals the lock "closed" by means of a kernel keep an eye on course working on one other CPU, it "spins" round, many times executing a decent guide loop, until eventually the lock is published. The guide loop of spin locks represents a "busy wait. " The ready kernel keep watch over direction retains operating at the CPU, no matter if it has not anything to do along with waste time. however, spin locks are typically handy, simply because many kernel assets are locked for a fragment of a millisecond merely; consequently, it'd be way more time-consuming to liberate the CPU and reacquire it later. As a basic rule, kernel preemption is disabled in each severe sector secure by way of spin locks. in relation to a uniprocessor procedure, the locks themselves are lifeless, and the spin lock primitives simply disable or allow the kernel preemption. Please realize that kernel preemption continues to be enabled in the course of the busy wait part, hence a method looking forward to a spin lock to be published will be changed via the next precedence method. In Linux, each one spin lock is represented through a spinlock_t constitution including fields: slock Encodes the spin lock nation: the worth 1 corresponds to the unlocked kingdom, whereas each damaging worth and zero denote the locked nation break_lock Flag signaling technique is busy anticipating the lock (present provided that the kernel helps either SMP and kernel preemption) Six macros proven in desk 5-7 are used to initialize, try out, and set spin locks.

Rated 4.65 of 5 – based on 46 votes