Saturday, November 1, 2014

Introduction To embedded systems


cross-platform: compilation platform differs from target platform

OS APIs = System calls

OS Functionalities:
  1. User Management. (user1 - user2 - …. - root). Manage the read, write execute privileges for each user to each file. Also manages the environment of each user (each user has different desktop background, screensaver, ..etc)
  2. Process management. Running all programs at the same time. running multiple threads in each program at the same time. Scheduler is responsible of dividing the time into time slots each for a process.
   
Process scheduling algorithms:
consider having 5 processes
  1. Round Robin: solt 1 - slot 2 - slot 3 - slot 4 - slot 5 - slot 1 - slot 2 - ...etc
  2. Priority Base: the higher priority process takes a slot first
   
    Preemptive scheduler: higher priority task can interrupt lower priority task
    Non-preemptive scheduler: any task start shall continue to completion and can not be interrupted.
  1. Memory Management:
    1. Memory Protection: Each process has memory range, no process shall be able to write in another process memory range.
    2. Memory Management: each process use virtual addressing inside its range, where a lookup table determines the mapping between the process virtual memory addresses and the physical addresses in the Memory
  2. File System Management:
    1. OS gives the app the feel of files and directories, and hides any storage hardware details behind this (sectors, …etc)
  3. Power Management:
    1. sleep mode
    2. changing the clock rate according to the load, to utilize power
  4. IO and interrupt handling
  5. Timers and time related tasks
    1. The OS receives an interrupt each 1 tick
    2. The OS uses this interrupt to keep track of time
    3. The tick duration defines the system resolution
  6. Networking and Communications (Wireless - Serial - Bluetooth - Ethernet - ...etc)

No comments:

Post a Comment