Exploring Embedded Systems: RTLinux OS and Linux for Embedded Applications
Dive into the world of Embedded Systems with a focus on RTLinux OS and Linux for embedded applications. Understand the core concepts, advantages, and challenges of using Linux in embedded systems. Learn about the popularity of Linux, its functionalities, and its applications in various devices. Discover the features of RTLinux OS, its benefits, and how it is utilized in real-world scenarios.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Subject Name : Embedded Systems Department of : ECE Created By: Dr. Ravinder Nath Rajotiya JIMS Engineering Management Technical Campus Greater Noida, UP -201308 (Affiliated to Guru Gobind Singh Indraprastha University, New Delhi)
Subject : Embedded Systems Topic: : RTLinux OS
List of Topics to be covered Re-Cap of Pre. Topic (OS) RTLinux OS
OS Concepts Re-visited An OS schedules the process(threads and tasks). OS manages the use of system resources by the processes, threads and tasks. The OS enables synchronizations and concurrent running of processes. The OS manages access to resources. It manages inter-process communication(IPC) i.e. communications among the ISRs, tasks and OS functions An RTOS enables basic functions as follows: Process management (thread or task management)-process creation, deletion Processing requests for resources, memory management, allocations, re- allocation, real time scheduling, handling of fast level of ISRs, slow level interrupt service threads(ISTs) RTOS enables management of I/O subsystems, devices, device drivers, and functions for enabling sharing of resources, data, file and i/o systems, asynchronous and synchronous i/os.
RTLinux OS These days Linux is increasingly used in embedded systems. Linux kernel find extensive use in: Android based mobile devices Smartphones Tablets Touchscreens based systems Reasons for its Popularity: Freeware Available of large number of drives for devices Has provision for registering and de-registering device-driver modules Expandability of kernel codes at runtime And finally the modules are scheduled like processes Shortcomings Need higher footprint in memory for kernel and root-file system than other OS Has complex framework for device drivers Has complexities of memory accesses in user and supervisory modes Linux codes are difficult to learn initially
Linux for Embedded Systems Linus Torvalds inventor of linux OS Embedded Linux means a distribution of Linux for use in embedded systems for specific microprocessors and microcontrollers. There are several distribution sources for specific Applications, processors. Linux ports on many processor architectures, in many embedded computing systems, desktop and servers. It is freeware, readability of source code so it can be modified and re- distributed. It combines Linux kernet with small set of free s/w utilities. Glibc is a GNU a general purpose library function in C . The uClinux is linux, which is portable distribution and is a file for library function for specific micrcontroller family.
Linux for Embedded Systems. Embedded-Linux application-program initiates the system calls or messages passes for the following kernel functions: Process amangement functions Memory management functions(allocation, de-allocation, pointers, creating and deleting tasks) File-systems functions Shared memory functions Networking systems functions Device control functions for peripheral present into a system
Classes of Devices and Modules in Embedded Linux The Linux way of looking at devices distinguishes between three fundamental device types. Each module usually implements one of these types, and thus is classifiable as a char module, a block module, or a network module. The three classes are: Character devices : A character (char) device is one that can be accessed as a stream of bytes (like a file). Such a driver usually implements at least the open, close, read, and write system calls. The text console (/dev/console) and the serial ports (/dev/ttyS0 and friends) are examples of char devices, as they are well represented by the stream abstraction. Char devices are accessed by means of filesystem nodes, such as /dev/tty1 and /dev/lp0. The only relevant difference between a char device and a regular file is that you can always move back and forth in the regular file, whereas most char devices are just data channels, which you can only access sequentially. There exist, nonetheless, char devices that look like data areas, and you can move back and forth in them; for instance, this usually applies to frame grabbers, where the applications can access the whole acquired image using mmap or lseek.
Device types.. Block devices : Like char devices, block devices are accessed by filesystem nodes in the /dev directory. A block device is a device (e.g., a disk) that can host a filesystem. In most Unix systems, a block device can only handle I/O operations that transfer one or more whole blocks, which are usually 512 bytes (or a larger power of two) bytes in length. Linux, instead, allows the application to read and write a block device like a char device it permits the transfer of any number of bytes at a time. As a result, block and char devices differ only in the way data is managed internally by the kernel, and thus in the kernel/driver software interface. Network interfaces: Usually, an interface is a hardware device, but it might also be a pure software device, like the loopback interface. A network interface is in charge of sending and receiving data packets, driven by the network subsystem of the kernel, without knowing how individual transactions map to the actual packets being transmitted. Many network connections (especially those using TCP) are stream- oriented, but network devices are, usually, designed around the transmission and receipt of packets. A network driver knows nothing about individual connections; it only handles packets. FTP, TCP, IP, UDP.
Important Aspects of Linux OS for embedded system design Linux is multi-user OS and support user group Linux has a root directory ( / ) and all files are subdirectories to it. Linux has large number of commands for editors, files, directories and i/os Linux has large no of interfaces for users, GUI, C shell, bash shell, Shell is an interface for user to enter commands. Linux uses POSIX (portable OS interface for computing System using linux/unix) process and threads. Linux header files linux/types.h and linux/shm.h if included, support system programming for forking processes and shared memory functions in the kernel. A process always creates, as child process in the process that uses fork() function, the child creates as the copy of the parent with a new process ID. Linux has modules for char, block and network device driver and others. Linux support module initialization, handling of errors, prevention of unauthorized port access, usage count, root level security and clean up. Linux kernel can insert a module by registering it and remove it by de-registering it. Linux header file times.h, if included, support the timing function in the kernel for scheduling. Linux/delay.h and linux/tqueue.h support delay and task-queue functions. Linux support signal on events. Files such as linux/signal.h. linux/pthread.h, linux/ipc.h, linux/sem.h, linux/msg.h support thread, inter process, semaphor and message-queue functions