DOC PREVIEW
ISU CPRE 558 - RTLinux Lab

This preview shows page 1-2-15-16-17-32-33 out of 33 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

RTLinux Lab – Introduction Cpre 558ContentsRTOS Vs. GPOSCan Linux provide real-time guarantees? -- No!!Can Linux provide real-time guarantees? -- No!! (contd..)Commercial RTOSRTLinux: OverviewLinux KernelRTLinux KernelLinux Kernel: code perspectiveRTLinux Kernel: code perspectiveGetting RTLinux readySo, How do we run a RT-application program ?HomeworkLab PoliciesThings to IssueHandling the hard disk (1)Handling the hard disk (2)RTLinux Lab# 1 Cpre 558Lab 1: ObjectivesPart 1Part 2A kernel module Vs. ProgramA typical kernel moduleHello world ModuleA typical RTLinux moduleHello World 2RTL_PRINTF: how does it work?Other ways of printing: RTL-FIFORTL-FIFOUsing RTL_FIFOSubmissionsThank You!!CprE 458/558: Real-Time Systems (G. Manimaran) 1RTLinux Lab – IntroductionCpre [email protected] 458/558: Real-Time Systems (G. Manimaran) 2Contents•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 discussionCprE 458/558: Real-Time Systems (G. Manimaran) 3RTOS 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 differentCprE 458/558: Real-Time Systems (G. Manimaran) 4Can 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 fairnessCprE 458/558: Real-Time Systems (G. Manimaran) 5Can 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 resourcesTherefore, Linux cannot provide real-time guaranteesCprE 458/558: Real-Time Systems (G. Manimaran) 6Commercial RTOS•RTLinux – Monolithic kernel with loadable modules•QNX – Microkernel approach•VxWorks – Monolithic kernel•LynxOS – Microkernel•ARTS, Spring, KURT, RTAI, etc….CprE 458/558: Real-Time Systems (G. Manimaran) 7•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 processRTLinux: OverviewCprE 458/558: Real-Time Systems (G. Manimaran) 8Linux KernelSystem librariesDevice driversLinux kernelHardwareI/O Hardware InterruptsUser ProcessesCprE 458/558: Real-Time Systems (G. Manimaran) 9RTLinux KernelHardwareSystem librariesDevice driversLinux kernelI/OSoftware InterruptsUser ProcessesRTLinux Plug-inReal Time TasksRT-SchedulerI/O Hardware InterruptsLinux is executed in the backgroundDirect h/w accessCprE 458/558: Real-Time Systems (G. Manimaran) 10Linux Kernel: code perspectiveLinux Monolithic kernel coreM1M2M3M4Kernel Loadable ModulesRAMDISKModule M2 service (system call)User ProcessM2THE controllerCprE 458/558: Real-Time Systems (G. Manimaran) 11RTLinux Kernel: code perspectiveLinux Monolithic kernel coreRTM2RTM3M1M2Kernel Loadable ModulesRAMDISKLoad RT coreRT Load commandRT-Core ModuleRT coreM3THE controllerCprE 458/558: Real-Time Systems (G. Manimaran) 12Getting RTLinux ready•Configure and compile a fresh Linux kernel (2.4.29)–Download the kernel fromhttp://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.29.tar.gz•Patch the RTLinux to the Linux kernel•Recompile the kernel and reboot the system into the new kernel•Configure the RTLinux kernel and compile itCprE 458/558: Real-Time Systems (G. Manimaran) 13So, 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!!!!CprE 458/558: Real-Time Systems (G. Manimaran) 14Homework•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.CprE 458/558: Real-Time Systems (G. Manimaran) 15Lab 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 CSGCprE 458/558: Real-Time Systems (G. Manimaran) 16Things 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 - 1331CCprE 458/558: Real-Time Systems (G. Manimaran) 17Handling 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 websiteCprE 458/558: Real-Time Systems (G. Manimaran) 18Handling 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 LabCprE 458/558: Real-Time Systems (G. Manimaran) 19RTLinux Lab# 1Cpre [email protected] 458/558: Real-Time Systems (G. Manimaran) 20Lab 1: Objectives•Part 1:–Getting the RTLinux lab setup ready•Part 2:–Run a few simple hello-world modulesCprE 458/558: Real-Time Systems (G. Manimaran) 21Part 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


View Full Document

ISU CPRE 558 - RTLinux Lab

Download RTLinux Lab
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view RTLinux Lab and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view RTLinux Lab 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?