Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002."— Presentation transcript:

1

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

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

4 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

5 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

6 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

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

8 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

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

10 OS COMPONENTS Process manager Thread manager Communications manager Memory manager Supervisor

11 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

12 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

13 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

14 MULTI-THREAD SERVER ARCHITECTURES 1.Worker-pool 2.Thread-per-request 3.Thread-per-connection 4.Thread-per-object ( Various hybrids also possible )

15 WORKER-POOL

16 THREAD-PER-REQUEST

17 THREAD-PER-CONNECTION

18 THREAD-PER-OBJECT

19 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

20 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

21 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

22 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

23 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 kernel’s thread scheduler –Advantages –Disadvantage THREADS PROGRAMMING #4

24 HIERARCHAL EVENT-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

25 ASSIGNMENT OF VIRTUAL PROCESSORS

26 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 scheduler’s behavior

27 EVENTS SCHEDULING

28 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

29 THE END


Download ppt "OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002."

Similar presentations


Ads by Google