1 / 19

Introduction to Operating Systems

Introduction to Operating Systems. What is an operating system? Examples How do many programs run at the same time, with one processor?. What is an operating system?.

badru
Télécharger la présentation

Introduction to Operating Systems

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. Introduction to Operating Systems • What is an operating system? • Examples • How do many programs run at the same time, with one processor?

  2. What is an operating system? • A short definition of an operating system: An operating system is a collection of system programs that manage the resources of a computer and control the running of user programs.

  3. Why do we need an operating system? • An operating system from a programmer’s point of view is a program that adds a variety of new instructions and features, beyond those of the instruction set. An operating system is implemented largely in software.

  4. Examples • UNIX/Linux • Windows 98 • Windows NT • Windows XP • BEOS • DOS

  5. Kernel • Central part of the operating system. • All hardware requests go through the kernel as system calls • Shell • The interfaces for the applications programs and users, with the operating system.

  6. Interrupts • Where the normal running of a program is interrupted by an event. Generated: • By computers hardware e.g. key press • Within the CPU by unexpected event, e.g divide-by-zero. • By external events, e.g. from interface cards • By software to perform pre-defined routines in ROM or RAM, e.g. routines in BIOS or user defined routines in RAM- software interrupts.

  7. Process manager deals with • hardware/software interrupts. • Processor errors • Scheduling tasks • Communication between tasks

  8. Memory Management • Allocate memory • Ensures processes (see next week’s lecture) stay memory boundaries • Controlling virtual memory

  9. I/0 System • Communicates with peripherals and hardware components • Co-ordinates i/o systems such as interrupts and direct memory access

  10. Files system • Organises and accesses files • Maintains on a multi-user system user file quotas • Controls file/record access

  11. Application Program Interface • Provides systems services for applications • An interface between the applications and the operating system.

  12. User interface • Allows the user access to programs • Allows the user to view and change system settings. • A consistent interface between the user and the operating system.

  13. Single user/task system • Simplest system • Single machine running one application at a time. • Has it’s own resources (e.g. printer).

  14. Multiprogramming/Multi-tasking System • How do many programs run at the same time, with one processor? • Short answer: They do not! • They just appear to by running one program at a time, but for a short period of time.

  15. Most modern operating systems have the ability to execute several programs at once, although there is usually only one processor in the system. This is multiprogramming and is made possible by rapidly switching the processor between programs. Interrupting the processor periodically, gives the programs control of the processor for a short period.

  16. This switching is triggered by a piece of hardware called the interval timer, which generates an interrupt (a time-out interrupt) when the programmed period has elapsed. The interrupt handler, then saves the context of the processor. The context is the contents of registers that may be overwritten by other programs. Control is passed over to the dispatcher/low-level scheduler.

  17. The dispatcher searches a set of potentially 'runnable' program using a scheduling algorithm to select a suitable program to run next. The context of the processor, which existed when that program last ran, is restored to the registers.

More Related