SlideShare uma empresa Scribd logo
1 de 34
OVERVIEW OF RTLINUX
         &
     FEATURES


        Dr. C. SARITHA
      Lecturer in Electronics
    SSBN Degree & PG College
            Anantapur
OVERVIEW

•   What is operating system?
•   Real time operating system
•   Overview of Unix/Linux
•   Features of Linux
•   RTLinux
What is an operating system?
• An operating system is a set of programs
  that    manage       computer   hardware
  resources and provide common services
  for application software.
• The operating system is the most
  important type of system software in a
  computer system.
• A user cannot run an application program
  on the computer without an operating
  system.
Types of Operating Systems

 Different types of operating systems are
• Real time
• Multi user
• Multi-tasking vs -Single-tasking
• Distributed
• Embedded
Real-time Operating System

• A Real-time operating system is a
  multitasking operating system intended for
  applications with fixed deadlines.
• Applications     include    some     small
  embedded systems, automobiles engine
  controllers, industrial robots, spacecraft,
  industrial control, and some large-scale
  computing devices.
      Most widely deployed   Real-time
    operating system are
•   Linux
•   OSE
•   QNX
•   RTLinux
•   VxWorks
•   Windows CE
Categories Of Real-time Systems

 There are two flavors of real-time
  systems.
• Hard Real-time System
• Soft Real-time system.
• Hard real-time system is hardware or
  software that must operate within the
  confines of a stringent deadline.
• The application may be considered to
  have failed if it does not completes its
  function within the allotted time span.
• Hard real time systems include aircraft
  control systems.
• In soft real-time systems, meeting the
  deadline is important but missing the
  deadline will not lead to a catastrophe.
Overview of Unix/Linux
• Unix stands for UNiplexed Information and
  Computing 
• Unix was developed by Ken Thomson and
  Dennis Ritchie beginning 1969.It became
  the popular operating system in the
  academic community during 1970’s.
• It was commercialized in and since then
  ,its use in both academic and commercial
  world has grown tremendously.
• Unix operating systems are widely used in
  servers, workstation, and mobile devices.
• Unix was designed to be portable, multi-
  tasking        and multi-user in   a time-
  sharing configuration.
• Unix operating systems are not open
  source operrting systems.
The main attractions of Unix are:
• Most of the operating system was
  developed in a high level languages. This
  was revolutionary during those days
  because before advent of UNIX ,operating
  system were developed in assembly
  languages.
• The main attraction of Unix is that provide
  a large number of utilities for software
  debuggers, source code control systems.
Unix has some popular myths:
• It is a complicated operating system.
• Too many options for each command.
• Too many commands and utilities.
• Unix was not free and open source it is
 commercial operating system.
• In April 1991, Linus Torvards, a 21-year-
  old student at the University of Helsinki,
  Finland started working on some simple
  ideas for an operating system.
• Linux is a Unix-like computer operating
  system assembled under the model of free
  and open source software development
  and distribution.
• Linux is the kernel of the operating
  system.
• Linux was originally developed as a free
  operating system for Intel x86-based
  personnel computers.
• Linux since has been ported to more
  computed hardware platforms than any
  other operating systems.
• Linux also run on embedded systems.
  Such as mobile phones, network routers,
  televisions.
Features of Linux
• Linux is a multi-user operating system.
  Every user is given a username or login
  name.
• The heading system is organized
  hierarchically. At the topmost level is the
  root directory denoted by / under which
  there will be sub-directories. Under each
  subdirectory there can be directories or
  files.
Important directories are
• /bin contains commonly used commands
• /usr/bin contains less commonly used
  commands
• /etc contains the system administration
  commands
• /dev contains device files
• /usr /spool/mail contains mail files.
A variety of user interfaces are available.
• The command user interfaces are shell, k-
  shell, and C shell. X-windows provide the
  graphical user interface.
• To provide security for user’s files, a user
  will have a password.
• Every file is given protections read, write
  and execute permissions are given to the
  owner, group and others.
KERNEL:
• Kernel manages the tasks to achieve the
  desired performance of the system .
• To manage the tasks, the important
  requirements are to schedule the tasks
  and to provide inter-task communication
  facilities
• to achieve these two requirements, kernel
  objects are defined such as
•   Tasks
•   Mutexes
•   ISR’s
•   Events
•   Message boxes
•   Mailboxes
•   Pipes and timers
•   Kernel provide the memory management
    service, time management services,
    interrupt handling services and device
    management services.
LINUX KERNEL
     Users            Users             Users          Users
   processors       processors        processors     processors




   System libraries

   Device drivers
                                        Unix/Linux kernel




                           hardware
RTLINUX
• RTLinux is a hard real-time RTOS
  microkernel that runs the entire Linux
  operating system as a fully preemptive
  process.
• It was developed by Victor Yodaiken,
  Michael Barabanov and others at the New
  Mexico Institute of Mining and Technology
  and then as a commercial product at
  FSMLabs.
• FSMLabs has two editions of RTLinux.
• RTLinux pro and RTLinux free. RTLinux
  pro is the priced edition and RTLinux is
  the open source release.
• RTLinux support hard real time
  applications, the Linux kernel has been
  modified by adding a layer of software
  between the hardware and the Linux
  kernel. This additional layer is called
  “virtual machine”.
• A foot print of 4MB is required RTLinux.
• The new layer, RTLinux layer has a
  separate task scheduler. This task
  scheduler assigns lowest priority to the
  standard Linux kernel. Any task that has
  to met real-time constraints will run under
  RTLinux.
• Interrupts from Linux are disabled to
  achieve real-time performance.
RTLINUX KERNEL
     Users
                  Users          Users         Users
   processors
                processors     processors    processors




    System libraries
                                   RTlinux kernel
   Device drivers
                                    Unix/Linux kernel




                    hardware
DIFFERENCESS BETWEENTHE
LINUX AND RTLINUX:
Linux
                      RTLinux
• Linux is not a hard
  real time system.   • RTLinux supports
                      hard       real-time
• The tasks, which applications.
  do not have any
  time constraints. • Any task that has
                      real-time
                      constraints will run
                      under RTLinux.
In RTLinux location of the various files
    are:
•   RTLinux will be installed in the directory
    /usr/rtlinux-xxx, where xxx is the version
    name.
•   /usr/rtlinux/include contains all the include
    files necessary for development project.
•   /usr/doc/rtlinux/man contains the manual
    pages for the RTLinux.
•   /usr/rtlinux/modules contains the core
    RTLinux modules
The two important aspects while doing
  programming in RTLinux are:
• By default, the RTLinux tasks do not have
  access to the computer’s floating points
  unit. Hence need to explicitly set the
  permissions for every RTLinux task.
• Cannot pass arguments from the
  command prompt.
RTLINUX MODULES
• RTLinux programs are not created as
  stand-alone units, they are created as
  modules, which are loaded into the Linux
  kernel space.
• The C source files are compiled into
  objects files using the gcc command with
  the argument –c flag. In the C file, the
  main() function gets replaced with the
  fallowing lines:
• Int init_module();
• Void cleanup_module();
• Init_module is called when the module is
  first loaded into the kernel.
• This function returns 0 if the module is
  successfully loaded. It returns a negative
  value in case of failure. When the module
  is loaded is to be unloaded , the
  cleanup_module() is called.
EXECUTING THE RTLINUX
MODULES
• In RTLinux load and stop user modules
    using the RTLinux command. Using this
    command        we    can  obtain   status
    information about RTLinux modules.
•   The command syntax is:
•   $rtlinux start my_program
•   $rtlinux stop my_program
•   $rtlinux status my_program
CREATING RTLINUX POSIX
THREADS
• A real-time program generally consists of
  a number of threads.
• Each thread share a common address
  space .
• Pthread_create() function is used to create
  a new real-time thread.
    The corresponding header file is
    #include <pthread.h>
• To achieve real-time performance. The
  various POSIX compliant API function
  calls are used. These function calls are
  related to create and cancel
  semaphores.
• To implement mutex, we have to include
  the header file <rtl_mutex.h> in the C
  program.
• To cancel a thread, the system call is
  pthread_cancel.
TIMER MANAGEMENT

• A number of internal clocks are available
  in RTLinux to manage the timers.
• To obtain the current clock reading using
  command is:
  clock-set time() function
    clock_id gives the identification of the
  clock to be read.
RT linux

Mais conteúdo relacionado

Mais procurados

Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanismVijay Kumar
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos conceptsanishgoel
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmwareJoel P
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating Systemvivek223
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificMoe Moe Myint
 
Real time operating system
Real time operating systemReal time operating system
Real time operating systemKamran Khan
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's modelv Kalairajan
 
Embedded os
Embedded osEmbedded os
Embedded oschian417
 
Basics of embedded system design
Basics of embedded system designBasics of embedded system design
Basics of embedded system designK Senthil Kumar
 
Real Time Kernels
Real Time KernelsReal Time Kernels
Real Time KernelsArnav Soni
 
Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture amrutachintawar239
 
Hardware Software Codesign
Hardware Software CodesignHardware Software Codesign
Hardware Software Codesigndestruck
 

Mais procurados (20)

Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanism
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmware
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
TinyOS
TinyOSTinyOS
TinyOS
 
Code generation
Code generationCode generation
Code generation
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain Specific
 
Real time operating system
Real time operating systemReal time operating system
Real time operating system
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's model
 
Embedded os
Embedded osEmbedded os
Embedded os
 
Basics of embedded system design
Basics of embedded system designBasics of embedded system design
Basics of embedded system design
 
Embedded c
Embedded cEmbedded c
Embedded c
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
Real Time Kernels
Real Time KernelsReal Time Kernels
Real Time Kernels
 
Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Hardware Software Codesign
Hardware Software CodesignHardware Software Codesign
Hardware Software Codesign
 

Destaque

UNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsUNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsDr.YNM
 
Memory management in vx works
Memory management in vx worksMemory management in vx works
Memory management in vx worksDhan V Sagar
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating SystemDr. Pankaj Zope
 
RTOS MICRO CONTROLLER OPERATING SYSTEM-2
RTOS MICRO CONTROLLER OPERATING SYSTEM-2RTOS MICRO CONTROLLER OPERATING SYSTEM-2
RTOS MICRO CONTROLLER OPERATING SYSTEM-2JOLLUSUDARSHANREDDY
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systemscoolmirza143
 
Real Time Operating System Concepts
Real Time Operating System ConceptsReal Time Operating System Concepts
Real Time Operating System ConceptsSanjiv Malik
 
Unit 1 embedded systems and applications
Unit 1 embedded systems and applicationsUnit 1 embedded systems and applications
Unit 1 embedded systems and applicationsDr.YNM
 
Introduction to microprocessors notes
Introduction to microprocessors notesIntroduction to microprocessors notes
Introduction to microprocessors notesSARITHA REDDY
 
Formation linux temps réel - Rennes 14 octobre 2014
Formation linux temps réel  - Rennes 14 octobre 2014Formation linux temps réel  - Rennes 14 octobre 2014
Formation linux temps réel - Rennes 14 octobre 2014eurogicielgroup
 
Solutions temps réel sous linux
Solutions temps réel sous linuxSolutions temps réel sous linux
Solutions temps réel sous linuxembedded-linux-bdx
 
Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Chirag Jog
 

Destaque (20)

Rtlinux
RtlinuxRtlinux
Rtlinux
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 
UNIT-I-RTOS and Concepts
UNIT-I-RTOS and ConceptsUNIT-I-RTOS and Concepts
UNIT-I-RTOS and Concepts
 
Rtos slides
Rtos slidesRtos slides
Rtos slides
 
Memory management in vx works
Memory management in vx worksMemory management in vx works
Memory management in vx works
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
 
Rtos
RtosRtos
Rtos
 
Os2
Os2Os2
Os2
 
RTOS MICRO CONTROLLER OPERATING SYSTEM-2
RTOS MICRO CONTROLLER OPERATING SYSTEM-2RTOS MICRO CONTROLLER OPERATING SYSTEM-2
RTOS MICRO CONTROLLER OPERATING SYSTEM-2
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems
 
Real Time Operating System Concepts
Real Time Operating System ConceptsReal Time Operating System Concepts
Real Time Operating System Concepts
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Unit 1 embedded systems and applications
Unit 1 embedded systems and applicationsUnit 1 embedded systems and applications
Unit 1 embedded systems and applications
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
RTOS Basic Concepts
RTOS Basic ConceptsRTOS Basic Concepts
RTOS Basic Concepts
 
Introduction to microprocessors notes
Introduction to microprocessors notesIntroduction to microprocessors notes
Introduction to microprocessors notes
 
Formation linux temps réel - Rennes 14 octobre 2014
Formation linux temps réel  - Rennes 14 octobre 2014Formation linux temps réel  - Rennes 14 octobre 2014
Formation linux temps réel - Rennes 14 octobre 2014
 
Solutions temps réel sous linux
Solutions temps réel sous linuxSolutions temps réel sous linux
Solutions temps réel sous linux
 
Rtai
RtaiRtai
Rtai
 
Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how
 

Semelhante a RT linux

Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systemsVandana Salve
 
Linux Operating System. UOG MARGHAZAR Campus
 Linux Operating System. UOG MARGHAZAR Campus Linux Operating System. UOG MARGHAZAR Campus
Linux Operating System. UOG MARGHAZAR CampusSYEDASADALI38
 
Raspberry Pi - Lecture 1 Introduction
Raspberry Pi - Lecture 1 IntroductionRaspberry Pi - Lecture 1 Introduction
Raspberry Pi - Lecture 1 IntroductionMohamed Abdallah
 
Linux [2005]
Linux [2005]Linux [2005]
Linux [2005]Raul Soto
 
Unix operating system
Unix operating systemUnix operating system
Unix operating systemABhay Panchal
 
operating system ondesktop computer ( laptop)
operating system ondesktop  computer ( laptop)operating system ondesktop  computer ( laptop)
operating system ondesktop computer ( laptop)BandaruGowtham1
 
Docker Online Meetup #31: Unikernels
Docker Online Meetup #31: UnikernelsDocker Online Meetup #31: Unikernels
Docker Online Meetup #31: UnikernelsDocker, Inc.
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfIxtiyorTeshaboyev
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Ahmed El-Arabawy
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionSherif Mousa
 
How I Learned to Stop Worrying and Love the Linux
How I Learned to Stop Worrying and Love the LinuxHow I Learned to Stop Worrying and Love the Linux
How I Learned to Stop Worrying and Love the LinuxHelen Tabunshchyk
 
Embedded Linux Evolution | Turing Techtalk
Embedded Linux Evolution | Turing TechtalkEmbedded Linux Evolution | Turing Techtalk
Embedded Linux Evolution | Turing TechtalkPersistent Systems Ltd.
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdfxiso
 

Semelhante a RT linux (20)

Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
 
The Linux System
The Linux SystemThe Linux System
The Linux System
 
Linux Operating System. UOG MARGHAZAR Campus
 Linux Operating System. UOG MARGHAZAR Campus Linux Operating System. UOG MARGHAZAR Campus
Linux Operating System. UOG MARGHAZAR Campus
 
Linux
LinuxLinux
Linux
 
Raspberry Pi - Lecture 1 Introduction
Raspberry Pi - Lecture 1 IntroductionRaspberry Pi - Lecture 1 Introduction
Raspberry Pi - Lecture 1 Introduction
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 
Linux [2005]
Linux [2005]Linux [2005]
Linux [2005]
 
운영체제론 Ch21
운영체제론 Ch21운영체제론 Ch21
운영체제론 Ch21
 
Unix operating system
Unix operating systemUnix operating system
Unix operating system
 
operating system ondesktop computer ( laptop)
operating system ondesktop  computer ( laptop)operating system ondesktop  computer ( laptop)
operating system ondesktop computer ( laptop)
 
Docker Online Meetup #31: Unikernels
Docker Online Meetup #31: UnikernelsDocker Online Meetup #31: Unikernels
Docker Online Meetup #31: Unikernels
 
Os file
Os fileOs file
Os file
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems Introduction
 
Licão 01 introduction
Licão 01 introductionLicão 01 introduction
Licão 01 introduction
 
How I Learned to Stop Worrying and Love the Linux
How I Learned to Stop Worrying and Love the LinuxHow I Learned to Stop Worrying and Love the Linux
How I Learned to Stop Worrying and Love the Linux
 
Unix Operaring System
Unix Operaring SystemUnix Operaring System
Unix Operaring System
 
Embedded Linux Evolution | Turing Techtalk
Embedded Linux Evolution | Turing TechtalkEmbedded Linux Evolution | Turing Techtalk
Embedded Linux Evolution | Turing Techtalk
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdf
 

Mais de SARITHA REDDY

Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers finalSARITHA REDDY
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directivesSARITHA REDDY
 
Unit ii microcontrollers final
Unit ii microcontrollers finalUnit ii microcontrollers final
Unit ii microcontrollers finalSARITHA REDDY
 
Introduction to microprocessor notes
Introduction to microprocessor notesIntroduction to microprocessor notes
Introduction to microprocessor notesSARITHA REDDY
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directivesSARITHA REDDY
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequencySARITHA REDDY
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051SARITHA REDDY
 
I o ports and timers of 8051
I o ports and timers of 8051I o ports and timers of 8051
I o ports and timers of 8051SARITHA REDDY
 
Mos and cmos technology
Mos and cmos technologyMos and cmos technology
Mos and cmos technologySARITHA REDDY
 
Clampers and clippers
Clampers and clippersClampers and clippers
Clampers and clippersSARITHA REDDY
 
Electro Magnetic Wave Propagation
Electro Magnetic Wave PropagationElectro Magnetic Wave Propagation
Electro Magnetic Wave PropagationSARITHA REDDY
 
Satellite communications
Satellite communicationsSatellite communications
Satellite communicationsSARITHA REDDY
 
Electronics in daily life
Electronics in daily lifeElectronics in daily life
Electronics in daily lifeSARITHA REDDY
 
BSc I year practicals
BSc I year practicalsBSc I year practicals
BSc I year practicalsSARITHA REDDY
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsSARITHA REDDY
 
Applications of op amps
Applications of op ampsApplications of op amps
Applications of op ampsSARITHA REDDY
 
Digital logic gates and Boolean algebra
Digital logic gates and Boolean algebraDigital logic gates and Boolean algebra
Digital logic gates and Boolean algebraSARITHA REDDY
 

Mais de SARITHA REDDY (20)

Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers final
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directives
 
Unit ii microcontrollers final
Unit ii microcontrollers finalUnit ii microcontrollers final
Unit ii microcontrollers final
 
Introduction to microprocessor notes
Introduction to microprocessor notesIntroduction to microprocessor notes
Introduction to microprocessor notes
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directives
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequency
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
I o ports and timers of 8051
I o ports and timers of 8051I o ports and timers of 8051
I o ports and timers of 8051
 
Mos and cmos technology
Mos and cmos technologyMos and cmos technology
Mos and cmos technology
 
Logic families
Logic familiesLogic families
Logic families
 
Clampers and clippers
Clampers and clippersClampers and clippers
Clampers and clippers
 
Linked lists
Linked listsLinked lists
Linked lists
 
Arrays
ArraysArrays
Arrays
 
Electro Magnetic Wave Propagation
Electro Magnetic Wave PropagationElectro Magnetic Wave Propagation
Electro Magnetic Wave Propagation
 
Satellite communications
Satellite communicationsSatellite communications
Satellite communications
 
Electronics in daily life
Electronics in daily lifeElectronics in daily life
Electronics in daily life
 
BSc I year practicals
BSc I year practicalsBSc I year practicals
BSc I year practicals
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Applications of op amps
Applications of op ampsApplications of op amps
Applications of op amps
 
Digital logic gates and Boolean algebra
Digital logic gates and Boolean algebraDigital logic gates and Boolean algebra
Digital logic gates and Boolean algebra
 

RT linux

  • 1. OVERVIEW OF RTLINUX & FEATURES Dr. C. SARITHA Lecturer in Electronics SSBN Degree & PG College Anantapur
  • 2. OVERVIEW • What is operating system? • Real time operating system • Overview of Unix/Linux • Features of Linux • RTLinux
  • 3. What is an operating system? • An operating system is a set of programs that manage computer hardware resources and provide common services for application software. • The operating system is the most important type of system software in a computer system. • A user cannot run an application program on the computer without an operating system.
  • 4. Types of Operating Systems  Different types of operating systems are • Real time • Multi user • Multi-tasking vs -Single-tasking • Distributed • Embedded
  • 5. Real-time Operating System • A Real-time operating system is a multitasking operating system intended for applications with fixed deadlines. • Applications include some small embedded systems, automobiles engine controllers, industrial robots, spacecraft, industrial control, and some large-scale computing devices.
  • 6. Most widely deployed Real-time operating system are • Linux • OSE • QNX • RTLinux • VxWorks • Windows CE
  • 7. Categories Of Real-time Systems  There are two flavors of real-time systems. • Hard Real-time System • Soft Real-time system.
  • 8. • Hard real-time system is hardware or software that must operate within the confines of a stringent deadline. • The application may be considered to have failed if it does not completes its function within the allotted time span. • Hard real time systems include aircraft control systems. • In soft real-time systems, meeting the deadline is important but missing the deadline will not lead to a catastrophe.
  • 9. Overview of Unix/Linux • Unix stands for UNiplexed Information and Computing  • Unix was developed by Ken Thomson and Dennis Ritchie beginning 1969.It became the popular operating system in the academic community during 1970’s. • It was commercialized in and since then ,its use in both academic and commercial world has grown tremendously.
  • 10. • Unix operating systems are widely used in servers, workstation, and mobile devices. • Unix was designed to be portable, multi- tasking and multi-user in a time- sharing configuration. • Unix operating systems are not open source operrting systems.
  • 11. The main attractions of Unix are: • Most of the operating system was developed in a high level languages. This was revolutionary during those days because before advent of UNIX ,operating system were developed in assembly languages. • The main attraction of Unix is that provide a large number of utilities for software debuggers, source code control systems.
  • 12. Unix has some popular myths: • It is a complicated operating system. • Too many options for each command. • Too many commands and utilities. • Unix was not free and open source it is commercial operating system.
  • 13. • In April 1991, Linus Torvards, a 21-year- old student at the University of Helsinki, Finland started working on some simple ideas for an operating system. • Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. • Linux is the kernel of the operating system.
  • 14. • Linux was originally developed as a free operating system for Intel x86-based personnel computers. • Linux since has been ported to more computed hardware platforms than any other operating systems. • Linux also run on embedded systems. Such as mobile phones, network routers, televisions.
  • 15. Features of Linux • Linux is a multi-user operating system. Every user is given a username or login name. • The heading system is organized hierarchically. At the topmost level is the root directory denoted by / under which there will be sub-directories. Under each subdirectory there can be directories or files.
  • 16. Important directories are • /bin contains commonly used commands • /usr/bin contains less commonly used commands • /etc contains the system administration commands • /dev contains device files • /usr /spool/mail contains mail files.
  • 17. A variety of user interfaces are available. • The command user interfaces are shell, k- shell, and C shell. X-windows provide the graphical user interface. • To provide security for user’s files, a user will have a password. • Every file is given protections read, write and execute permissions are given to the owner, group and others.
  • 18. KERNEL: • Kernel manages the tasks to achieve the desired performance of the system . • To manage the tasks, the important requirements are to schedule the tasks and to provide inter-task communication facilities • to achieve these two requirements, kernel objects are defined such as
  • 19. Tasks • Mutexes • ISR’s • Events • Message boxes • Mailboxes • Pipes and timers • Kernel provide the memory management service, time management services, interrupt handling services and device management services.
  • 20. LINUX KERNEL Users Users Users Users processors processors processors processors System libraries Device drivers Unix/Linux kernel hardware
  • 21. RTLINUX • RTLinux is a hard real-time RTOS microkernel that runs the entire Linux operating system as a fully preemptive process. • It was developed by Victor Yodaiken, Michael Barabanov and others at the New Mexico Institute of Mining and Technology and then as a commercial product at FSMLabs. • FSMLabs has two editions of RTLinux.
  • 22. • RTLinux pro and RTLinux free. RTLinux pro is the priced edition and RTLinux is the open source release. • RTLinux support hard real time applications, the Linux kernel has been modified by adding a layer of software between the hardware and the Linux kernel. This additional layer is called “virtual machine”. • A foot print of 4MB is required RTLinux.
  • 23. • The new layer, RTLinux layer has a separate task scheduler. This task scheduler assigns lowest priority to the standard Linux kernel. Any task that has to met real-time constraints will run under RTLinux. • Interrupts from Linux are disabled to achieve real-time performance.
  • 24. RTLINUX KERNEL Users Users Users Users processors processors processors processors System libraries RTlinux kernel Device drivers Unix/Linux kernel hardware
  • 25. DIFFERENCESS BETWEENTHE LINUX AND RTLINUX: Linux RTLinux • Linux is not a hard real time system. • RTLinux supports hard real-time • The tasks, which applications. do not have any time constraints. • Any task that has real-time constraints will run under RTLinux.
  • 26. In RTLinux location of the various files are: • RTLinux will be installed in the directory /usr/rtlinux-xxx, where xxx is the version name. • /usr/rtlinux/include contains all the include files necessary for development project. • /usr/doc/rtlinux/man contains the manual pages for the RTLinux. • /usr/rtlinux/modules contains the core RTLinux modules
  • 27. The two important aspects while doing programming in RTLinux are: • By default, the RTLinux tasks do not have access to the computer’s floating points unit. Hence need to explicitly set the permissions for every RTLinux task. • Cannot pass arguments from the command prompt.
  • 28. RTLINUX MODULES • RTLinux programs are not created as stand-alone units, they are created as modules, which are loaded into the Linux kernel space. • The C source files are compiled into objects files using the gcc command with the argument –c flag. In the C file, the main() function gets replaced with the fallowing lines:
  • 29. • Int init_module(); • Void cleanup_module(); • Init_module is called when the module is first loaded into the kernel. • This function returns 0 if the module is successfully loaded. It returns a negative value in case of failure. When the module is loaded is to be unloaded , the cleanup_module() is called.
  • 30. EXECUTING THE RTLINUX MODULES • In RTLinux load and stop user modules using the RTLinux command. Using this command we can obtain status information about RTLinux modules. • The command syntax is: • $rtlinux start my_program • $rtlinux stop my_program • $rtlinux status my_program
  • 31. CREATING RTLINUX POSIX THREADS • A real-time program generally consists of a number of threads. • Each thread share a common address space . • Pthread_create() function is used to create a new real-time thread. The corresponding header file is #include <pthread.h>
  • 32. • To achieve real-time performance. The various POSIX compliant API function calls are used. These function calls are related to create and cancel semaphores. • To implement mutex, we have to include the header file <rtl_mutex.h> in the C program. • To cancel a thread, the system call is pthread_cancel.
  • 33. TIMER MANAGEMENT • A number of internal clocks are available in RTLinux to manage the timers. • To obtain the current clock reading using command is: clock-set time() function clock_id gives the identification of the clock to be read.