OPERATING SYSTEM SUPPORT - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

OPERATING SYSTEM SUPPORT

Description:

the protected domain in which threads exe. Thread. the OS abstraction of an activity ... the execution environment. Cheap concurrency. Parallel multiprocessors ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 29
Provided by: larryh76
Category:

less

Transcript and Presenter's Notes

Title: OPERATING SYSTEM SUPPORT


1
OPERATING SYSTEM SUPPORT
  • DISTRIBUTED SYSTEMS
  • CHAPTER 6
  • Lawrence Heyman
  • July 8, 2002

2
CONTENTS
  1. INTRODUCTION
  2. THE OPERATING SYSTEM LAYER
  3. PROTECTION
  4. PROCESSES AND THREADS
  5. COMMUNICATION AND INVOCATION
  6. OPERATING SYSTEM ARCHITECTURE
  7. SUMMARY

3
OPERATING SYSTEM SUPPORT
  • Important aspect of DS is resource sharing
  • Client applications invoke operations
  • Middleware provides remote invocations between
    processes at nodes of DS
  • OS is layer below middleware
  • OS supports middleware at nodes of a DS
  • encapsulation
  • protection
  • invocation

4
TASK OF OS
  • Provide abstraction of physical resources
  • Processors
  • Memory
  • Communications
  • Storage media
  • System call interface
  • Files rather than data blocks
  • Sockets rather than raw network access

5
NETWORK OS vs DISTRIBUTED OS
  • Multiple system images
  • Autonomous nodes
  • Remote login
  • rlogin telnet
  • Control at own node
  • User scheduling
  • Single system image
  • Not autonomous
  • OS controls all nodes
  • Transparent access

6
REASONS AGAINST DS
  • Investment in current application software
  • Preference for autonomy
  • Combination of Middleware and Network offers
    balance

7
WHAT DOES OS PROVIDE?
  • OS running at a node provides abstractions of
    local hardware resourse
  • Middleware uses these resources for remote
    invocations at the nodes
  • Kernel and server processes manage resources and
    provide client interface
  • Clients access resources

8
PROTECTION
  • Problems
  • malicious code, bugs
  • unanticipated behavior
  • illegitimate access
  • Solutions
  • use of type-safe language
  • hardware support at kernel level
  • Price is speed

9
OS COMPONENTS
  • Process manager
  • Thread manager
  • Communications manager
  • Memory manager
  • Supervisor

10
PROCESSES THREADS
  • Process
  • an execution environment with one or more threads
  • Execution Environment
  • unit of resource management
  • local kernel-managed resources
  • to which threads have access
  • the protected domain in which threads exe
  • Thread
  • the OS abstraction of an activity

11
PROCESS CREATION
  • Creation of execution environment
  • Address space
  • Initialized contents
  • Transparent to user
  • Choice of target host node is policy decision
  • transfer policy
  • location policy
  • sender-initiated
  • receiver-initiated
  • migration

12
ADVANTAGES OF THREADS
  • dynamically created and destroyed
  • maximize concurrent execution
  • maximize throughput (rps)
  • overlap of computation with input/output
  • concurrent processing on multiprocessors
  • reduces bottlenecks

13
MULTI-THREAD SERVERARCHITECTURES
  • Worker-pool
  • Thread-per-request
  • Thread-per-connection
  • Thread-per-object
  • ( Various hybrids also possible )

14
WORKER-POOL
15
THREAD-PER-REQUEST
16
THREAD-PER-CONNECTION
17
THREAD-PER-OBJECT
18
THREADS vs MULTIPLE PROCESSES
  1. Switching to different thread within process
    cheaper than switching to thread in 2nd process
  2. Threads within process may share resources and
    data efficiently compared to separate processes
  3. Creating new thread within process is cheaper
    than creating new process
  4. Threads within a process not protected from one
    another

19
THREADS PROGRAMMING
  • Threads programming is concurrent
  • C - threads library
  • Java methods
  • Threads Lifetimes
  • New thread created in SUSPENDED state
  • Made RUNNABLE with start()
  • Executes on run() method
  • Ends on return from run() or destroy()
  • Threads groups
  • Assigned at creation
  • Security

20
THREADS PROGRAMMING 2
  • Threads Synchronization
  • Local variables are private (private stack)
  • Synchronized through monitor construct so only
    one thread can execute at a time
  • in Queue class
  • in Object class
  • Threads Scheduling
  • Preemptive
  • Non-preemptive

21
THREADS PROGRAMMING 3
  • Threads Implementation
  • Many kernel-level implementations (NT, Solaris)
    are multi-level
  • Creation and management system calls
  • Schedule threads individually
  • Threads run-time library
  • Organizes multi-threaded processes
  • Linked to user-level applications
  • Kernel not involved here

22
THREADS PROGRAMMING 4
  • User-level threads
  • Advantages over kernel-level threads
  • Disadvantages without kernel support
  • Combining user-level and kernel-level enables
    user-level code provide scheduling hints to
    kernels thread scheduler
  • Advantages
  • Disadvantage

23
HIERARCHALEVENT-LEVEL SCHEDULING
  • User-level scheduler requires kernel to notify it
    of scheduling-relevant events
  • Each application process contains user-level
    scheduler
  • manages threads in that process
  • Kernel allocates virtual processors
  • application requirements
  • priority
  • total demand

24
ASSIGNMENT OF VIRTUAL PROCESSORS
25
TYPES OF EVENTS
  • Scheduler Activation call from kernel notifies
    process scheduler of an event
  • Virtual Processor Added (ready thread)
  • SA blocked
  • SA unblocked
  • SA preempted
  • Advantages
  • allocation based on user-level priorities
  • kernel does not influence user-level schedulers
    behavior

26
EVENTS SCHEDULING
27
SUMMARY
  • OS Support of middleware
  • Implementing of resource management policy
  • Encapsulation and protection of resources
  • Allows concurrent sharing of resources
  • Processes
  • Execution environment
  • Address space
  • Communication interfaces
  • Local resources, i.e., semaphores
  • Threads kernel-level user-level
  • Share the execution environment
  • Cheap concurrency
  • Parallel multiprocessors

28
THE END
Write a Comment
User Comments (0)
About PowerShow.com