| An overview of Linux for embedded developers (Part 2) |
(continuation)
The Linux Kernel
As mentioned previously, the Linux kernel provides support for memory management, process and thread creation, interprocess communications mechanisms, interrupt handling, execute-in-place ROM filesystems, RAM filesystems, flash management, and TCP/IP networking. The Linux kernel provides a POSIX-compliant API to these services. The directory structure of the kernel source tree separates architecture-dependent code out from the core kernel services, allowing greater reliability with known-working core algorithms, with calls to machine-specific code added for particular platforms. Thus, adding support for specific device features is fairly straightforward. This implementation methodology is also followed for memory management, i/o, and driver designs, where the core kernel code abstracts a model that allows implementation on differing architectures.
Memory Management
The kernel provides complete modern virtual memory services to applications programs, including support for large address spaces, protection, demand paging, memory mapping and shared virtual memory. While support for large address spaces or demand paging may not seem important for embedded systems designs, all of the modern 32-bit processor architectures support these features, and Linux will allow growth in application complexity as hardware costs are reduced without redesign or reimplementation. Memory protection allows building systems that allow user-upgradeable or third-party applications to be added to the system, without compromising the entire system. Shared virtual memory support allows multiple copies of application's code segments to be shared across the system using less physical memory, as well as implementation of more sophisticated schemes like high-speed direct application framebuffer access for MPEG digital video players, for instance.
Processes and Threads
Linux provides a relatively cheap process creation mechanism, which allows memory-protected processes and threads to be created quickly for a variety of uses. Recent embedded implementations provide soft real-time scheduling services for applications programs. In most cases, these scheduling services provide all that is required for applications requiring networking, i/o and graphical services. Each process in Linux has its own table of open files and virtual memory allocations, although files and memory can be shared between processes.
Interprocess Communication
The kernel provides signals, pipes and sockets for communications between applications. The signal mechanism allows user programs to be asynchronously notified when a specified event occurs. Signals can be sent to single processes or process groups. The pipe mechanism implements a full-duplex facility for arbitrary byte i/o between processes. Pipes are also very useful in connecting one programs' output to another's input, and constructing data filters. Linux sockets act just like file or pipe descriptors but instead communicate to the networking subsystem. A specialized type of socket, known as a local UNIX socket, allows communications between local processes similar to the pipe mechanism but using the networking system calls instead. Using a socket creation parameter, processes communicating together on a local machine can be replaced by processes communicating between two different machines, using the networking system, without other architectural changes.
Interrupt Handling and Device Drivers
Linux provides sophisticated methods for interfacing the system with hardware. The interrupt handling architecture allows handling high-priority interrupts with interrupts disabled, with scheduling of later "bottom-half" code to execute in kernel mode after interrupts have been enabled and other higher-priority kernel tasks completed. In addition, support for polling and DMA is provided. Adding support for a specific hardware device is implemented using a device driver, which may be linked into the kernel, or dymanically loaded as a kernel loadable module. At system startup time, scanning for various hardware options can be performed, and drivers loaded as required.
RAM/ROM Filesystems
The Linux kernel implements a virtual file system that allows the implementation of various real filesystems accessible with a common interface. Standard disk and network file systems are supported, along with filesystems for ROM and RAM residence. A compressed ramdisk image for system startup can reside linked with the Linux kernel, or copied from a CompactFlash card, for instance. In addition, implementations for execute-in-place ROM filesystems are becoming available. Read-only compressed filesystems can be decompressed partially as required, resulting in fast boot times. Filesystems can also be created for initial boot purposes and then discarded, resulting in more memory use after one-time system initialization.
TCP/IP Networking
A very complete implementation of the standard TCP/IP networking protocol suite, including TCP, UDP, IP, and ARP is found in the Linux kernel. In addition, complete support for NFS, DNS, DHCP, PPP and SLIP is included by applications programs. Linux's networking support and configuration customizability make Linux well suited for the mobile and Internet appliance markets, where data communications is a key technology.
--- Continued ---
Story navigation . . .
(Click here for further information)
|
|
|
FUEL Database on MontaVista Linux
Whether building a mobile handset, a car navigation system, a package tracking device, or a home entertainment console, developers need capable software systems, including an operating system, development tools, and supporting libraries, to gain maximum benefit from their hardware platform and to meet aggressive time-to-market goals.
Breaking New Ground: The Evolution of Linux Clustering
With a platform comprising a complete Linux distribution, enhanced for clustering, and tailored for HPC, Penguin Computing¿s Scyld Software provides the building blocks for organizations from enterprises to workgroups to deploy, manage, and maintain Linux clusters, regardless of their size.
Data Monitoring with NightStar LX
Unlike ordinary debuggers, NightStar LX doesn¿t leave you stranded in the dark. It¿s more than just a debugger, it¿s a whole suite of integrated diagnostic tools designed for time-critical Linux applications to reduce test time, increase productivity and lower costs. You can debug, monitor, analyze and tune with minimal intrusion, so you see real execution behavior. And that¿s positively illuminating.
Virtualizing Service Provider Networks with Vyatta
This paper highlights Vyatta's unique ability to virtualize networking functions using Vyatta's secure routing software in service provider environments.
High Availability Messaging Solution Using AXIGEN, Heartbeat and DRBD
This white paper discusses a high-availability messaging solution relying on the AXIGEN Mail Server, Heartbeat and DRBD. Solution architecture and implementation, as well as benefits of using AXIGEN for this setup are all presented in detail.
Understanding the Financial Benefits of Open Source
Will open source pay off? Open source is becoming standard within enterprises, often because of cost savings. Find out how much of a financial impact it can have on your organization. Get this methodology and calculator now, compliments of JBoss.
Embedded Hardware and OS Technology Empower PC-Based Platforms
The modern embedded computer is the jack of all trades appearing in many forms.
Data Management for Real-Time Distributed Systems
This paper provides an overview of the network-centric computing model, data distribution services, and distributed data management. It then describes how the SkyBoard integration and synchronization service, coupled with an implementation of the OMG¿s Data Distribution Service (DDS) standard, can be used to create an efficient data distribution, storage, and retrieval system.
7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.
|
|
|
|
|