Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.

Similar presentations


Presentation on theme: "Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators."— Presentation transcript:

1 Operating Systems High Level View Chapter 1,2

2 Who is the User? End Users Application Programmers System Programmers Administrators

3 End Users Want Ease of use and learn Adaptable to user’s style Alternative ways to do things Lots of visual cues Free of nasty surprises Reliable quick response Consistency among features

4 Application Programmers Want Easy to write programs –read keystrokes –draw to screen –change windows Consistent view of system Easy to use system facilities –creating new windows –accessing a network Platform portability

5 System Programmers Want Easy to – create correct programs – configure – debug – maintain – expand

6 Administrators Want Easy to add or remove devices Protect system and data Easy to upgrade Easy to manage user accounts Good & predictable average response Affordable

7 A Mouse Example User moves mouse -> hardware interrupt OS driver sees movement in pulse rate OS moves cursor on screen Application sees “mouseover” event -> updates screen image User sees image change – clicks icon

8 Terms & Concepts Operating System - software that manages resources of a computer & provides interfaces to them. Device - piece of hardware connected to the main computer hardware. Device controller - electronic interface which controls devices connected to the computer.

9 Terms & Concepts Bus - conductors connecting many hardware components in a computer. Device driver – a part of the OS that interfaces to a device controller. Kernel - part of an OS that implements basic functions – always running.

10 Terms & Concepts (cont.) Service - functions an OS provides to users through programmer interfaces. Utility - programs not part of the operating system kernel. Shell - user interface to most system services – command interpreter.

11 Simplified PC Hardware CPU Memory Bus Disk Controller Video Controller Keyboard Controller Hard Disk Video Monitor Keyboard

12 One picture of an OS Operating System Kernel Other Programs (Browsers, games, word processing) Other Programs (Browsers, games, word processing) Devices (disks, keyboards) Devices (disks, keyboards) Utilities Shell (Command Interpreter) Shell (Command Interpreter) Memory CPU

13 A Personal Computer & OS Operating System Kernel Device Drivers (DVD driver, video driver) Device Drivers (DVD driver, video driver) BIOS (Interface to hardware) BIOS (Interface to hardware) Command (Command Interpreter) Utilities Other Programs (Browsers, games, word processing) Devices (Disks, keyboards) CPU Memory

14 The Process Concept and OS Process Information Process – a program in execution –Also called a job or task Has CPU state – registers Has allocated resources

15 Process States Started Ready Running Waiting (Blocked) Terminated (Ended)

16 Run Ready Wait 5 - Interrupted 2 – Gets CPU Time 3 – Needs something 4 – Got What it needed New Exit 1 - Process Initialized 6 - Finished or aborted 0 - Program Loaded 7 - Exits System Process State Diagram

17 State Transitions 0 – OS is preparing the job to run 1 – Job is ready to run 2 – Job starts (or resumes) running 3 – Job is waiting for something 4 – Job waiting has finished 5 – Job is preempted 6 – Job ends or is aborted 7 – Job exits system

18 Process Information the OS Maintains Process ID – a number (PID) Process Control Block (PCB) –Priority information –Process state –Processor (CPU) state –-> Memory access table –-> Open files table –-> Next PCB

19 Types of Processes User or Application Processes Systems Program Processes OS Processes

20 Processor Modes Privileged –Monitor, kernel, supervisor, ring 0 or system Non-privileged –user or application

21 Types of OSs Single-user Multi-tasking or multi-programming Time Sharing Network and distributed Real-Time

22 Single-user OS One user One process running Limited memory management File services I/O services

23 Multi-tasking OS Multiple processes running May still be single user All that a single task system does, + CPU scheduling –Context switching

24 Multi-user OS Multiple users Users are interactive Jobs –are short –need fewer resources –need fast response time

25 Network/ Distributed OS Low-level services –Connect to the network –Send messages between systems Higher-level services –Browsing –File sharing –Print services

26 Real-Time OS Time deadlines Hard deadlines –Useless results or catastrophe Soft deadlines –Some lateness tolerated

27 Architectural Approaches to Building an OS Monolithic single-kernel Microkernel and Layered Object-oriented Approach Virtual Machines

28 Monolithic Architecture One dense module RAM was expensive Started adding features Got bloated –Harder to add to –Harder to maintain

29 Layered Architecture Functions divided into Layers Each layer higher abstraction Hopefully don’t skip layers –Faster –Less portable

30 Layered Architecture Device Drivers Shell (Command Interpreter) Utilities User Programs (Browsers, games, word processing) Memory Management Processor Scheduling File System Devices (disks, keyboards) CPUMemory API Kernel

31 Microkernel Architecture One small module RAM getting cheaper Started removing features –Moved into higher layers –Run in user mode –Still OS functions

32 Microkernel Architecture Microkernel Shell (Command Interpreter) Utilities Other Programs (Browsers, games, word processing, …) Devices (disks, keyboards, …) Memory Management Processor Scheduling File System USER Mode KERNEL Mode

33 Implementation Techniques Interrupt Handling –Interrupt Vectors System Calls Queues and Tables Object Oriented Approach Minimalist vs. Maximalist Approaches Backward Compatibility

34 Interrupt Handling – Interrupt Vectors Hardware signals an event –I/O completion or fault Interrupt register holds interrupt # # used to select routine address –Vector table in low RAM

35 Interrupt Vector Illustrating an for handling interrupts Address of interrupt service routine 1 Index into interrupt vector Interrupt Register Interrupt Vector Address of interrupt service routine 2 Address of interrupt service routine 3 o o o Address of interrupt service routine N

36 System Calls Load registers/ variables with arguments TRAP instruction Generates an interrupt Automatic switch to kernel mode Arguments tell OS what to do Afterwards “return” as from a function call Force return to user mode

37 6/12/2015B.Ramamurthy37 System Call There are 11 steps in making the system call read (fd, buffer, nbytes)

38 6/12/2015B.Ramamurthy38 Some System Calls For Process Management and File Management

39 OS Queues and Tables Tables –PCB –Open File Table –Page Tables Queues –Ready processes –I/O requests –event waits

40 Object Oriented Architecture A collection of objects Better software engineering Performance penalty Any object can use any other

41 Virtual Machine Architecture OS emulates hardware architecture Runs other OS, not user applications Good for OS development Related – simulate abstract machines –Java –.Net CLR

42 Hardware Virtual Machine Model Virtual Machine Shell, Utilities, or Programs Devices (disks, keyboards, … ), CPU, Memory Kernel 1 Kernel 2 Kernel 3

43 Minimalist vs. Maximalist Less is more –Minimum in kernel –Else in libraries and layers –More choices –Linux All in One –Operating Standards –MAC OS


Download ppt "Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators."

Similar presentations


Ads by Google