Operating System Organization - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Operating System Organization

Description:

Operating System Organization – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 31
Provided by: RomeRese7
Category:

less

Transcript and Presenter's Notes

Title: Operating System Organization


1
Operating System Organization
  • Chapter 3Michelle Grieco

2
Outline
  • Basic Functions of an OS
  • Defining Requirements
  • Implementation Considerations
  • OS Kernels of Today
  • Research in OS

3
Purpose of an OS
  • Creates abstractions
  • Multiple processes compete for use of processor
  • Coordination

4
Responsibilities of an OS
  • Create an abstract machine environment with
    multiple, autonomous, abstract components (that
    can be in use concurrently)
  • Multiprogramming is used to create an abstract
    machine for each process
  • Coordinate the use of the components according to
    the policies of the machines administrator
  • Scheduler decides when and which processes get to
    use the processor

5
Basic Requirements an OS Must Satisfy
  • Device Management
  • Process, Thread and Resource Management
  • Memory Management
  • File Management

6
Device Management
  • OS manages the allocation, isolation and sharing
    of devices according to policies chosen by the
    designer or system administrator.
  • Devices treated in a general manner
  • Special approaches for memory and processor

7
Device Management
Device-Independent Part
Device-Dependent Part
Device-Dependent Part
Device-Dependent Part
Device
Device
Device
8
Process, Thread and Resource Management
  • Basic units of computation
  • Elements of the computing environment needed by a
    process so that its threads can execute.

9
Process Management
  • Unix Style
  • Includes management facilities to create,
    destroy, block, and run a process.
  • Thread Based Approach
  • More complicated since it has to manage processes
    and threads as separate entities

10
Resource Manager
  • Allocates resources to processes
  • Handles requests for resources from threads
  • Changes in status/changes in resource needs

11
Memory Management
  • Cooperates with process manager to allocate
    primary memory (executable or main) to each
    process
  • Enforces isolation, methods to allow sharing of
    blocks of memory
  • Virtual Memory allows processes to reference
    information stored on a storage device as if it
    were stored in primary memory.

12
Memory Management
Memory Manager
Isolation and Sharing
Virtual Memory
Block Allocation
Process Manager
Storage Devices
Primary Memory
13
File Management
  • Why do we need a file manager?
  • Provides an abstraction layer
  • Distribution of information across networks

14
OS Implementation Considerations Mechanisms
  • Considerations
  • Performance
  • Exclusive Use of Resources
  • Mechanisms
  • Processor Modes
  • Kernels
  • Methods of Invoking Service

15
Performance
  • OS provides simplified programming interfaces
  • Manage resource allocation sharing
  • OS designers need to keep in mind
  • What is the cost? Efficiency vs. Convenience
  • How much do these abstractions slow down the
    execution of a program?
  • What is the performance cost of using files
    rather than commands to directly manipulate
    storage devices?
  • How much contribution to functionality of the
    system is derived versus the impact to
    performance?

16
Exclusive Use of Resources
  • Multiprogrammed systems support multiple
    processes and threads that need to share
    resources.
  • Design Principles
  • Do not to interfere with other processes
  • Cannot use a resource unless it is specifically
    authorized to
  • Allow both exclusive control to a process / or
    shared among a set of processes

17
Exclusive Use of Resources
  • Implementation of Design Principles includes
  • Protection Mechanisms via security policies
  • Defines strategies for managing resources
  • File Protection Policy Example
  • If OS enforces a policy, how do we prevent
    application software from overriding this policy?
  • Trusted vs. Untrusted software and access
    barriers
  • The kernel of the OS is trusted software
  • All other software is untrusted

18
Processor Modes
  • The key hardware element for implementation of
    trusted software
  • Mode Bit (supervisor or user)
  • Supervisor (privileged, protected)
  • Processor can execute every instruction
  • User
  • Processor can execute only a subset of all
    instructions

19
Kernels
  • What is a kernel?
  • Design Decisions for what goes into the kernel?
  • Everything but the kitchen sink?
  • If it is in the kernel, it will have access to
    other parts of the kernel.
  • If it is executed in user mode, it wont have
    access to kernel data structures.

20
Requesting Services from the OS
  • Techniques to request service
  • System Call
  • User invokes a trap instruction
  • Message Passing
  • User constructs a message that requests service

21
System Call
  • User invokes trap instruction when application
    calls stub program (uses reference to trap table)
  • Processor is switched to supervisor mode
  • Branches through trap table
  • Executes function to be invoked
  • OS finishes work and returns to user mode and
    returns control to user process.

Call ()
trap
return ()
22
Message Passing
  • Message constructed that requests service
    (message A)
  • OS send() system call passes the message to
    trusted OS process (kernel).
  • Executes trap
  • Kernel executes function while user waits for
    result of service request. (message receive A)
  • Kernel completes request it sends message B back
    to user process (send and receive B).

send (, A, )receive (, B, )
send/receive
receive (, A, )send (, B, )
23
Logical Organization of OS
Process, Thread and Resource Manager
File Manager
Memory Manager
Device Manager
Processor(s)
Main Memory
Device(s)
24
Kernels of Today
  • UNIX
  • Windows NT

25
UNIX
  • Goals
  • Implement process, memory, file and device
    management in the kernel but only with minimal
    functionality to support a broad range of
    policies (bare essentials to read and write byte
    streams)
  • Wanted to keep kernel as small as possible to
    improve efficiency
  • Tailored further by use of application domains
    and application software to solve problems
  • Result
  • Very large software module including all managers
    (process, memory, file and device)
  • Separate device drivers from kernel
  • Evolved from swapping systems to paging
  • Processing now addresses multiprocessor and
    distributed hardware configurations
  • Implementations are difficult to modify
  • IEEE POSIX.1 open systems standard
  • No cost implementation LINUX

26
WINDOWS
  • Goals
  • Extensible
  • Portable
  • Reliable
  • Secure

27
Summary
  • Value of functionality built into the OS must
    justify the performance cost
  • Modern OS includes managers for processes and
    resources including managers for memory, files,
    and devices
  • Implementation techniques include the mode bit
    (supervisor/user) to ensure exclusive use of
    resources and to operate as trusted, system call
    interfaces and message passing mechanisms

28
Research
  • Here are some sites of interest on new and
    innovative advances in Operating Systems
  • http//tunes.org/Review/OSes.html
  • http//www.palmsource.com/palmos/ PalmOS Cobalt
    6.1 is the next generation of Palm OS. It will
    enable the creation of new categories of devices
    for the communications, enterprise, education and
    entertainment markets. Palm OS Cobalt 6.1
    provides integrated telephony features, support
    for WiFi and Bluetooth, and enhancements to the
    user interface.
  • http//www.pdos.lcs.mit.edu/exo.html MITs AEGIS
    no runtime kernel, extreme performance gain
  • http//www.cs.utah.edu/flux/ Flux Project at
    University of Utah build your own OS using OS
    bricks (an OS toolkit)
  • http//srg.cs.uiuc.edu/2k/ 2K (formerly known as
    SPINE) is a distributed, reflective,
    component-based, adaptable operating system being
    built by researchers at the Systems Software
    Research Group from the University of Illinois at
    Urbana-Champaign and the Systems and
    Communications Group from the Universidad Carlos
    III - Madrid.
  • http//www.acm.uiuc.edu/sigops/roll_your_own/
    write your own OS

29
Questions
  • You should be able to answer the following
    questions about this chapter
  • 1. What is multiprogramming?
  • 2. What are the four main managers in an OS and
    how do they interact?
  • 3. What are the benefits to having an independent
    and dependent part of the device manager?
  • 4. What is a process? What is a thread?
  • 5. What are important considerations of a process
    manager?
  • 6. What is virtual memory?
  • 7. Why do we need a file manager? How is it
    useful?
  • 8. What are OS implementation considerations?
    What are the mechanisms we can use to implement
    these considerations?
  • 9. If OS enforces a policy, how do we prevent
    application software from overriding this policy?
  • 10. What are the two techniques to request
    service? How do they work?

30
Sources
  • Nutt, G. Operating Systems, 3rd Edition. Addison
    Wesley. 2004
  • http//tunes.org/Review/OSes.html
  • http//www.palmsource.com/palmos
  • http//www.pdos.lcs.mit.edu/exo.html
  • http//www.cs.utah.edu/flux/
  • http//srg.cs.uiuc.edu/2k/
  • http//www.acm.uiuc.edu/sigops/roll_your_own/
Write a Comment
User Comments (0)
About PowerShow.com