13
CS420: Operating Systems James Moscola Department of Engineering & Computer Science York College of Pennsylvania CS420: Operating Systems Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

College Catalog2009–2011

!"#$%&'())*+,-.)/.&01234546708.9:;*&<:(#.="#>&1015?26511??@A9/**/")*&<B!&C(>&1015?2D50633

05?3352775?30?EEEF+C:F(A;

!""#$%%&'$#()*$&+$,-$%.$"

'GHI<GJHK&L<MNK'GONJHK&P@JJHGMFIF&'<IJ@QH&'@OK

!<GR%&'@'HGPOJ&N<F&012

YO

RK

CO

LLEGE O

F PENN

SY

LVA

NIA

CO

LLEGE C

ATA

LOG

2009–2011

!""#$%&'()*+,--.../ 012$1$"..."34#3$4.56

College Catalog2009–2011

!"#$%&'())*+,-.)/.&01234546708.9:;*&<:(#.="#>&1015?26511??@A9/**/")*&<B!&C(>&1015?2D50633

05?3352775?30?EEEF+C:F(A;

!""#$%%&'$#()*$&+$,-$%.$"

'GHI<GJHK&L<MNK'GONJHK&P@JJHGMFIF&'<IJ@QH&'@OK

!<GR%&'@'HGPOJ&N<F&012

YO

RK

CO

LLEGE O

F PENN

SY

LVA

NIA

CO

LLEGE C

ATA

LOG

2009–2011

!""#$%&'()*+,--.../ 012$1$"..."34#3$4.56

College Catalog2009–2011

!"#$%&'())*+,-.)/.&01234546708.9:;*&<:(#.="#>&1015?26511??@A9/**/")*&<B!&C(>&1015?2D50633

05?3352775?30?EEEF+C:F(A;

!""#$%%&'$#()*$&+$,-$%.$"

'GHI<GJHK&L<MNK'GONJHK&P@JJHGMFIF&'<IJ@QH&'@OK

!<GR%&'@'HGPOJ&N<F&012

YO

RK

CO

LLEGE O

F PENN

SY

LVA

NIA

CO

LLEGE C

ATALO

G 2009–2011

!""#$%&'()*+,--.../ 012$1$"..."34#3$4.56

James MoscolaDepartment of Engineering & Computer ScienceYork College of Pennsylvania

CS420: Operating SystemsOperating System Structure

Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

Page 2: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Operating System Design and Implementation

• Design and Implementation of OS not “solvable”

- There is no single OS that works best for every use case

• How does one design an operating system??

- Start by defining goals and specifications

- Affected by choice of hardware, type of system

- User goals and System goals

• User goals – operating system should be convenient to use, easy to learn, reliable, safe, and fast

• System goals – operating system should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient

2

Page 3: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

An OS With Simple Structure

• MS-DOS – written to provide the most functionality in the least space

- Not divided into modules

- Although MS-DOS has some structure, its interfaces and levels of functionality are not well separated

- Not well protected

3

Page 4: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Layered Approach

• The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface.

• With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers

- An OS can be designed from the lower layers up; ensure that lower layers work before moving to higher layers

4

Page 5: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Traditional UNIX System Structure

5

Page 6: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Microkernel System Structure

• Moves as much from the kernel into “user” space

• Communication takes place between user modules using message passing

• Benefits:

- Easier to extend a microkernel

- Easier to port the operating system to new architectures

- More reliable (less code is running in kernel mode)

- More secure

• Detriments:

- Performance overhead of user space to kernel space communication

6

Page 7: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Kernel Modules

• Most modern operating systems implement kernel modules

- Uses object-oriented approach

- Each core component is separate

- Each talks to the others over known interfaces

- Each is loadable as needed within the kernel

• Overall, similar to layers but more flexible

7

Page 8: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Solaris Modular Approach

8

Page 9: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Virtual Machines

• A virtual machine takes the layered approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardware.

• A virtual machine provides an interface identical to the underlying bare hardware.

• The operating system host creates the illusion that a process has its own processor and (virtual memory).

• Each guest provided with a (virtual) copy of underlying computer.

9

Page 10: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Virtual Machines History and Benefits

• First appeared commercially in IBM mainframes in 1972

• Fundamentally, multiple execution environments (different operating systems) can share the same hardware

• Protected from each other

• Some sharing of file can be permitted, but controlled

• Communicate with each other, other physical systems via networking

• Useful for development, testing

• Consolidation of many low-resource use systems onto fewer busier systems

• “Open Virtual Machine Format”, standard format of virtual machines, allows a VM to run within many different virtual machine (host) platforms

10

Page 11: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

Virtual Machines (Cont.)

Nonvirtual machine virtual machine

11

Page 12: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

VMware Architecture

12

Page 13: lecture4 operating system structure - GitHub Pages · 2017. 11. 28. · Operating System Structure Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne

CS420: Operating Systems

The Java Virtual Machine

13