Click here to load reader

SYLLABUS Section B Real Time and Embedded Operating Systems: Real Time and Embedded Operating Systems: – Introduction, – Hardware Elements, – Structure

  • View
    221

  • Download
    0

Embed Size (px)

Text of SYLLABUS Section B Real Time and Embedded Operating Systems: Real Time and Embedded Operating...

  • SYLLABUSSection BReal Time and Embedded Operating Systems: Introduction, Hardware Elements, Structure Interrupt Driven, Nanokernel, Microkernel and Monolithic kernel based models. Scheduling Periodic, Aperiodic and Sporadic Tasks, Introduction to Energy Aware CPU Scheduling.*

  • ASSIGNMENT #1: 16 JAN 2014SECTION BWhat are the characteristics of Real Time and Embedded systems? Describe Hardware Elements used in RE systems. Describe structure of Real Time and Embedded (RE) operating systems clearly specifying difference between Interrupt Driven, Nanokernel, Microkernel and Monolithic kernel based models. Differentiate between Periodic, Aperiodic and Sporadic Tasks. What algorithms are available for their scheduling?Describe Energy Aware CPU Scheduling.SECTION AWhat do you understand by Multi-Processor and Distributed (MPD) systems? Describe Architecture of Operating Systems for such systems.How is Resource sharing and Load Balancing achieved in MPD systems?What are the Design and Development Challenges in MPD Operating Systems? Write short notes on: Inter-process Communication in a typical MPD OSAvailability of resources in MPD systems.Fault Tolerance in MPD systems Logical Clock Mutual ExclusionDistributed File System*

  • ADVANCED OPERATING SYSTEMSMCA 404*

  • SYLLABUS*

  • SYLLABUSSection BReal Time and Embedded Operating Systems: Introduction, Hardware Elements, Structure Interrupt Driven, Nanokernel, Microkernel and Monolithic kernel based models. Scheduling Periodic, Aperiodic and Sporadic Tasks, Introduction to Energy Aware CPU Scheduling.*

  • SYLLABUSSection CCluster and Grid Computing: Introduction to Cluster Computing and MOSIX OS, Introduction to the Grid, Grid Architecture, Computing Platforms: Operating Systems and Network Interfaces, Grid Monitoring and Scheduling, Performance Analysis, Case Studies.*

  • SYLLABUSSection DCloud Computing: Introduction to Cloud, Cloud Building Blocks, Cloud as IaaS, PaaS and SaaS, Hardware and software virtualization, Virtualization of OSHypervisor KVM, SAN and NAS back-end concepts.Mobile Computing: Introduction, Design Principles, Structure, Platform and Features of Mobile Operating Systems (Android, IOS, Windows Mobile OS).*

  • SYLLABUSReferences:Sibsankar Haldar, Alex A. Arvind, Operattng Systems, Pearson Education Inc.Tanenbaum and Van Steen, Distributed systems: Principles and Paradigms, Pearson, 2007.M. L. Liu,Distributed Computing: Principles and Applications, Addison Wesley, Pearson Maozhen Li, Mark Baker,The Grid Core Technologies, John Wiley & Sons 2005

    *

  • *

  • SECTION B*

  • SECTION BReal Time and Embedded Operating Systems: *

  • 8051 MICROCONTROLLER*

  • 8051 MICROCONTROLLERPDIP - Plastic Dual-in-Line PackageCERDIP - Ceramic Dual-in-Line Package

    *

  • 8051 SCHEMATIC DIAGRAM*

  • 8051 SCHEMATIC DIAGRAM*

  • COMPARISON OF 8051 FAMILY MEMBERS*

    Features 8051 8052 8031

    RAM (bytes)128256128ROM4K8K0KTimers232Serial port111I/O pins323232Interrupt sources686

  • PSEN (Pin 29).(Not used for AT89S52)Program Store Enable. This is an output pin. In an 8031 based system, in which an external ROM holds the program code, this pin is connected to the OE* pin of ROM. PSEN is not activated when the device is executing out of internal Program Memory. ALE/PROG (Pin 30). (Not used for AT89S52)Address Latch Enable. When connecting an 8031 to external memory, Port 0 provides both Address and Data. It is connected to G Pin (Pin 11, Latch Enable) of 74LS373 chip (D Latch). Not used for ATMEL 89S52.EA/VPP (Programming Voltage, Pin 31). EA: External Access . When EA is held high (+5V) the CPU executes out of internal Program Memory. Holding EA low (0V) forces the CPU to execute out of external memory. In the 80C31, EA must be externally wired low. In the EPROM devices, this pin also receives the programming supply voltage (VPP) during EPROM programming.For AT89S52, it will be connected to Vcc.

    *OE: Output Enable*

  • Alternate Function of Port 3 Pins

    P3.0Receive Data for serial port communication.P3.1Transmit Data for serial port communication.

    P3.2Receive External Interrupt 0.P3.3Receive External Interrupt 1.

    P3.4Timer 0 Interrupt (Internal)P3.5Timer 1 Interrupt (Internal)

    P3.6WR (Bar)Signals of external memory connected in case of 8031.P3.7RD (Bar)Signals of external memory connected in case of 8031.

    8051 Interrupts (Five).2 external interrupts, 2 timer interrupts, and 1 serial interrupt.

    *

  • SPECIAL FUNCTION REGISTERS OF 8051SP: Stack Pointer; DPL: Data Pointer Lower Byte; DPH: Data Pointer Higher Byte; TCON: Timer Control; TMOD: Timer Mode; TL0: Timer 0, Low Byte; TH0: Timer 0, Higher ByteTL1: Timer 1, Low Byte; TH1: Timer 1, Higher ByteSCON: Serial Communication; SBUF: Serial Buffer; IE: Interrupt EnableIP: Instruction PointerPSW: Program Status WordACC: AccumulatorB: Used by MUL AB andDIV ABP0: Port 0 internal bufferP1: Port 1 internal bufferP2: Port 2 internal bufferP3: Port 3 internal buffer

    *

  • EXAMPLE: ERReal Time and Embedded Operating System (RTES or ER)Writing Real Time and Embedded Operating System for 8051 Microcontroller.Write a simple operating system for 8051 microcontroller which is required to monitor and control water level in a tank. If the water level falls below a critical level, it should start the water pump automatically. If the level rises above the top level, it should stop the motor. Guidelines.There would be two sensors. One for sensing lowest level and the other for sensing highest level.The sensors would be connected to two pins of a port. These pins/port would be configured as input port.These sensor pins would be checked in a loop for their status.When the water level falls below the lowest level, another port pin, configured as output pin, would be set to 1 (Say P2.1). This pin would be connected to an electric relay. If both the sensors are off, give instruction SetB P2.1. which would start the water pump.When the water level increases above upper level, the pump is stopped by another instruction: Clr P2.1*

  • EXAMPLE: ERReal Time and Embedded Operating System (RTES or ER)Writing Real Time and Embedded Operating System for 8051 Microcontroller

    *

  • EXAMPLE: ERReal Time and Embedded Operating System (RTES or ER)Writing Real Time and Embedded Operating System for 8051 MicrocontrollerORG 00; Configure P1.1 and P1.2 as input pinsSetBP1.1SetBP1.2; Now they have high voltage. When water crosses these levels,; the Sensors should send low voltage (0V) on these pins.; Configure P2.1 as output pinClrP2.1; Relay should be wired such that ; it also stops the motorMainloop:; Check Low levelCheckLowLevel:*

  • EXAMPLE: ERReal Time and Embedded Operating System (RTES or ER)Writing Real Time and Embedded Operating System for 8051 MicrocontrollerMainloop:; Check Low levelCheckLowLevel:JNBP1.1, CheckHighLevel; P1.1 = 0, Water is above empty levelSetBP2.1; Tank is Empty , Start Water PumpSJMPCheckgain; Bypass High level checks.; Let the pump keep running. CheckHighLevel:; If water is above low level, check upper levelJB P1.2, Checkgain; Water is below Top levelClrP2.1; Tank is Full, Stop Water Pump Checkagain:SJmp MainloopEND *

  • *

    ConditionHigh Level Sensor PinLow Level Sensor PinMotor Relay PinMotor StatusInitialisation outside Mainloop: Assume initially Tank is EmptySet it to High (1) : InactiveSet it to High (1): InactiveSet it to Low (0)Initially Stop Motor2Enter MainloopSensor indicates below top levelSensor indicates below low levelBecomes High (1)Motor Starts3Now Motor is RunningHigh (1) : InactiveHigh (1): InactiveRemains High (1)Motor keeps running4After sometime Low level sensor gets activatedRemains High (1): InactiveBecomes Low (0):Active; Water rises above Lower levelRemains High (1)Motor keeps running5Water crosses Top LevelBecomes Low (0): ActiveRemains Low (0): ActiveBecomes Low (0)Motor Stops6Water level falls with usage. Falls below high levelBecomes High (1): InactiveRemains Low (0): ActiveRemains Low (0)Motor Remains Off7Water Falls further and goes below low levelRemains High (1): InactiveBecomes High (1): InactiveBecomes High (1)Motor Starts

  • EXAMPLE: ERReal Time and Embedded Operating System (RTES or ER)

    Write an interrupt driven operating system to monitor and control water level in a tank. Water level sensors would be wired on external interrupt pins (P3.2 and P3.3).*

  • EXAMPLE: ERReal Time and Embedded Operating System (RTES or ER)

    Write an interrupt driven operating system to monitor and control water level in a tank. Water level sensors would be wired on external interrupt pins (P3.2 and P3.3). Use low level sensor on P3.2 (INT0) and High Level Sensor at Pin P3.3 (INT1). Configure your OS for interrupt handling and write ISRs for the same.*

  • VECTOR ADDRESS OF INTERRUPTS IN 8051*

    Interrupt SourceVector addressInterrupt priorityExternal Interrupt 0 INT00003H1Timer 0 Interrupt000BH2External Interrupt 1 INT10013H3Timer 1 Interrupt001BH4Serial Interrupt0023H5

  • STRUCTURE OF REAL TIME AND EMBEDDED OPERATING SYSTEMSSteps in executing interrupts in the case of 8051 Series of Microcontrollers:-Upon activation of an interrupt , the microcontroller finishes the instruction it is executing and saves the address of the next instruction (Program Counter (PC)) on the stack.It also saves the current status of all the interrupts internally (ie not on the stack).It jumps to a fixed location in memory in accordance with the Interrupt Vector Table.If the ISR is only one or two instructions, these may be written there

Search related