Sie sind auf Seite 1von 12

REAL TIME OPERATING SYSTEMS

WHAT IS A REAL TIME OS (RTOS)?


In general, an operating system (OS) is responsible for managing the hardware resources of a computer and hosting applications that run on the computer. An RTOS performs these tasks, but is also specially designed to run applications with very precise timing and a high degree of reliability. This can be especially important in measurement and automation systems where downtime is costly or a program delay could cause a safety hazard. To be considered "real-time", an operating system must have a known maximum time for each of the operations that it performs (or at least be able to guarantee that maximum most of the time). Some of these operations include OS calls and interrupt handling. Operating systems that can absolutely guarantee a maximum time for these operations are referred to as "hard real-time", while operating systems that can only guarantee a maximum most of the time are referred to as "soft real-time".

NEED FOR RTOS:


Applications with multiple threads Modular design organizes functionality Schedules processing to handle workload Priority-based preemption Message-passing

Applications with external events Interrupt response, resumption management Enables rapid response to external events

Applications with network communications Handles thread-thread communications Handles Internet communications

FEARTURES OF RTOS:
The main features of RTOS are, i. ii. iii. iv. v. vi. Real time responsiveness Royalty free pricing Source code availability Tools integration Microprocessor coverage The necessary signaling functions between interrupt routines and task codes are handled by RTOS. vii. It works as an independent system with no internal or external interdependencies. viii. ix. There are no loop decisions in RTOS The RTOS can suspend one task code subroutine in the middle order to run another x. The time lag is very less compared to other systems

xi.

There are no random time variables; this is good for a direct relationship between instruction and process.

xii. xiii.

Tasks are simpler to write. Under most RTOS tasks are simply subroutines

FUNCTIONS OF RTOS:
Basic OS functions Process priorities management: priority allocation Process management: preemption Priority inheritance Process predictability Memory management: protection Memory allocation Scheduling and interrupt latency control functions Timer functions and time management Asynchronous IO functions IPC synchronization functions Spin locks Time slicing Hard and soft real time operability

BENEFITS DUE TO THE PRESENCE OF RTOS:


An embedded system with a single CPU can run only one process at an instance. The process at any instance may either be an ISR, kernel function or task. An RTOS use in the embedded system facilitates the following.

An RTOS provides running the threads in kernel space so that they execute fast An RTOS provides effective handling of the IRSs, device drivers, ISTs, tasks or threads and the enabling and disabling of interrupts in the user mode critical section codes An RTOS provides memory allocation and de-allocation functions in fixed time and blocks of memory and restricting the memory access only for the stack and critical memory blocks An RTOS provides for effectively scheduling and running and blocking of the tasks in cases of many tasks I/O management with devices, files, mailboxes, pipes and sockets becomes simple using an RTOS Effective management of the multiple states of the CPU and internal and external physical or virtual devices.

CASE STUDY OF DIGITAL CAMERA HARDWARE AND SOFTWARE ARCHITECTURE:


Digital cameras may have 4 to 6 M pixel still images, clear visual display (ClearVid) CMOS sensor, 7cm wide LCD photo display screen, enhanced imaging processor, double anti blur solution and high-speed processing engine, 10X optical and 20X digital zooms and can also record high definition videoclips. It therefore has speaker microphone(s) for high quality recorded sound. It has an audio/video out port connecting to a TV/DVD player or computer.

REQUIREMENTS OF A DIGITAL CAMERA:


PURPOSE: Digital recording and display of pictures Processing to get the pictures of required brightness, contrast and color Permanent saving of a picture in a file in a standard format at a flash memory stick Transfer files to a computer through a port INPUTS: Intensity and color values for each picture in horizontal and vertical rows of pixels in a picture frame Intensity and color values for unexposed (dark) areas in each horizontal row pixels for offset correction in the row User control inputs OUTPUTS: Encoded files for a picture Permanent store of the picture at a file on a flash-memory stick Screen display of picture from the file after decoding File output to an interfaced computer FUNCTIONS OF THE SYSTEM: A color LCD dot matrix displays the picture before shooting. This enables manual adjustment of the view of the picture. For shooting, a shutter button is pressed. Then a charge-coupled device (CCD) array placed at the focus generates a byte stream in the output after operations by ADC on analog output of each CCD cell.

A file creates after encoding and pixel co-processing as follows: the byte stream is preprocessed and then encoded in a standard format using a CODEC. The encoded picture file can be saved for permanent record. A memory stick saves the file The file is used for display of recorded picture using a display processor and can be copied or transferred to a memory stick and to a computer connected through a USB port. The LCD displays a picture file after it is decoded using the CODEC. Texts such as picture title, shooting date and time, and serial number are also displayed A USB port is used for transferring and storing pictures on a computer Alternatively, Bluetooth or IR port can be used for interfacing the computer DESIGN METRICES: Power dissipation: battery operation. Battery recharging after 400 pictures Resolution: high-resolution pictures with options of 2592x1944 pixels=5038848 pixels, 2592x1728=3.2M, 2048x1536=3M and 1280x960=1M Performance: shooting a 4M pixel still picture in .05s. 25 pictures per m Process deadlines: exposing camera process in a maximum of 0.1s. flash synchronous with shutter opening and closing. Picture display latency maximum of 0.5s

User interface: graphic at LCD or touch screen display on LCD and commands by the camera user through fingers on the touch screen, switches and buttons Engineering costs: US$ 50000 (assumed) Manufacturing costs: US$ 50 (assumed) TEST AND VALIDATION CONDITIONS: All user commands must function correctly All graphic displays and menus should appear as per the program Each task should be tested with test inputs Tested for 30 pictures per m

CLASS DIAGRAMS:
Digital camera file creation, display and transferring to printer, memory stick and USB port can be modeled by the class diagrams of abstract class Picture_FileCreation, Picture_FileDisplay, Picture_FileTransfer.

Three class diagrams of picture_fileCreation, picture_FileDisplay, Picture_filetranfer

DIGITAL CAMERA HARDWARE ARCHITECTURE:


Microcontroller or ASIP (Application Specific Instruction Set Processor) Multiple processors ( CCDSP, DSP, pixel processor and others) RAM for storing temporary variables and stacks ROM for application codes and RTOS codes for scheduling the tasks Timer, flash memory for storing user preferences, contact data, user date of birth, user identification code, ADC, DAC, Interrupt controller

The DAC gets the input from pixel processor which gets the input from JPEG file for the saved images and also gets the input directly from CCDSP through pixel processor or the frame in present view USB controller Direct Memory Access controller LCD controller Battery and external charging unit Digital camera hardware architecture

DIGITAL CAMERA SOFTWARE ARCHITECTURE:


CCD signal processing for off-set correction JPEG coding JPEG decoding Pixel processing before display Memory and file systems Light, flash and display device drivers

LCD, USB and Bluetooth port device-drivers for port operation for display, printer and computer communication control

There are the following layers in the digital camera software architecture: System layer Application layer Function layer Presentation layer Control layer Base layer

Das könnte Ihnen auch gefallen