1 / 7

Advantages of Operating Systems vs. Raw Hardware

Advantages of Operating Systems vs. Raw Hardware. Do you need an OS?. Only if you need a flexible environment. The 3 Roles of an OS. Process Management Control what tasks happen when and in what order/priority Memory Management Allocate memory resources to processes

quinto
Download Presentation

Advantages of Operating Systems vs. Raw Hardware

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advantages of Operating Systems vs. Raw Hardware Do you need an OS? Only if you need a flexible environment

  2. The 3 Roles of an OS • Process Management • Control what tasks happen when and in what order/priority • Memory Management • Allocate memory resources to processes • Protect processes from one accessing each others’ memory spaces. • I/O (Device) Management • Provide an API for device interaction • Protect devices from misuse (abstraction barrier!) • Arbitrate between processes who would like to use a device

  3. Device Drivers • Part of the OS or integrated with the OS (from a 3rd party/manufacturer) • In raw hardware systems, a function library for HW support is ~= a device driver • Provide the interface between the HW device and the user software. • Usually implemented through a series of system calls • Software-triggered interrupt which the OS handles • Function often based upon register states when the call happened

  4. Components of Drivers • A typical device driver will contain at least a subset of these functions: • Install (someone plugged it into the system – think USB) • Uninstall (removed) • Enable (give a device power/ set it up) • Disable • Acquire (acquire permission to use the device – for process protection) • Release (relinquish control of the device) • Read • Write • Startup (on boot-up) • Shutdown (on shut-down) • These functions, besides manipulating data and devices, also move the device between 3 (normally) different states: Inactive – Busy – Idle(Finished)

  5. The Boot Process • “Bootstrap” is the method by which a system brings itself up from reset/power on to a normal running state • Some tasks to consider for this sequence (not ordered): • Self-diagnostics • Initializing registers • Initializing MMRs (clocks, power settings, memory map, bus settings) • Setting up ABI standards (starting the stack/heap, etc) • Enabling/Configuring interrupts • Move programs into memory • Transfer control to a program (main())

  6. CodeWarrior/MPC 555 Boot Process Our CodeWarrior projects implement a configurable boot process. You can find the code for it in these files: eppc_exception.asm MPC555CME_init.c __ppc_eabi_init.c __start.c • Not in project – located in: C:\Program Files\Freescale\CodeWarrior EPPC 5xx V8.7\PowerPC_EABI_Support\Runtime\src (numbers used to denote which file functions are in on next slide) (1) (2) (3) (4)

  7. CodeWarrior/MPC 555 Boot Process • Reset Interrupt starts everything • Interrupt handler table calls __reset() function • _reset() enables machine check exceptions (for sanity) and calls _start() • Note that everything is using nofralloc – there’s no stack yet! • _start() calls _init_registers() to set up SP and other EABI reserved regs • _start() calls _init_hardware() • _init_hardware() takes care of some special cases and calls usr_init() • usr_init() is where the developer can configure the machine MMR setup that will be used at boot time. Sets up clock, power, interrupts, and most importantly, the memory controller. • _start() allocates the stack base and the heaps • _start() calls main() • main() returns, leading to an exit()-type routine (1) (1) (4) (4) (3) (2) (4) (4) (4)

More Related