Real-Time Operating System (RTOS) Vs. General Purpose OS (GPOS)
Can Linux provide real-time guarantees?
Commercial RTOSs
RTLinux Vs. Linux: Architectural comparison
RTLinux Vs. Linux: Code perspective
Get the RTLinux setup ready
Things to Issue and Handling the hard disk
Lab #1: Detailed discussion
Presentation at Android Builders Summit 2012.
Based on the experience of working with ODM companies and SoC vendors, this session would discuss how to figure out the performance hotspot of certain Android devices and then improve in various areas including graphics and boot time. This session consists of the detailed components which seem to be independent from each other in traditional view. However, the situation changes a lot in Android system view since everything is coupled in a mass. Three frequently mentioned items in Android engineering are selected as the entry points: 2D/3D graphics, runtime, and boot time. Audience: Developers who work on Android system integration and platform enablement.
syzkaller is an unsupervised, coverage-guided Linux syscall fuzzer.
The presentation covers basic of operation of the fuzzer, gives tutorial on how to run it and how to extend it to fuzz new drivers.
This is the presentation I gave on Linux kernel modules at the Linux Meetup in Austin, TX, on 2/5/2015.
http://www.meetup.com/linux-85/events/185946802/
Code referred to in the presentation: https://github.com/ereyes01/kernel-mod-prez
XPDDS17: Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...The Linux Foundation
Part 1: Reworking the ARM GIC Emulation
The ARM Generic Interrupt Controller (GIC) provides some level of virtualization support in hardware. This still requires emulation of the distributor part, which has to integrate with the virtualization feature. Doing this in a performing and readable way is not trivial, especially the locking strategy tends to be complicated.
While extending the existing virtual GIC support in Xen to cover support for MSIs, some issues have been discovered which ask for some significant changes in the existing code.
The presentation will briefly describe the existing VGIC design and the issues we faced when trying to extend it. Based on this the changes will be presented and how they improve and ideally simplify the code.
Part 2: Xen Challenges in the ARM ITS Emulation
For being able to use MSIs on ARM systems in Xen domains we need to emulate the ARM GICv3 ITS controller. Its design is centered around a command queue located in normal system memory.
Emulating this in the Xen hypervisor brings some interesting challenges, ranging from safely accessing the guest memory and dealing with possible propagation of commands, to possible DOS attacks by domains keeping the emulation code busy.
The presentation outlines the main problems and how we hit Xen limits in emulating this correctly and efficiently. Also it presents our temporary workarounds and their drawbacks.
In this talk Liran will discuss interrupt management in Linux, effective handling, how to defer work using tasklets, workqueues and timers. We'll learn how to handle interrupts in userspace and talk about the performance and latency aspects of each method as well as look at some examples from the kernel source.
Liran is the CTO at Mabel technology and co-founder of DiscoverSDK - Software Libraries directory and DiscoverCloud - Business Apps directory.
More than 20 years of training experience including courses in: Linux, Android, Real-time and Embedded systems, and many more.
Presentation at Android Builders Summit 2012.
Based on the experience of working with ODM companies and SoC vendors, this session would discuss how to figure out the performance hotspot of certain Android devices and then improve in various areas including graphics and boot time. This session consists of the detailed components which seem to be independent from each other in traditional view. However, the situation changes a lot in Android system view since everything is coupled in a mass. Three frequently mentioned items in Android engineering are selected as the entry points: 2D/3D graphics, runtime, and boot time. Audience: Developers who work on Android system integration and platform enablement.
syzkaller is an unsupervised, coverage-guided Linux syscall fuzzer.
The presentation covers basic of operation of the fuzzer, gives tutorial on how to run it and how to extend it to fuzz new drivers.
This is the presentation I gave on Linux kernel modules at the Linux Meetup in Austin, TX, on 2/5/2015.
http://www.meetup.com/linux-85/events/185946802/
Code referred to in the presentation: https://github.com/ereyes01/kernel-mod-prez
XPDDS17: Reworking the ARM GIC Emulation & Xen Challenges in the ARM ITS Emu...The Linux Foundation
Part 1: Reworking the ARM GIC Emulation
The ARM Generic Interrupt Controller (GIC) provides some level of virtualization support in hardware. This still requires emulation of the distributor part, which has to integrate with the virtualization feature. Doing this in a performing and readable way is not trivial, especially the locking strategy tends to be complicated.
While extending the existing virtual GIC support in Xen to cover support for MSIs, some issues have been discovered which ask for some significant changes in the existing code.
The presentation will briefly describe the existing VGIC design and the issues we faced when trying to extend it. Based on this the changes will be presented and how they improve and ideally simplify the code.
Part 2: Xen Challenges in the ARM ITS Emulation
For being able to use MSIs on ARM systems in Xen domains we need to emulate the ARM GICv3 ITS controller. Its design is centered around a command queue located in normal system memory.
Emulating this in the Xen hypervisor brings some interesting challenges, ranging from safely accessing the guest memory and dealing with possible propagation of commands, to possible DOS attacks by domains keeping the emulation code busy.
The presentation outlines the main problems and how we hit Xen limits in emulating this correctly and efficiently. Also it presents our temporary workarounds and their drawbacks.
In this talk Liran will discuss interrupt management in Linux, effective handling, how to defer work using tasklets, workqueues and timers. We'll learn how to handle interrupts in userspace and talk about the performance and latency aspects of each method as well as look at some examples from the kernel source.
Liran is the CTO at Mabel technology and co-founder of DiscoverSDK - Software Libraries directory and DiscoverCloud - Business Apps directory.
More than 20 years of training experience including courses in: Linux, Android, Real-time and Embedded systems, and many more.
A brief overview of linux scheduler, context switch , priorities and scheduling classes as well as new features. Also provides an overview of preemption models in linux and how to use each model. all the examples are taken from http://www.discoversdk.com
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
This presentation features a walk through the Linux kernel networking stack for users and developers. It will cover insights into both, existing essential networking features and recent developments and will show how to use them properly. Our starting point is the network card driver as it feeds a packet into the stack. We will follow the packet as it traverses through various subsystems such as packet filtering, routing, protocol stacks, and the socket layer. We will pause here and there to look into concepts such as networking namespaces, segmentation offloading, TCP small queues, and low latency polling and will discuss how to configure them.
Video: http://joyent.com/blog/linux-performance-analysis-and-tools-brendan-gregg-s-talk-at-scale-11x ; This talk for SCaLE11x covers system performance analysis methodologies and the Linux tools to support them, so that you can get the most out of your systems and solve performance issues quickly. This includes a wide variety of tools, including basics like top(1), advanced tools like perf, and new tools like the DTrace for Linux prototypes.
BlueStore, A New Storage Backend for Ceph, One Year InSage Weil
BlueStore is a new storage backend for Ceph OSDs that consumes block devices directly, bypassing the local XFS file system that is currently used today. It's design is motivated by everything we've learned about OSD workloads and interface requirements over the last decade, and everything that has worked well and not so well when storing objects as files in local files systems like XFS, btrfs, or ext4. BlueStore has been under development for a bit more than a year now, and has reached a state where it is becoming usable in production. This talk will cover the BlueStore design, how it has evolved over the last year, and what challenges remain before it can become the new default storage backend.
Have a quick overview of most of the embedded linux components and their details. How ti build Embedded Linux Hardware & Software, and developing Embedded Products
I gave this workshop at FOSS-north 2019 https://www.foss-north.se/2019. It is is an introduction to Embedded Linux, using Buildroot to build the images and the BeagleBone Black as the target.
Linux is the best-known and most-used open source operating system. As an operating system, Linux is software that sits underneath all of the other software on a computer, receiving requests from those programs and relaying these requests to the computer's hardware.
Kirill Tsym discusses Vector Packet Processing:
* Linux Kernel data path (in short), initial design, today's situation, optimization initiatives
* Brief overview of DPDK, Netmap, etc.
* Userspace Networking projects comparison: OpenFastPath, OpenSwitch, VPP.
* Introduction to VPP: architecture, capabilities and optimization techniques.
* Basic Data Flow and introduction to vectors.
* VPP Single and Multi-thread modes.
* Router and switch for namespaces example.
* VPP L4 protocol processing - Transport Layer Development Kit.
* VPP Plugins.
Kiril is a software developer at Check Point Software Technologies, part of Next Generation Gateway and Architecture team, developing proof of concept around DPDK and FD.IO VPP. He has years of experience in software, Linux kernel and networking development and has worked for Polycom, Broadcom and Qualcomm before joining Check Point.
The second part of Linux Internals covers system calls, process subsystem and inter process communication mechanisms. Understanding these services provided by Linux are essential for embedded systems engineer.
A brief overview of linux scheduler, context switch , priorities and scheduling classes as well as new features. Also provides an overview of preemption models in linux and how to use each model. all the examples are taken from http://www.discoversdk.com
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
This presentation features a walk through the Linux kernel networking stack for users and developers. It will cover insights into both, existing essential networking features and recent developments and will show how to use them properly. Our starting point is the network card driver as it feeds a packet into the stack. We will follow the packet as it traverses through various subsystems such as packet filtering, routing, protocol stacks, and the socket layer. We will pause here and there to look into concepts such as networking namespaces, segmentation offloading, TCP small queues, and low latency polling and will discuss how to configure them.
Video: http://joyent.com/blog/linux-performance-analysis-and-tools-brendan-gregg-s-talk-at-scale-11x ; This talk for SCaLE11x covers system performance analysis methodologies and the Linux tools to support them, so that you can get the most out of your systems and solve performance issues quickly. This includes a wide variety of tools, including basics like top(1), advanced tools like perf, and new tools like the DTrace for Linux prototypes.
BlueStore, A New Storage Backend for Ceph, One Year InSage Weil
BlueStore is a new storage backend for Ceph OSDs that consumes block devices directly, bypassing the local XFS file system that is currently used today. It's design is motivated by everything we've learned about OSD workloads and interface requirements over the last decade, and everything that has worked well and not so well when storing objects as files in local files systems like XFS, btrfs, or ext4. BlueStore has been under development for a bit more than a year now, and has reached a state where it is becoming usable in production. This talk will cover the BlueStore design, how it has evolved over the last year, and what challenges remain before it can become the new default storage backend.
Have a quick overview of most of the embedded linux components and their details. How ti build Embedded Linux Hardware & Software, and developing Embedded Products
I gave this workshop at FOSS-north 2019 https://www.foss-north.se/2019. It is is an introduction to Embedded Linux, using Buildroot to build the images and the BeagleBone Black as the target.
Linux is the best-known and most-used open source operating system. As an operating system, Linux is software that sits underneath all of the other software on a computer, receiving requests from those programs and relaying these requests to the computer's hardware.
Kirill Tsym discusses Vector Packet Processing:
* Linux Kernel data path (in short), initial design, today's situation, optimization initiatives
* Brief overview of DPDK, Netmap, etc.
* Userspace Networking projects comparison: OpenFastPath, OpenSwitch, VPP.
* Introduction to VPP: architecture, capabilities and optimization techniques.
* Basic Data Flow and introduction to vectors.
* VPP Single and Multi-thread modes.
* Router and switch for namespaces example.
* VPP L4 protocol processing - Transport Layer Development Kit.
* VPP Plugins.
Kiril is a software developer at Check Point Software Technologies, part of Next Generation Gateway and Architecture team, developing proof of concept around DPDK and FD.IO VPP. He has years of experience in software, Linux kernel and networking development and has worked for Polycom, Broadcom and Qualcomm before joining Check Point.
The second part of Linux Internals covers system calls, process subsystem and inter process communication mechanisms. Understanding these services provided by Linux are essential for embedded systems engineer.
If you're looking for the top 100 linux interview questions and answers, then you've come to the right place. We at hirist have compiled a list of the top linux interview questions that are asked by companies like TCS, Infosys, Wipro, HCL and Cognizant and put it together in a pdf format that can be downloaded for free.
You can easily download this free linux interview questions pdf file and use it to prepare for an interview. It doesn't matter if you're looking for linux interview questions and answers for freshers or linux interview questions and answers for experienced because this presentation will cater to both segments.
This list includes Linux interview questions and answers in the below categories:
top 100 linux interview questions
kickstart linux interview questions
interview questions on linux boot process
top 100 linux interview questions answers
linux interview questions 2009
linux installation interview questions
interview question on linux commands
linux interview topics
top 50 linux interview questions
Top 30 linux system admin interview questions & answers
Top 25 Unix interview questions with answers
Linux Interview Questions
Practical Interview Questions and Answers on Linux
Top 100 Informatica Interview Questions
10 Linux and UNIX Interview Questions and Answers
linux interview questions and answers for freshers
linux interview questions and answers pdf
linux interview questions and answers pdf free download
linux interview questions and answers for experienced pdf
linux l2 interview questions and answers
linux system administrator interview questions and answers
basic linux interview questions and answers
red hat linux interview questions and answers
Embedded Fest 2019. Руслан Биловол. Linux Boot: The Big Bang theoryEmbeddedFest
Many Linux developers and users know that Bootloader boots Linux Kernel which starts Userspace.
But what is behind that?
Linux Boot process is very similar to the Big Bang which happened in our world: from singularity to the whole beautiful Universe of running Linux processes. What do you think is a black hole equivalent in the Linux? Come to hear about all of that from an engineer who worked on a new processors and boards bringup, Linux boot process modifications and did boot time optimization many times.
Linux Kernel Platform Development: Challenges and InsightsGlobalLogic Ukraine
This presentation is about the main tasks which Linux kernel platform engineers take care of. The talk includes real-life cases which help understand the role of respective specialists and might be helpful to those who consider such change in their careers.
The talk was delivered by Sam Protsenko (Software Engineer, Consultant, GlobalLogic) at GlobalLogic Embedded Career Day #2 on February 10, 2018.
More about GlobalLogic Embedded Career Day #2: https://www.globallogic.com/ua/events/globallogic-kyiv-embedded-career-day-2-materials
Talk from Embedded Linux Conference, http://elcabs2015.sched.org/event/551ba3cdefe2d37c478810ef47d4ca4c?iframe=no&w=i:0;&sidebar=yes&bg=no#.VRUCknSQQQs
Bijna iedereen die wel eens op de command line dingen uitvoert, kent wel een paar Linux commando's. Deze presentatie behandelt de Linux basiskennis aan de hand van de LPIC-1 examenstof (volgens opbouw van "LPI Certification in a Nutshell"):
Topic 101: System Architecture &
Topic 102: Linux Installation and Package Management
LPIC-1 is een certificaat dat wordt uitgegeven door Linux Professional Institute (LPI) en waarmee je jouw Linux kennis in de arbeidsmarkt kunt aantonen.
http://www.linuxnijmegen.nl/bijeenkomsten/31-lugn18-dinsdag-11-februari-2014
This session will first discuss basic analysis of a Linux system with pre-installed tools. You will learn several commands to help you understand Linux issues better.
In the second step, you will learn how to fix a broken Linux system. The session will teach some major troubleshooting techniques and will be filled with lots of demos that will show you how to fix real problems on real broken systems.
Course 102: Lecture 25: Devices and Device Drivers Ahmed El-Arabawy
This lecture discusses the concept of Linux device Drivers and Kernel Loadable Modules in general. It shows how to handle them such as loading/unloading ,and querying for their info. It also discusses the role of device files and how it binds to device drivers in the Linux Kernel
Video for this lecture on youtube:
http://www.youtube.com/watch?v=5qhgMyPyvVE
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
Ahmed ElArabawy
- https://www.linkedin.com/in/ahmedelarabawy
This presentation is about -
embedded system programming,
What are device drivers?,
Types of device driver,
Recognizing device drivers,
Character Device Drivers,
Features of kernel programming,
"In the beginning there was RPM, and it was good." Certainly, Linux packaging has solved many of the problems involved in shipping software, from creation to consumption and maintenance. As software development and deployment have evolved, however, new pain points have cropped up that have not been solved by traditional packaging tools.
Are containers the answer? They may be able to solve many of the current problems, but they also introduce a new set of issues and ignore important lessons from the evolution of distribution-level packaging.
Yocto Project Dev Day Prague 2017 - Advanced class - Kernel modules with eSDKMarco Cavallini
Excerpt of the lectures at Yocto Project Dev Day in Prague, 2017
During the advanced class Marco Cavallini ran this presentation about the creation of a Linux kernel module with eSDK.
For Students & whose Interested In Embedded Systems & Embedded Technology Starting Topics of "What is embedded System and its Applications And Embedded Systems Introduction & Differentness Types of Embedded Operating Systems.
For Students & whose Interested In Embedded Systems & Embedded Technology Starting Topics of "What is embedded System and its Applications And Embedded Systems Introduction & Differentness Types of Embedded Operating Systems.
When a process is created , the memory manager allocates the memory address (blocks) to it by mapping the process address space .Threds of share the memory space of the process.
INTRODUCTION: One popular RTOS For the E.S development is microCOS-ll for noncommercial use, it is free ware .jean J.labrosse designed it in 1992 it is well developed for a no.of applications.it is available from micrium it is popularly known as MUCOS (or) UCOS.
Automated system for fault analysis in industries using GSM.
By using this kind of project In industries we can reduce the man power for continuous operation the accuracy of the work will be more and also there will be less chances of damaging the devices.
Energy is essential factor for the development of any nation.
The resources of the fossil fuels are limited.
Solar made from panel directly converts solar radiation into electrical energy. Solar panel is mainly semiconductor.
In this project, the data can be transmitted to and received from remote Zigbee communication device. Data Security is primary concern for every communication system.
In this present days in every rural areas developed but in the urban areas like hilly areas there is major problem facing.so to modify that type of problems we are introducing this project.
This project aims to develop a smart home system for disabled people.
To monitor the environmental conditions.
To providing safe, secure and empowering environments.
STUDENT DATA LOGGING SYSTEM INTO COLLEGE WEBSITE BASED ON RFIDJOLLUSUDARSHANREDDY
saving time – important administrative and educational resources could be freed up by utilizing college attendance management system(cams)
Radio frequency identification is the use of radio waves to read and capture information stored on a tag attached to an object .
Solar energy has proven its wroth of alternative energy.
Freehand available everywhere, the power of the sun can be employed to power Everything like cell phones and mp3 players.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2. J.SUDARSHANREDDY
Contents
• Real-Time Operating System (RTOS) Vs. General Purpose OS
(GPOS)
• Can Linux provide real-time guarantees?
• Commercial RTOSs
• RTLinux Vs. Linux: Architectural comparison
• RTLinux Vs. Linux: Code perspective
• Get the RTLinux setup ready
• Things to Issue and Handling the hard disk
• Lab #1: Detailed discussion
01/25/15
3. J.SUDARSHANREDDY
RTOS Vs. GPOS
• RTOS
– needs deterministic timing behavior
– Works under worst case assumptions
• GPOS
– high throughput and fairness
– Optimizes for the average case
• Hence, the design objectives of the OSs are different
01/25/15
4. J.SUDARSHANREDDY
Can Linux provide real-time guarantees?
-- No!!
• Linux
– non-preemptible kernel
• A system call might take long time to complete
– Coarse timer resolution
• Tasks can be released only with 10ms precision
– Virtual memory
• Introduces unpredictable amount of delays
– Variable priority
• Each task is assigned a priority which varies over the time;
this is to achieve fairness
01/25/15
5. J.SUDARSHANREDDY
Can Linux provide real-time guarantees?
-- No!! (contd..)
• Linux
– Linux will batch several operations for efficient use of H/W delaying
all tasks
– Linux also reorders requests from multiple processes for H/W
efficiency
– Linux does not preempt low priority task in a system call, instead
queues the high priority task
– Linux makes high priority tasks to wait for low priority tasks to release
resources
Therefore, Linux cannot provide real-time guarantees
01/25/15
7. J.SUDARSHANREDDY
• Open source Linux project
• Supports x86, PowerPC, Alpha
• Available as a patch to the regular Linux kernel
• Provides an RT API for developers
• Runs Linux kernel as lowest priority process
RTLinux: Overview
01/25/15
10. J.SUDARSHANREDDY
Linux Kernel: code perspective
Linux Monolithic kernel core
M1
M2
M3
M4
KernelLoadableModules
RAM DISK
Module M2 service
(system call)
User
Process
M2
THE
controller
01/25/15
12. J.SUDARSHANREDDY
Getting RTLinux ready
• Configure and compile a fresh Linux kernel (2.4.29)
– Download the kernel from
http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4
• Patch the RTLinux to the Linux kernel
• Recompile the kernel and reboot the system into the
new kernel
• Configure the RTLinux kernel and compile it
01/25/15
13. J.SUDARSHANREDDY
So, How do we run a RT-application program ?
• Step 1: Write the RT-application program as a kernel
module
– (You are still in Linux)
• Step 2: Compile the module and check for errors
– (You are still in Linux)
• Step 3: Load the RT-Core (or RT Scheduler, etc..) and
the RT-application program module
– (After this we will be in RTLinux)
• Step 4: Now you are in RTLinux!!!!
01/25/15
14. J.SUDARSHANREDDY
Homework
• Submission 1:
– Give a ten line write-up comparing RTLinux with
Linux with at least five differences along with the
references.
• Submission 2:
– Give a ten line write-up comparing RTLinux with
two other commercial RTOSs with at least five
differences for each of them along with the
references.
01/25/15
15. J.SUDARSHANREDDY
Lab Policies
• Six assignments in total
• First three assignments are mandatory
• One of the last three assignments is
mandatory
• You will be working with a removable
hard disk which can be issued from CSG
01/25/15
16. J.SUDARSHANREDDY
Things to Issue
• Issue the following from the CSG
– Hard disk (one per group)
– Key (one per group)
– RHEL – WS3 installation DVD (one per group)
• You need to download the lab01 tar file
(lab01.tgz) from the course website.
• The RTLinux lab is in Coover - 1331C
01/25/15
17. J.SUDARSHANREDDY
Handling the hard disk (1)
• Shutdown the PC
• After the power is off, unlock the existing hard
disk and take it out
• Insert the hard disk given to you and lock it
• Restart the comp
• Follow the manual you have downloaded from
the course website
01/25/15
18. J.SUDARSHANREDDY
Handling the hard disk (2)
• After you are done with the lab:
– Shutdown the PC
– After the power is off, unlock the hard disk
and remove it
– Insert the original hard disk and lock it
– Leave the Lab
01/25/15
20. J.SUDARSHANREDDY
Part 1
• Install the RHEL-WS3 using the DVD given to you
– Go for the auto-partitioning option
– Rest everything is straightforward
• Configure and compile fresh Linux kernel (2.4.29)
• Patch the RTLinux to the Linux kernel
• Recompile the kernel and reboot the system into the
new kernel
• Load RT-modules
• Instructions are provided in the Lab manual
01/25/15
21. J.SUDARSHANREDDY
Part 2
• Boot into the RTLinux kernel compiled in part-1
• The objectives of the part 2 are:
– Understanding a simple RTLinux kernel module
• With one thread (hello-1) and two threads (hello-2)
– Printing from a RTLinux module
• rtl_printf (hello-3)
• Using rtf_put (RT-FIFO) (hello-4)
01/25/15
22. J.SUDARSHANREDDY
A kernel module Vs. Program
• All RT-Tasks are kernel modules. Therefore, we write kernel
modules in this lab.
• A user program runs in user space and the kernel module runs in
the kernel space
• A user program starts running at its “main” function
• A kernel module starts running at the “init_module” function and
exits via “cleanup_module” function
• Therefore, for a kernel module “init_module” and
‘cleanup_module” are as necessary as “main” is
necessary for a C program
01/25/15
23. J.SUDARSHANREDDY
A typical kernel module
Init_module()
{
…….
Perform your module initiation stuff etc..
}
Cleanup_module()
{
…….
Perform cleanup stuff like destroying the threads, freeing
memory, etc..
}
01/25/15
24. J.SUDARSHANREDDY
Hello world Module
• Go through the hello world module
• Realize the importance of init_module and
cleanup_module
• Notice the way the thread is created and how
it is made periodic
• Understand the “pthread_make_periodic” and
“pthread_wait” and other interfacing functions
01/25/15
25. J.SUDARSHANREDDY
A typical RTLinux module
Init_module() {
For each thread:
Choose the priority function
//pthread_set_priority(..);
Assign the “task_function” to
the thread
Create the thread
//pthread_create(..,
task_function,..); }
Task_function()
{
Pthread_make_periodic_np(
p);
while(1)
{
Pthread_wait_np();
//perform the task function
//for this instance
}
}
Cleanup_module()
{
…….
Delete the thread
//pthread_delete_np(..);
}
This function tells
the scheduler that
I am a periodic
task with period
“p”
This function tells
the scheduler that
I am done for this
instance and
schedule me after
“p” units of time
01/25/15
26. J.SUDARSHANREDDY
Hello World 2
• This module creates two threads using a nice
“thread_struct” structure to make the
initialization easy and compact.
• Once again go through the interfacing
funcitons
• This time put more “rtl_printf” statements and
open “/var/log/messages” file to find your
output
01/25/15
27. J.SUDARSHANREDDY
RTL_PRINTF: how does it work?
Rtl_printf printk
Printk buffer
Kernel ring
buffer
syslodgconsole
Might overflow!!
Might overflow!!
Log file
01/25/15
28. J.SUDARSHANREDDY
Other ways of printing: RTL-FIFO
• RTLinux FIFO provides communication
mechanisms between RTL threads and
Linux task.
• A linux process creates the RTL-FIFO
buffer which the RTL threads access
and write and read from them
01/25/15
29. J.SUDARSHANREDDY
RTL-FIFO
• Creating and destroying FIFOS:
– Using functions: rtf_create and rtf_destroy
– These functions are called from linux
process: open(), read(), write();
• Accessing FIFOs from RTL threads
– using functions: rtf_put and rtf_get
01/25/15
31. J.SUDARSHANREDDY
Submissions
• Submission 1:
– Submit a five line write-up explaining the working of
the two RTL interfacing functions including:
• Pthread_make_periodic_np
• Pthread_wait_np
• Rtf_create,rtf_destroy, rtf_put, rtf_get
• Submission 2:
– Submit a five line write-up giving at least five
differences between a kernel module and a user
program.
01/25/15