Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008 TUCN. Operating Systems. Lecture 1
Contents Definition  of an Operating System (OS) Role  of an Operating System History  of Operating Systems Classification  of Operating Systems Specific  terms  and  concepts Structure  of an OS TUCN. Operating Systems. Lecture 1 Spring, 2008
The Definition of an OS Where comes the OS in? A computer system consists of: User software System software Hardware TUCN. Operating Systems. Lecture 1 Spring, 2008 User  Applications Compilers Editors Shells Operating System System hardware
The Definition of an OS What is an OS? A system software A collection of procedures that:  manage all the system’s hardware resources provide the users the environment in which they can: use the system resources  run their own applications TUCN. Operating Systems. Lecture 1 Spring, 2008
The Role of an OS Extended or virtual machine The external or the user point of view  A top-down perspective Hides the complexity of using the hardware devices Provides the user a more convenient view of the system resources Purpose:  Convenience Resource manager The inside or the designer point of view A bottom-up perspective Brings the hardware resources in a functional state Provides each program with time and space for using resources Purpose:  Efficiency TUCN. Operating Systems. Lecture 1 Spring, 2008
A Classification of OSs Mainframe operating systems:  OS/390 Server operating systems:  UNIX, Windows 2000, Linux Multiprocessor operating systems PC operating systems:   Windows 98, Windows ME, Macintosh, Linux Real-time operating systems:  VxWorks, QNX Embedded operating systems:  PalmOS, Windows CE, Windows Mobile, Symbia Spring, 2008 TUCN. Operating Systems. Lecture 1
Specific Terms and Concepts Batch systems:   no user interaction   Multiprogramming:   multiple programs loaded in memory   Time-sharing:   each process receives slices of CPU time   Interactive   systems :  provides quick response to user’s actions Multi-user:   distinction between users Network OS:   users aware of the existence of multiple computers Distributed OS:   looks like a traditional single-processor system Processes, Files, System Calls TUCN. Operating Systems. Lecture 1 Spring, 2008
Computer Hardware (1) An OS is closely tied to the HW it runs on HW components CPU Memory I/O devices Monitor Keyboard Storage devices (HDD, Floppy etc.) Others BUSes TUCN. Operating Systems. Lecture 1 Spring, 2008
Computer Hardware (2) TUCN. Operating Systems. Lecture 1 Tanenbaum, Fig. 1-5. Monitor BUS Spring, 2008
CPU Functionality fetch instructions from memory, decode and execute them Instruction set has a specific set of instructions that can be executed specific executable programs each processor can run Registers Program counter Stack pointer Many others – architecture dependent  Machine state – saved at context switch Kernel vs. User mode of execution switches between  system calls hardware exceptions, interruptions TUCN. Operating Systems. Lecture 1 Spring, 2008
Memory Should be extremely fast, large and cheap Hierarchy of layers Registers : fastest, no delay, but limited size Cache  memory cache hits and misses  Main memory –  RAM  (Random Access Memory) HDD s 2 orders of magnitude cheaper and larger then RAM, but 3 orders of magnitude slower mechanical device – heads, tracks (cylinders), sectors,  Magnetic tapes used as a backup for very large data sets very slow, but very cheap and removable TUCN. Operating Systems. Lecture 1 Spring, 2008
I/O Devices Components controller and the device itself Controller Directly controls the physical device Receives commands from the OS Device driver Supplied by controller manufacturer Inserted into the OS – run in kernel mode Functionality Busy waiting Interrupts TUCN. Operating Systems. Lecture 1 Spring, 2008
Processes Definition A program in execution Consists of: executable code, data, stack, CPU registers value, and other information A process hierarchy (tree) A created two child processes:  B and C B created three child processes:  D, E, and F Process synchronization Inter-Process Communication (IPC) TUCN. Operating Systems. Lecture 1 Spring, 2008
Files Definition A collection of related information An abstraction of data stored on HDD A process tree File system mounting File linking TUCN. Operating Systems. Lecture 1 Spring, 2008
System calls (1)  Definition a call to an OS service a trap into the OS code Examples of system calls File manipulation: open(), read(), write(), lseek(), close() … File system management: mkdir(), mount(), link(), chown() … Process management: fork(), exec(), wait(), exit() … TUCN. Operating Systems. Lecture 1 Spring, 2008
System Calls (2) Steps in making a system call There are 11 steps executing the system call:  read (fd, buffer, nbytes) TUCN. Operating Systems. Lecture 1 Spring, 2008
The Structure of an OS Architectures(1). M onolithic OS TUCN. Operating Systems. Lecture 1 Spring, 2008
The Structure of an OS Architectures (2). Layered OS TUCN. Operating Systems. Lecture 1 The Structure of the THE operating system Spring, 2008
The Structure of an OS Architectures (3). Client-Server TUCN. Operating Systems. Lecture 1 The client-server model A distributed OS Spring, 2008
The Structure of an OS Architectures (4).Advantages … Advantages of micro-kernels the modules run in user mode    protection against bugs adaptability to use in distributed systems forces the programmers to adopt a modularize approach   easily ported to other architectures better use of RAM than monolithic ones   Modules in monolithic systems (Linux) - advantages   monolithic OS faster than micro-kernel OS modularized approach   platform independence   frugal main memory usage   no performance penalty   TUCN. Operating Systems. Lecture 1 Spring, 2008
Process manager: c reates, schedules and destroy processes Memory manager: a llocates and releases memory Disk manager I/O devices manager File system: c reate, read, modify, remove etc. files Communication system Protection system Shells text interface – command interpreter graphical interface The Structure of an OS Components TUCN. Operating Systems. Lecture 1 Spring, 2008
Readings Andrew Tannenbaum,  “Modern Operating Systems” , second edition, Prentice Hall, 2001, pgs. 1-20, 34-63 D. Bovet, M. Cesati, “Understanding Linux Kernel”, O’Reilly, 2001, pgs.11-12 TUCN. Operating Systems. Lecture 1 Spring, 2008

Lecture01 introduction

  • 1.
    Introduction Operating Systems’Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008 TUCN. Operating Systems. Lecture 1
  • 2.
    Contents Definition of an Operating System (OS) Role of an Operating System History of Operating Systems Classification of Operating Systems Specific terms and concepts Structure of an OS TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 3.
    The Definition ofan OS Where comes the OS in? A computer system consists of: User software System software Hardware TUCN. Operating Systems. Lecture 1 Spring, 2008 User Applications Compilers Editors Shells Operating System System hardware
  • 4.
    The Definition ofan OS What is an OS? A system software A collection of procedures that: manage all the system’s hardware resources provide the users the environment in which they can: use the system resources run their own applications TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 5.
    The Role ofan OS Extended or virtual machine The external or the user point of view A top-down perspective Hides the complexity of using the hardware devices Provides the user a more convenient view of the system resources Purpose: Convenience Resource manager The inside or the designer point of view A bottom-up perspective Brings the hardware resources in a functional state Provides each program with time and space for using resources Purpose: Efficiency TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 6.
    A Classification ofOSs Mainframe operating systems: OS/390 Server operating systems: UNIX, Windows 2000, Linux Multiprocessor operating systems PC operating systems: Windows 98, Windows ME, Macintosh, Linux Real-time operating systems: VxWorks, QNX Embedded operating systems: PalmOS, Windows CE, Windows Mobile, Symbia Spring, 2008 TUCN. Operating Systems. Lecture 1
  • 7.
    Specific Terms andConcepts Batch systems: no user interaction Multiprogramming: multiple programs loaded in memory Time-sharing: each process receives slices of CPU time Interactive systems : provides quick response to user’s actions Multi-user: distinction between users Network OS: users aware of the existence of multiple computers Distributed OS: looks like a traditional single-processor system Processes, Files, System Calls TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 8.
    Computer Hardware (1)An OS is closely tied to the HW it runs on HW components CPU Memory I/O devices Monitor Keyboard Storage devices (HDD, Floppy etc.) Others BUSes TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 9.
    Computer Hardware (2)TUCN. Operating Systems. Lecture 1 Tanenbaum, Fig. 1-5. Monitor BUS Spring, 2008
  • 10.
    CPU Functionality fetchinstructions from memory, decode and execute them Instruction set has a specific set of instructions that can be executed specific executable programs each processor can run Registers Program counter Stack pointer Many others – architecture dependent Machine state – saved at context switch Kernel vs. User mode of execution switches between system calls hardware exceptions, interruptions TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 11.
    Memory Should beextremely fast, large and cheap Hierarchy of layers Registers : fastest, no delay, but limited size Cache memory cache hits and misses Main memory – RAM (Random Access Memory) HDD s 2 orders of magnitude cheaper and larger then RAM, but 3 orders of magnitude slower mechanical device – heads, tracks (cylinders), sectors, Magnetic tapes used as a backup for very large data sets very slow, but very cheap and removable TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 12.
    I/O Devices Componentscontroller and the device itself Controller Directly controls the physical device Receives commands from the OS Device driver Supplied by controller manufacturer Inserted into the OS – run in kernel mode Functionality Busy waiting Interrupts TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 13.
    Processes Definition Aprogram in execution Consists of: executable code, data, stack, CPU registers value, and other information A process hierarchy (tree) A created two child processes: B and C B created three child processes: D, E, and F Process synchronization Inter-Process Communication (IPC) TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 14.
    Files Definition Acollection of related information An abstraction of data stored on HDD A process tree File system mounting File linking TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 15.
    System calls (1) Definition a call to an OS service a trap into the OS code Examples of system calls File manipulation: open(), read(), write(), lseek(), close() … File system management: mkdir(), mount(), link(), chown() … Process management: fork(), exec(), wait(), exit() … TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 16.
    System Calls (2)Steps in making a system call There are 11 steps executing the system call: read (fd, buffer, nbytes) TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 17.
    The Structure ofan OS Architectures(1). M onolithic OS TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 18.
    The Structure ofan OS Architectures (2). Layered OS TUCN. Operating Systems. Lecture 1 The Structure of the THE operating system Spring, 2008
  • 19.
    The Structure ofan OS Architectures (3). Client-Server TUCN. Operating Systems. Lecture 1 The client-server model A distributed OS Spring, 2008
  • 20.
    The Structure ofan OS Architectures (4).Advantages … Advantages of micro-kernels the modules run in user mode  protection against bugs adaptability to use in distributed systems forces the programmers to adopt a modularize approach easily ported to other architectures better use of RAM than monolithic ones Modules in monolithic systems (Linux) - advantages monolithic OS faster than micro-kernel OS modularized approach platform independence frugal main memory usage no performance penalty TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 21.
    Process manager: creates, schedules and destroy processes Memory manager: a llocates and releases memory Disk manager I/O devices manager File system: c reate, read, modify, remove etc. files Communication system Protection system Shells text interface – command interpreter graphical interface The Structure of an OS Components TUCN. Operating Systems. Lecture 1 Spring, 2008
  • 22.
    Readings Andrew Tannenbaum, “Modern Operating Systems” , second edition, Prentice Hall, 2001, pgs. 1-20, 34-63 D. Bovet, M. Cesati, “Understanding Linux Kernel”, O’Reilly, 2001, pgs.11-12 TUCN. Operating Systems. Lecture 1 Spring, 2008