What is OS

download What is OS

of 21

Transcript of What is OS

  • 7/27/2019 What is OS

    1/21

    Chapter 1

    Introduction to Operating System

    1.1 What is an operating system?

    An operating system is a special computer program that manages the relationship

    between application software, the wide variety of hardware that makes up a computer

    system, and the user of the system.

    1.2 Overview of operating system

    At first operating systems were designed to help applications interact with the

    computer hardware. While this is still the case, the importance of the operating system has

    grown to the point where (at least in the minds of many users) the operating system defines

    the machine.

    The operating system provides a layer of abstraction between the user and the bare

    machine. Users and applications do not see the hardware directly, but view it through the

    operating system. This abstraction can be used to hide certain hardware details from users

    and applications. Thus, changes in the hardware are not seen by the user (even though the OS

    must accommodate them).

    We can view an operating system as providing four basic interfaces:

    Interface to the underlying hardware

    Interface to application programs

    Interface to the user

    Interface to the system manager

    Each of these interfaces provides the appropriate view for different groups of individuals:

    Hardware developers who want their hardware to be supported by a particular operating

    system are primarily interested in the OS-hardware interface. Application programmers are

    Reference A

  • 7/27/2019 What is OS

    2/21

    primarily interested in the OS-application interface. Ordinary users are interested in the user

    interface. Many books that purport to be about a particular operating system in fact mainly

    discuss the user interface. System managers are obviously interested in the system

    management.

    Most operating systems in use today are composed of two distinct parts: the kernel

    and the system programs. The kernel is primarily responsible for the first two of the

    interfaces described above, and the system programs are primarily responsible for the last

    two. The lowest level of any operating system is its kernel, the first layer of software loaded

    into computer memory when it starts up. As the first software layer, all other software that

    gets loaded after it depends on this kernel to provide them with various common core

    services. These services include, but are not limited to: disk access, memory management,

    task scheduling, and access to other computer hardware devices. As well as the kernel, an

    operating system is often distributed with tools for programs to display and manage a

    graphical user interface, as well as utility programs for tasks such as managing files and

    configuring the operating system. They are also often distributed with application software

    that does not relate directly to the operating system's core function, but which the operating

    system distributor finds advantageous to supply with the operating system. The exact

    delineation between the operating system and application software is not precise, and is

    occasionally subject to controversy.

    Operating systems are used on many, but by no means all computer systems. The

    simplest computers, including the smallest embedded systems and many of the first

    computers did not have operating systems, and relied on the application programmer to

    manage the minimal hardware themselves, perhaps with the aid oflibraries developed for the

    purpose. Commercially-supplied operating systems are present on virtually all modern

    devices described as computers, frompersonal computers to mainframes, as well as mobile

    computers such as PDAs and high-endmobile phones.

    Reference A

    http://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Utility_programhttp://en.wikipedia.org/wiki/Utility_programhttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Software_libraryhttp://en.wikipedia.org/wiki/Personal_computerhttp://en.wikipedia.org/wiki/Mainframehttp://en.wikipedia.org/wiki/PDAhttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Utility_programhttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Software_libraryhttp://en.wikipedia.org/wiki/Personal_computerhttp://en.wikipedia.org/wiki/Mainframehttp://en.wikipedia.org/wiki/PDAhttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Graphical_user_interface
  • 7/27/2019 What is OS

    3/21

    1.2 Classification of operating system

    For large system it has great responsibilities and powers which make sure that

    different programs and users running at same time do not interface with each other. It is

    classified as follows

    1.2.1 Multi-user operating system: Allows two or more than two users to run

    programs at the same time.

    1.2.2 Multi-processing operating system: Supports running a program on more than

    one CPU.

    1.2.3 Multi-tasking operating system: Allows more than one program to run on a

    computer concurrently.

    1.2.4 Multi-threading operating system: Allows different part of a single program to

    run concurrently.

    1.2.5 Real time operating system: This responds to the input instantly.

    OS provide a software platform on top of which other program such as web browser,

    compilers, word processor, spreadsheats etc which are called application program can run.

    Generally operating systems are very large and complex, so it must be created piece

    by piece. It controls and coordinates the use of the hardware among the various application

    programs for the various users. In case of a single user, the operating system is designed to

    pay the attention of the performance and none paid the resource utilization i.e. how various

    hardware and software are s

    Reference A

  • 7/27/2019 What is OS

    4/21

    Chapter 2

    Real time operating system (RTOS)

    2.1 Definition of RTOS:

    A real time operating system is an operating system that guarantees certain capability

    within a specified time constraint.

    A real-time operating system (RTOS) is a class ofoperating system intended forreal-

    time applications. Examples include embedded applications (programmable thermostats,

    household appliance controllers, and mobile telephones), industrial robots, industrial control,

    and scientific research equipment. An RTOS facilitates the creation of a real-time system, but

    does not guarantee the finished product will be real-time; this requires correct development

    of the software. Nor does an RTOS necessarily have high throughput. Rather, they guarantee

    that system deadlines can be metgenerally with specialized scheduling algorithms and

    deterministic behavior. That is, an RTOS is valued more for how quickly and/or predictably

    it can respond to an event than for the speed of work. Key factors in an RTOS are therefore

    minimal interrupt and thread switching latency.

    For example, an operating system might be designed to ensure that a certain object was

    available for a robot on an assembly line.

    In what is usually called a "hard" real-time operating system, if the calculation could

    not be performed for making the object available at the designated time, the operating system

    would terminate with a failure. In a "soft" real-time operating system, the assembly line

    would continue to function but the production output might be lower as objects failed to

    appear at their designated time, causing the robot to be temporarily unproductive. Some real-time operating systems are created for a special application and others are more general

    purpose. Some existing general purpose operating systems claim to be real-time operating

    systems. Real-time operating systems are often required in small embedded operating

    systems that are packaged as part of micro devices. Some kernels can be considered to meet

    Reference A

    http://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Real-time_computinghttp://en.wikipedia.org/wiki/Real-time_computinghttp://en.wikipedia.org/wiki/Real-time_computinghttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Mobile_telephoneshttp://en.wikipedia.org/wiki/Robotshttp://searchopensource.techtarget.com/sDefinition/0,,sid39_gci212439,00.htmlhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Real-time_computinghttp://en.wikipedia.org/wiki/Real-time_computinghttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Mobile_telephoneshttp://en.wikipedia.org/wiki/Robotshttp://searchopensource.techtarget.com/sDefinition/0,,sid39_gci212439,00.html
  • 7/27/2019 What is OS

    5/21

    the requirements of a real-time operating system. However, since other components, such as

    device drivers, are also usually needed for a particular solution.

    Real-Time Operating Systems (RTOS) are a far cry from today's standard desktop

    operating systems. An RTOS needs to perform very few tasks, and it needs to perform them

    timely. Meeting the deadline is one of the most important properties of any RTOS. That is

    why the name Real Time operating system. Also, an RTOS needs to monitor its inputs on a

    consistent basis, and needs to respond to those inputs in a timely fashion. An RTOS

    therefore, needs to maintain strict control over the processes running, and the resources in use

    by the processes. An RTOS should not allow any one program to slow down the system,

    because the system must never be slow: it must monitor inputs at a certain rate, and it must

    provide outputs at a certain rate..

    2.2 What is an RTOS?

    An RTOS must respond timely to changes, but that does not necessarily mean that an

    RTOS can handle a large throughput of data. In fact in an RTOS, small response times are

    valued much higher then power, or data speed. Sometimes an RTOS will even need to drop

    data to ensure that it meets its strict deadlines. In essence, that provides us with a perfect

    definition: an RTOS is an operating system designed to meet strict deadlines. Beyond that

    definition, there are few requirements as to what an RTOS must be, or what features it must

    have. Some RTOS implementations are very powerful and very robust, while other

    implementations are very simple, and suited for only one particular purpose of time (as

    reference by some timing

    2.3 The Fundamentals

    To most people, embedded systems are not recognizable as computers. Instead, they

    are hidden inside everyday objects that surround us and help us in our lives. Embedded

    systems typically do not interface with the outside world through familiar personal computer

    interface devices such as a mouse, keyboard and graphic user interface. Instead, they

    interface with the outside world through unusual interfaces such as sensors, actuators and

    Reference A

    http://searchwin2000.techtarget.com/sDefinition/0,,sid1_gci211938,00.htmlhttp://searchwin2000.techtarget.com/sDefinition/0,,sid1_gci211938,00.html
  • 7/27/2019 What is OS

    6/21

    specialized communication links. Real-time and embedded systems operate in constrained

    environments in which computer memory and processing power are limited. They often need

    to provide their services within strict time deadlines to their users and to the surrounding

    world. It is these memory, speed and timing constraints that dictate the use of real-time

    operating systems in embedded software.

    2.4 Design philosophies of Real time operating system:

    There are two basic designs:

    An event-driven operating system only changes tasks when an event requires service.

    A time-sharing design switches tasks on a clock interrupt, as well as on events.

    The time-sharing design switches tasks more often than is strictly necessary, but gives

    "smoother", more deterministic multitasking, the illusion that a user has sole use of a

    machine. Early CPU designs required many cycles to switch tasks, during which the CPU

    could do nothing useful. So early OSes tried to minimize wasting CPU time by avoiding

    unnecessary task-switches as much as possible. More recent CPUs take far less time to

    switch from one task to another (the extreme case is barrel processorsthat switch from one

    task to the next in zero cycles). So more recent RTOSes are almost invariably time-sharingdesigns. Both systems can be tuned to have real time performance.

    2.5 Scheduling of tasks in RTOS

    In typical designs, a task has three states: running, ready and blocked. Most tasks are

    blocked, most of the time. Only one task per CPU is running. In simpler systems, the ready

    list is usually short, two or three tasks at most.

    Most RTOSs do their scheduling of tasks using a scheme called priority-based

    preemptive scheduling. Each task in a software application must be assigned a priority,

    with higher priority values representing the need for quicker responsiveness. Very quick

    responsiveness is made possible by the preemptive nature of the task scheduling.

    Preemptive means that the scheduler is allowed to stop any task at any point in its

    Reference A

    http://en.wikipedia.org/wiki/Computer_multitaskinghttp://en.wikipedia.org/wiki/CPU_designhttp://en.wikipedia.org/wiki/CPU_designhttp://en.wikipedia.org/wiki/Barrel_processorhttp://en.wikipedia.org/wiki/Barrel_processorhttp://en.wikipedia.org/wiki/Computer_multitaskinghttp://en.wikipedia.org/wiki/CPU_designhttp://en.wikipedia.org/wiki/Barrel_processor
  • 7/27/2019 What is OS

    7/21

    execution, if it determines that another task needs to run immediately. The basic rule

    that governs priority-based preemptive scheduling is that at every moment in time,

    The Highest Priority Task that is ready to run will be the Task that must be running.

    In other words, if both a low-priority task and a higher-priority task are ready to run,

    the scheduler will allow the higher-priority task to run first. The low-priority task will

    only get to run after the higher-priority task has finished with its current work. What if

    a low-priority task has already begun to run, and then a higher-priority task becomes

    ready? This might occur because of an external world trigger such as a switch closing.

    A priority-based preemptive scheduler will behave as follows: It will allow the low-

    priority task to complete the current assembly-language instruction that it is executing.

    It will then immediately stop the execution of the low-priority task, and allow the

    higher-priority task to run. After the higher-priority task has finished its current work,

    the low-priority task will be allowed to continue running

    2.6 Intertask communication and synchronization

    Most operating systems, including RTOSs, offer a variety of mechanisms for

    communication and synchronization between tasks. These mechanisms are necessary in a

    preemptive environment of many tasks, because without them the tasks might well

    communicate corrupted information or otherwise interfere with each other. For instance, a

    task might be preempted when it is in the middle of updating a table of data. If a second task

    that preempts it reads from that table, it will read a combination of some areas of newly-

    updated data plus some areas of data that have not yet been updated.

    Most RTOSs provide several mechanisms, with each mechanism optimized for

    reliably passing a different kind of information from task to task. Another kind ofcommunication between tasks in embedded systems is the passing of what might be called

    synchronization information from one task to another. Synchronization information is

    like a command, where some commands could be positive, and some negative. For example,

    a negative command to a task would be something like Please dont print right now, because

    my task is using the printer. Or more generally, I want to lock this for my own use only.

    A positive command would be something like Ive detected a cardiac emergency, and I

    Reference A

  • 7/27/2019 What is OS

    8/21

    want you to help me handle it. Or more generally, Please join me in handling .Most

    RTOSs offer a semaphore or mutex mechanism for handling negative synchronization

    (sometimes called mutual exclusion). These mechanisms allow tasks to lock certain

    embedded system resources for their use only, and subsequently to unlock the resource when

    theyre done. For positive synchronization, different RTOSs offer different mechanisms.

    Some RTOSs offer event-flags, while others offer signals. And yet others rely on message

    passing for positive synchronization as well as data passing duties.

    2.7 Dynamic memory allocation of RTOS:

    Many general-computing non-real-time operating systems offer memory allocation

    services from what is termed a Heap. The famous malloc and free services known to

    C-language programmers work from a heap. Tasks can temporarily borrow some memory

    from the operating systems heap by calling malloc, and specifying the size of memory

    buffer needed. When this task (or another task) is finished with this memory buffer it can

    return the buffer to the operating system by calling free. The operating system will then

    return the buffer to the heap, where its memory might be used again, perhaps as part of a

    larger buffer. . After a heap undergoes many cycles of mallocs and frees, small slivers

    of memory may appear between memory buffers that are being used by tasks. These slivers

    are so small that they are useless to tasks. But they are trapped between buffers that are

    being used by tasks, so they cant be coagulated (glued) together into bigger, useful buffer

    sizes. Over time, a heap will have more and more of these slivers. This will eventually

    result in situations where tasks will ask for memory buffers (malloc) of a certain size, and

    they will be refused by the operating system --- even though the operating system has enough

    available memory in its heap. The problem, that memory is scattered in small slivers are

    distributed in various separate parts of the heap. In operating system terminology, the slivers

    are called fragments, and this problem is called external memory fragmentation. This

    fragmentation problem can be solved by so-called garbage collection (defragmentation)

    software. Unfortunately, garbage collection algorithms are often wildly non-deterministic

    injecting randomly-appearing random-duration delays into heap services. These are often

    seen in the memory allocation services of general-computing non-real-time operating

    systems. This puts the embedded system developer who wants to use a general-computing

    Reference A

  • 7/27/2019 What is OS

    9/21

    non-real-time operating system into a quandary: Should the embedded system be allowed to

    suffer occasional randomly-appearing random-duration delays if / when "garbage collection"

    kicks in? ... Or, alternatively, should the embedded system be allowed to fragment its

    memory until application software "malloc" requests to the heap are refused even though a

    sufficient total amount of free memory is still available? Neither alternative is acceptable for

    embedded systems that need to provide service continually for long periods of time.

    Real-time operating systems, on the other hand, solve this quandary by altogether avoiding

    both memory fragmentation and garbage collection, and their consequences. RTOSs offer

    non-fragmenting memory allocation techniques instead of heaps. They do this by limiting

    the variety of memory chunk sizes they make available to application software. While this

    approach is less flexible than the approach taken by memory heaps, they do avoid external

    memory fragmentation and avoid the need for defragmentation.

    2.8 RTOS VS General purpose operating system:

    Many non-real-time operating systems also provide similar kernel services. The key

    difference between general-computing operating systems and real-time operating systems is

    the need for deterministic timing behavior in the real-time operating systems. Formally,

    deterministic timing means that operating system services consume only known and

    expected amounts of time. In theory, these service times could be expressed as

    mathematical formulas. These formulas must be strictly algebraic and not include any

    random timing components. Random elements in service times could cause random delays

    in application software and could then make the application randomly miss real-time

    deadlines. General-computing non-real-time operating systems are often quite non-

    deterministic. Their services can inject random delays into application software and thus

    cause slow responsiveness of an application at unexpected times. If you ask the developer of

    a non-real-time operating system for the algebraic formula describing the timing behavior ofone of its services (such as sending a message from task to task), you will invariably not get

    an algebraic formula. Instead the developer of the non-real-time operating system (such as

    Windows, UNIX, and Linux) will just give you a puzzled look. Deterministic timing

    behavior was simply not a design goal for these general-computing operating systems. On the

    other hand, real-time operating systems often go a step beyond basic determinism. For most

    Reference A

  • 7/27/2019 What is OS

    10/21

    kernel services, these operating systems offer constant load-independent timing: In other

    words, the algebraic formula is as simple as: T(message send) = constant, irrespective of the

    length of the message to be sent, or other factors such as the numbers of tasks and queues and

    messages being managed by the RTOS.

    2.9 Advantages of RTOS:

    1) Many RTOS kernels provide dynamic memory allocation services which allow the

    tasks to borrow chunks (a part of) RAM memory for temporary use in application

    software.

    2) RTOS kernels also provide a Device i/o supervisors category of services which

    provide a uniform framework for organizing and accessing many hardware device

    drivers (typically on embedded system).

    3) RTOS possesses small and known interrupt latency (time taken by an interrupt to take

    effect) and also call latency (time takes system call to complete).

    4) Many RTOS offer add on operating system component for such high level services as

    file system organization, database management, network management, network

    communication.

    2.10 Disadvantages of RTOS:

    1) Memory allocation is even more critical than other OS because in case of memory

    allocation speed is important and a standard memory allocation scheme scans a linked

    list of indeterminate length to find suitable memory block, but this is unacceptable as

    memory allocation has to occur in a fixed time.

    2) RTOS cannot handle large no. of data as it is time consuming to access large no. of

    data.

    3) Sometimes it becomes difficult to use RTOS as every task cant be done within a

    specified time.

    2.11 Examples of RTOS:

    Integrity, ITRON, QNX, RTX-windows, real time extension, OS-9, OSE, RSX-11,

    VRTX, RTOS-UH, RT-11, RTEMS, RT LINUX, Xenomia, RTAI, Phoenix-RTOS,

    FREE RTOS .Various companies also sell customized versions of LINUX with added

    Reference A

  • 7/27/2019 What is OS

    11/21

    real time functionality. Montavista submitted patches to the LINUX kernel mailing list to

    enhance LINUX as RTOS. An early example of a large-scale real-time operating system

    was the so-called "control program" developed by American Airlines and IBM for the

    Sabre Airline Reservations System. An example of RTOS is discussed below

    2.12 Integrity RTOS:

    INTEGRITY is a secure, royalty-free Real-Time Operating System intended for use

    in embedded systems that require maximum reliability. INTEGRITY represents the most

    advanced RTOS technology on the market today. Without the burden of compatibility with

    1980s vintage products, INTEGRITY was designed from the ground up employing the latest

    in RTOS technology and achieves unprecedented levels of reliability, availability, and

    serviceability for applications in telecommunications, defense, networking, medical

    equipment.

    INTEGRITY uses hardware memory protection to isolate and protect itself and user

    tasks from incorrect operation caused by accidental errors or malicious tampering. Its object-

    oriented design allows strict access control and verification of the security and integrity of

    data, communications, individual components, and the system as a whole. Its strict adherence

    to provable resource requirements allows an embedded system designer to guarantee resource

    availability. Unlike other memory protected operating systems, INTEGRITY does not

    sacrifice real-time performance for security and protection. It is first and foremost a true hard

    real-time operating system.

    INTEGRITY has been designed for speed and predictable real-time response. All

    kernel services have been carefully optimized to minimize the overhead of system calls.

    Complex system calls can be suspended to allow other tasks to execute. The scheduler is a

    true real-time scheduler, supporting multiple priority levels with guaranteed CPU percentage

    allocation.

    Reference A

    http://en.wikipedia.org/wiki/American_Airlineshttp://en.wikipedia.org/wiki/International_Business_Machineshttp://en.wikipedia.org/wiki/International_Business_Machineshttp://en.wikipedia.org/wiki/International_Business_Machineshttp://en.wikipedia.org/wiki/Sabre_Airline_Reservations_Systemhttp://en.wikipedia.org/wiki/American_Airlineshttp://en.wikipedia.org/wiki/International_Business_Machineshttp://en.wikipedia.org/wiki/Sabre_Airline_Reservations_System
  • 7/27/2019 What is OS

    12/21

    As like general real time operating system, it is also very fast in interrupt handling.

    To guarantee absolute minimum interrupt latency, the kernel never masks or blocks interrupt,

    even while manipulating critical data structures. The kernel also avoids instructions which

    have long latencies and which could temporarily block interrupts on some systems. Examples

    include division and certain string operations. With INTEGRITY, the highest priority

    interrupt is always serviced with absolute minimum latency. This results in latencies on the

    order of 140ns on a 233 MHz PowerPC. Similarly, context switches take at most 870ns,

    many times faster than most other RTOSes.

    Reference A

  • 7/27/2019 What is OS

    13/21

    Chapter 3

    Embedded system

    3.1 Definition of embedded system:

    A combination of computer hardware and software, and perhaps additional

    mechanical or other parts, designed to perform a dedicated function. A specialized computer

    system which is dedicated to do a specific task.

    3.2 Overview of embedded system:

    Typically an embedded system consists of a single-board microcomputer with software in

    ROM, which starts running a dedicated application as soon as power is turned on and does

    not stop until power is turned off. In some cases, embedded systems are part of a larger

    system or product, as in the case of an antilock braking system in a car. Contrast with

    general-purpose computer. Embedded systems range in size from a single processing board

    to systems with operating systems (ex, Linux, Windows NT Embedded). A computer

    system that is a component of a larger machine or system. Embedded systems can respond to

    events in real time. Most digital appliances, such as watches or cars use it. Hardware and

    software that forms a component of some larger system and is expected to function without

    human intervention. An embedded system is some combination of computer hardware and

    software, either fixed in capability or programmable, that is specifically designed for a

    particular kind of application device....An embedded system is a phrase that refers to a

    device that contains computer logic on a chip inside it. Such equipment is electrical or battery

    powered. The chip controls one or more functions of the equipment, such as remembering

    how long it has been since the device last received maintenance. An embedded system is a

    special-purpose computer system, which is completely encapsulated by the device it controls.

    An embedded system has specific requirements and performs pre-defined tasks, unlike a

    general-purpose personal computer. In general, an Embedded System:

    Reference A

  • 7/27/2019 What is OS

    14/21

    Is a system built to perform its duty, completely or partially independent of human

    intervention.

    Is specially designed to perform a few tasks in the most efficient way.

    Interacts with physical elements in our environment, viz. controlling and driving a

    motor, sensing temperature, etc.

    An embedded system can be defined as a control system or computer system designed to

    perform a specific task. For example the navigation system on an aircraft, an MP3 player, an

    intruder alarm system. An embedded system can also be defined as a single purpose

    computer. Most embedded systems are time critical applications meaning that the embedded

    system is working in an environment where timing is very important; the results of an

    operation are only relevant if they are obtained in a specific time frame. A time criticalembedded system could be an autopilot in an aircraft, if the autopilot detects that the plane

    for some reason is going into a stall then the autopilot should take steps to correct this within

    a few microseconds or there would be catastrophic results.

    From an implementation viewpoint, there is a major difference between a computer and

    an embedded system. Embedded systems are often required to provide Real-Time response.

    Examples of embedded systems are medical equipment and manufacturing equipment.

    Industrial machines, automobiles, medical equipment, cameras, household appliances,

    airplanes, vending machines, and toys (as well as the more obvious cellular phone and PDA)

    are among the myriad possible hosts of an embedded system.

    3.3 What is an Embedded Computer?

    An embedded computer is frequently a computer that is implemented for a particular

    purpose. In contrast, an average PC computer usually serves a number of purposes: checking

    email, surfing the internet, listening to music, word processing, etc... However, embedded

    systems usually only have a single task, or a very small number of related tasks that they are

    programmed to perform. It is not possible to say that embedded computers have certain types

    of hardware, or that they lack certain types of hardware. High-end embedded computers may

    contain Pentium 4 processors, keypads, and LCD displays. Other types of embedded

    Reference A

  • 7/27/2019 What is OS

    15/21

    computers however may not have a microprocessor at all, using instead an FPGA chip.

    FPGA chips are chips that can be programmed, but the programs are "burnt on to the chip",

    and not fed to the chip from an external memory source.

    Every home has several examples of embedded computers. Any appliance that has a

    digital clock, for instance, has a small embedded microcontroller that performs no other task

    then to display the clock. Modern cars have embedded computers onboard that control some

    of the fancy new features such as anti-lock breaks, and many now even control the timing in

    the engine, and the input from a number of different sensors.

    3.4 What are Some Downfalls of Embedded Computers?

    Embedded computers may be economical, but they are often prone to some very

    specific problems. A PC computer may ship with a glitch in the software, and once

    discovered, a software patch can often be shipped out to fix the problem. An embedded

    system, however, is frequently programmed once, and the software cannot be patched. Even

    if it is possible in an embedded system, but the process is frequently far too complicated for

    the user.

    Another problem with embedded computers is that they are often installed in systems

    for which unreliability is not an option. For instance, the computer controlling the brakes in

    your car cannot be allowed to fail under any condition. The targeting computer in a missile is

    not allowed to fail. Reliability must be guaranteed before the chip leaves the factory. This

    means that every embedded system needs to be tested and analyzed extensively.

    An embedded system will have very few resources when compared to full blown

    computing systems like a desktop computer, the memory capacity and processing power in

    an embedded system is limited. It is more challenging to develop an embedded system whencompared to developing an application for a desktop system as we are developing a program

    for a very constricted environment. Some embedded systems run a scaled down version of

    operating system called an RTOS (real time operating system).

    Reference A

  • 7/27/2019 What is OS

    16/21

    Chapter 4

    Real time system

    4.1 Definition of real time system

    The system which always provides responses (both periodic, time-initiated responses

    and input or interrupt driven responses) within a specified window of time is known as real

    time system. The time is determined by the time constant of the dynamic process. Example

    time constants for external processes are milliseconds for machining or electric power

    systems, seconds for flow processes, minutes for thermo chemical compositions and weeks

    for social/economic processes

    4.2 Overview of real time system:

    Real time refers to that work which occurs immediately. The term is used to describe

    a number of different computer features. For example, real-time operating systems are

    systems that respond to input immediately. They are used for such tasks as navigation, in

    which the computer must react to a steady flow of new information without interruption.

    Most general-purpose operating systems are not real-time because they can take a fewseconds, or even minutes, to react. Real time can also refer to events simulated by a computer

    at the same speed that they would occur in real life. In graphicsanimation, for example, a

    real-timeprogram would display objects moving across the screen at the same speed that

    they would actually move

    An operation within a larger dynamic system is called a real-time operation if the

    combined reaction- and operation-time of a task is shorter than the maximum delay that is

    allowed, in view of circumstances outside the operation. The task must also occur before the

    system to be controlled becomes unstable. A real-time operation is not necessarily fast, as

    slow systems can allow slow real-time operations. This applies for all types of dynamically

    changing systems. The polar opposite of a real-time operation is a batch job with interactive

    timesharing falling somewhere in-between the two extremes.

    Reference A

    http://www.webopedia.com/TERM/R/computer.htmlhttp://www.webopedia.com/TERM/R/operating_system.htmlhttp://www.webopedia.com/TERM/R/system.htmlhttp://www.webopedia.com/TERM/R/input.htmlhttp://www.webopedia.com/TERM/R/graphics.htmlhttp://www.webopedia.com/TERM/R/animation.htmlhttp://www.webopedia.com/TERM/R/program.htmlhttp://www.webopedia.com/TERM/R/object.htmlhttp://www.webopedia.com/TERM/R/display_screen.htmlhttp://en.wikipedia.org/wiki/Taskhttp://en.wikipedia.org/wiki/Taskhttp://en.wikipedia.org/w/index.php?title=Maximum_delay&action=edithttp://en.wikipedia.org/wiki/Batch_jobhttp://en.wikipedia.org/wiki/Time-sharinghttp://en.wikipedia.org/wiki/Time-sharinghttp://www.webopedia.com/TERM/R/computer.htmlhttp://www.webopedia.com/TERM/R/operating_system.htmlhttp://www.webopedia.com/TERM/R/system.htmlhttp://www.webopedia.com/TERM/R/input.htmlhttp://www.webopedia.com/TERM/R/graphics.htmlhttp://www.webopedia.com/TERM/R/animation.htmlhttp://www.webopedia.com/TERM/R/program.htmlhttp://www.webopedia.com/TERM/R/object.htmlhttp://www.webopedia.com/TERM/R/display_screen.htmlhttp://en.wikipedia.org/wiki/Taskhttp://en.wikipedia.org/w/index.php?title=Maximum_delay&action=edithttp://en.wikipedia.org/wiki/Batch_jobhttp://en.wikipedia.org/wiki/Time-sharinghttp://en.wikipedia.org/wiki/Time-sharing
  • 7/27/2019 What is OS

    17/21

    Alternately, a system is said to be hard real-time if the correctness of an operation

    depends not only upon the logical correctness of the operation but also upon the time at

    which it is performed. An operation performed after the deadline is, by definition, incorrect,

    and usually has no value. In a soft real-time system the value of an operation declines

    steadily after the deadline expires.

    A typical example could be a computer-controlled braking system in a car. If the

    drivercan stop a carbefore it hits a wall, the operation was in real-time; if the car hits the

    wall it was not. Many machines require real-time controllers to avoid "instability", which

    could lead to the accidental damage ordestruction of the system,people, orobjects.

    Some real-time systems do not have such a constraint on delay as long as input data

    can be processed rapidly enough so that no backlog occurs. In a real-time Digital signal

    processing (DSP) system, the analyzed (input) and/or generated (output) samples (whether

    they are grouped together in large segments or processed individually) can be processed (or

    generated) continuously in the time it takes to input and/or output the same set of samples

    independent of the processing delay. Consider an audio DSP example: if a process requires

    2.01 seconds to analyze or process 2.00 seconds of sound, it is not real-time. If it takes 1.99

    seconds, it is (or can be made into) a real-time DSP process.

    A common life example is that of standing in a queue (line of customers) waiting for

    the checkout in a grocery store. The queue is "real-time" if, on average, customers are being

    processed and their transactions completed as quickly as they arrive. Under these

    circumstances, a queue of customers may occasionally form, but the queue cannot grow

    without bound.

    If, on the other hand, customers are not processed as quickly as they arrive, then the

    queue of waiting customers will grow without limits. This system is not real-time and would

    definitely be deemed a failure.

    A burst of arrivals or some slow processing of the existing customers will cause the

    queue to fill. If the queue becomes sufficiently long, customers will be discouraged and leave

    without making a purchase. This system would also have to be deemed a failure, even though

    Reference A

    http://en.wikipedia.org/wiki/Brakehttp://en.wikipedia.org/wiki/Drivinghttp://en.wikipedia.org/wiki/Automobilehttp://en.wikipedia.org/wiki/Wallhttp://en.wikipedia.org/w/index.php?title=Real-time_controller&action=edithttp://en.wikipedia.org/wiki/Instabilityhttp://en.wikipedia.org/wiki/Damagehttp://en.wikipedia.org/wiki/Destructionhttp://en.wikipedia.org/wiki/Systemhttp://en.wikipedia.org/wiki/Personhttp://en.wikipedia.org/wiki/Objecthttp://en.wikipedia.org/wiki/Digital_signal_processinghttp://en.wikipedia.org/wiki/Digital_signal_processinghttp://en.wikipedia.org/wiki/Digital_signal_processinghttp://en.wikipedia.org/wiki/Audio_signal_processinghttp://en.wikipedia.org/wiki/Brakehttp://en.wikipedia.org/wiki/Drivinghttp://en.wikipedia.org/wiki/Automobilehttp://en.wikipedia.org/wiki/Wallhttp://en.wikipedia.org/w/index.php?title=Real-time_controller&action=edithttp://en.wikipedia.org/wiki/Instabilityhttp://en.wikipedia.org/wiki/Damagehttp://en.wikipedia.org/wiki/Destructionhttp://en.wikipedia.org/wiki/Systemhttp://en.wikipedia.org/wiki/Personhttp://en.wikipedia.org/wiki/Objecthttp://en.wikipedia.org/wiki/Digital_signal_processinghttp://en.wikipedia.org/wiki/Digital_signal_processinghttp://en.wikipedia.org/wiki/Audio_signal_processing
  • 7/27/2019 What is OS

    18/21

    it meets the strict definition of real time as described above. In this case, the system has a

    limited "buffer capacity" (tolerable queue length) and it must process customers fast enough

    to keep the queue shorter than that tolerable queue length even under a worst-case load of

    arriving customers and the slowest processing of existing customers.

    In the economy, real-time systems are information technologies, which provide real-

    time access to informationordata. The ability of a company to process its data in real time

    increases the competitiveness of the company. Real-time processing systems are new

    technologies and will improve during the next decades. Gartner forecasts a fast increase and

    use of these real-time systems.

    4.3 Types of real time

    Generally there are two types of real time

    1) Hard real time : A system is said to be hard real time if the correctness of an

    operation depends not only upon the logical correctness of the operation but also

    upon the time at which it is performed. Hard real-time systems are typically found

    interacting at a low level with physical hardware, in embedded systems. For example,

    a carengine control system is a hard real-time system because a delayed signal may

    cause engine failure or damage. Other examples of hard real-time embedded systems

    include medical systems such as heartpacemakers and industrial process controllers

    2) Soft real time: An operation performed after the deadline is, by definition,

    incorrect, and usually has no value. In a soft real time system the value of an

    operation declines steadily after the deadline expires. Soft real-time systems are

    typically those used where there is some issue of concurrent access and the need to

    keep a number of connected systems up to date with changing situations. Example:

    the software that maintains and updates the flight plans for commercial airliners.

    These can operate to a latency of seconds. It would not be possible to offer modern

    commercial air travel if these computations could not reliably be performed in real

    time. Live audio-video systems are also usually soft real-time; violation of constraints

    results in degraded quality, but the system can continue to operate

    Reference A

    http://en.wikipedia.org/wiki/Informationhttp://en.wikipedia.org/wiki/Informationhttp://en.wikipedia.org/wiki/Datahttp://en.wikipedia.org/wiki/Company_(law)http://en.wikipedia.org/wiki/Competitivenesshttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Automobilehttp://en.wikipedia.org/wiki/Enginehttp://en.wikipedia.org/wiki/Artificial_pacemakerhttp://en.wikipedia.org/wiki/Airlinehttp://en.wikipedia.org/wiki/Informationhttp://en.wikipedia.org/wiki/Datahttp://en.wikipedia.org/wiki/Company_(law)http://en.wikipedia.org/wiki/Competitivenesshttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Automobilehttp://en.wikipedia.org/wiki/Enginehttp://en.wikipedia.org/wiki/Artificial_pacemakerhttp://en.wikipedia.org/wiki/Airline
  • 7/27/2019 What is OS

    19/21

    4.4 What is real time computing?

    In computer science real-time computing (RTC) is the study of hardware and

    software systems which are subject to a "real-time constraint" i.e. operational deadlines

    from event to system response. By contrast, a non-real-time system is one for which there is

    no deadline, even if fast response or high performance is desired or even preferred. The

    needs of real-time software are often addressed in the context of real-time operating systems,

    and synchronous programming languages, which provide frameworks on which to build real-

    time application software.

    A real time system may be one where its application can be considered (within

    context) to be mission critical. The anti-lock brakeson a car is a simple example of a real-

    time computing system where the real-time constrain in this system is the short time in which

    the brakes must be released to prevent the wheel from locking. RT computations can be said

    to have failed if they are not completed in the time-period after the event before the deadline

    relative to the event (where deadlines are independent ofsystem load).

    Reference A

    http://en.wikipedia.org/wiki/Computer_sciencehttp://en.wikipedia.org/wiki/RTChttp://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/Timehttp://en.wikipedia.org/wiki/Real-time_operating_systemhttp://en.wikipedia.org/wiki/Synchronous_programming_languagehttp://en.wikipedia.org/wiki/Mission_criticalhttp://en.wikipedia.org/wiki/Anti-lock_brakeshttp://en.wikipedia.org/wiki/Anti-lock_brakeshttp://en.wikipedia.org/w/index.php?title=System_load&action=edithttp://en.wikipedia.org/wiki/Computer_sciencehttp://en.wikipedia.org/wiki/RTChttp://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/Timehttp://en.wikipedia.org/wiki/Real-time_operating_systemhttp://en.wikipedia.org/wiki/Synchronous_programming_languagehttp://en.wikipedia.org/wiki/Mission_criticalhttp://en.wikipedia.org/wiki/Anti-lock_brakeshttp://en.wikipedia.org/w/index.php?title=System_load&action=edit
  • 7/27/2019 What is OS

    20/21

    Conclusion:

    Hence we conclude that RTOS is nothing but an OS which have real time

    characteristics. These are far cry from todays operating system. Real-time and embedded

    systems are used in many applications such as airborne computers, medical instruments and

    communication systems. Embedded systems are characterized by limited processor memory,

    limited processing power, and unusual interfaces to the outside world. RTOS kernels hide

    from application software the low-level details of system hardware, and at the same time

    provide several categories of services to application software. These include: task

    management with priority-based preemptive scheduling, reliable intertask communication

    and synchronization, non-fragmenting dynamic memory allocation, and basic timer services.

    The issue of timing determinism is important in differentiating general-computing operating

    systems from real-time operating systems. This issue crops up in many parts of operating

    system kernels, such as task schedulers, dynamic memory allocation and intertask message

    communication. While general-computing operating systems often offer non-deterministic

    services in these areas, fully deterministic solutions are needed for real-time and embedded

    systems. A number of real-time operating systems implement these solutions in their

    compact high-performance Real time system are information technologies which provide real

    time access to data or information. The ability of a company to process its data in real time

    increases the competitiveness of a company. These are new technologies and will improve

    during the next decades. Gartner forecasts, a fast increase use of real time system.

    Reference A

  • 7/27/2019 What is OS

    21/21

    Reference

    1. http://en.wikipedia.org/wiki/Real-time_computing

    2. http://www.kalinskyassociates.com/Wpaper1.html

    3. http://en.wikipedia.org/wiki/Embedded_system

    4. http://en.wikipedia.org/wiki/Real-time_operating_system

    5. http://en.wikipedia.org/wiki/Operating_system

    6. Operating System principles By Peter Baer Galvin , Gerg Gagne