Birla Institute of Technology and Science, Pilani
REAL TIME OPERATING SYSTEM
Design a Raspberry Pi based system for a smart hospital in the absence of doctors to
carry out surgeries. Highlight the tasks associated. Identify the nature and type of
real time system. Which algorithm would be suitable in such a scenario and explain
the same with an example.
Devices Required:
    ECG sensor - Electrocardiography (ECG) is used to record heart-beat activities through on the
     top of the skin. It can detect a change of an electric cylinder every minute on the top of the skin.
    Heartbeat sensor - It is used to measure the heartbeat of the patient. Here, the heart rate
     sensor uses + 5V DC voltage. This gives the digital result, which is placed on the hand artery
     nerves.
    Blood pressure sensor - Hypertension sensor measures blood pressure, including systolic,
     diastolic pressure and pulse rate of the body.
    Temperature sensor- This sensor measures the body temperature with a voltage.
    Respiration Sensor - This sensor is able to finds breaths per minute in humans. The regular
     respiratory rate of humans is 12 to 18 breaths per minute.
    Anesthetic Device - Inhalation anesthesia administers a mixture of air, oxygen, nitrous oxide
     and anesthetic (e.g. isoflurane, sevoflurane or desflurane) to the patient.
    Raspberry pi -This device works well as a multi-processor. It has a graphics card, a volatile
     memory, RAM, device interfaces and other external wireless device interfaces. This raspberry Pi
     is consuming very less power, but it is still cheap and powerful
                     Respiratory Sensor           R
                                                  A
                                                                 Monitor
                                                  S
                      ECG Sensor                  P
                                                  B
                                                  E              Keyboard
                      Blood Pressure              R
                      Sensor                      R
                                                  Y               Mouse
                      Temperature
                      Sensor
                                                  P                 Power
                                                  I                 Supply
                      Anesthetic Device
Tasks Associated
Critical Task :
      Ventillator Operation – The task of ventilator will be controlled by Respiratory Sensor
      Anesthesia Level – The level and quantity of anesthesia will be controlled by Anesthetic Device
      Power Supply – It will control the overall power supply to the system
      Heart Beat Operation – The task will be controlled by heart-beat and ECG sensor
Exceptional Task :
    Temperature Sensor – The task of temperature sensor is to check and maintain the temperature
    Blood pressure Sensor – The task is to maintain the blood pressure
Type of RealTime System
Nature:
    Event Driven - An event-driven system is a system that changes state only in response to an
     incoming event
Type:
    Hard Real Time System - A hard real-time system (also known as an immediate 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 complete its function within the
     allotted time span.
    Closed-loop model – In this the systems are designed to automatically achieve and maintain the
     desired output condition by comparing it with the actual condition. It does this by generating an
     error signal which is the difference between the output and the reference input.
Algorithm Used
IRIS Tasks (Increased Reward with Increased Service)
    If a task runs to its completion, it get full reward. if not run to its completion then it gets zero
     reward. 
    So, Each IRIS tasks has two portions a Mandatory part and an Optional Part. 
    If a tasks completes atleast its mandatory part, then it gets a little reward, but if a tasks does not
     complete even the mandatory part, then it will get zero reward from it.
       Example : Use of robot by the car manufacturing companies