Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008 TUCN. Operating Systems. Le...
Contents <ul><li>Definition  of an Operating System (OS) </li></ul><ul><li>Role  of an Operating System </li></ul><ul><li>...
The Definition of an OS Where comes the OS in? <ul><li>A computer system consists of: </li></ul><ul><ul><li>User software ...
The Definition of an OS What is an OS? <ul><li>A system software </li></ul><ul><li>A collection of procedures that:  </li>...
The Role of an OS <ul><li>Extended or virtual machine </li></ul><ul><ul><ul><li>The external or the user point of view  </...
A Classification of OSs <ul><li>Mainframe operating systems:  OS/390 </li></ul><ul><li>Server operating systems:  UNIX, Wi...
Specific Terms and Concepts <ul><li>Batch systems:   no user interaction   </li></ul><ul><li>Multiprogramming:   multiple ...
Computer Hardware (1) <ul><li>An OS is closely tied to the HW it runs on </li></ul><ul><li>HW components </li></ul><ul><ul...
Computer Hardware (2) TUCN. Operating Systems. Lecture 1 Tanenbaum, Fig. 1-5. Monitor BUS Spring, 2008
CPU <ul><li>Functionality </li></ul><ul><ul><li>fetch instructions from memory, decode and execute them </li></ul></ul><ul...
Memory <ul><li>Should be extremely fast, large and cheap </li></ul><ul><li>Hierarchy of layers </li></ul><ul><ul><li>Regis...
I/O Devices <ul><li>Components </li></ul><ul><ul><li>controller and the device itself </li></ul></ul><ul><li>Controller </...
Processes <ul><li>Definition </li></ul><ul><ul><ul><li>A program in execution </li></ul></ul></ul><ul><ul><ul><li>Consists...
Files <ul><li>Definition </li></ul><ul><ul><ul><li>A collection of related information </li></ul></ul></ul><ul><ul><ul><li...
System calls (1)  <ul><li>Definition </li></ul><ul><ul><li>a call to an OS service </li></ul></ul><ul><ul><li>a trap into ...
System Calls (2) Steps in making a system call <ul><li>There are 11 steps executing </li></ul><ul><li>the system call:  re...
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...
The Structure of an OS Architectures (3). Client-Server TUCN. Operating Systems. Lecture 1 The client-server model A distr...
The Structure of an OS Architectures (4).Advantages … <ul><li>Advantages of micro-kernels </li></ul><ul><ul><ul><li>the mo...
<ul><li>Process manager: c reates, schedules and destroy processes </li></ul><ul><li>Memory manager: a llocates and releas...
Readings <ul><li>Andrew Tannenbaum,  “Modern Operating Systems” , second edition, Prentice Hall, 2001, pgs. 1-20, 34-63 </...
Upcoming SlideShare
Loading in …5
×

Lecture01 introduction

1,927 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,927
On SlideShare
0
From Embeds
0
Number of Embeds
59
Actions
Shares
0
Downloads
108
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lecture01 introduction

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

×