上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec8

OPERATING SYSTEMS 1 龚玲 lgong@sjtu.edu.cn
OPERATING SYSTEMS 龚玲 lgong@sjtu.edu.cn 1

REVIEW o Communication in Client-Server Systems o http://wenku.baidu.com/course/study/77fldcccda38376ba flfae94#665ea0c7aa00b52acfc7ca94
REVIEW Communication in Client-Server Systems http://wenku.baidu.com/course/study/77f1dcccda38376ba f1fae94#665ea0c7aa00b52acfc7ca94

CHAPTER 4:THREADS Operating System Concepts with Java-7th Edition,Nov 15,2006 Silberschatz,Galvin and Gagne 2007
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 CHAPTER 4: THREADS

CHAPTER 4:THREADS o Overview o Multithreading Models o Threading Issues o Pthreads o Windows XP Threads o Linux Threads o Java Threads
CHAPTER 4: THREADS Overview Multithreading Models Threading Issues Pthreads Windows XP Threads Linux Threads Java Threads

GOALS FOR TODAY o Why introduce thread? o What is the concept of thread?
GOALS FOR TODAY Why introduce thread? What is the concept of thread?

MOTIVATION APPLICATION EXAMPLES o Air ticketing system:dealing with several requests from the ticket windows at the same time. o Database software:dealing with several data requests from the clients. Operating system:dealing with multi requests for reading disk from several users. o Same situation:multi requests based on same data sections o Please design your solutions using process model and analyze the performance of your solutions
MOTIVATION APPLICATION EXAMPLES Air ticketing system: dealing with several requests from the ticket windows at the same time. Database software: dealing with several data requests from the clients. Operating system: dealing with multi requests for reading disk from several users. Same situation: multi requests based on same data sections Please design your solutions using process model and analyze the performance of your solutions

SOLUTION 1: o Use one process to deal with all the requests in order o Shortcomings: long waiting slow response lack of efficiency
SOLUTION 1: Use one process to deal with all the requests in order Shortcomings: long waiting slow response lack of efficiency

SOLUTION 2: o Use one process to deal with all the requests concurrently o Shortcomings: Increase the process's burden and complexity very hard to implement
SOLUTION 2: Use one process to deal with all the requests concurrently Shortcomings: Increase the process’s burden and complexity very hard to implement

SOLUTION 3: use several independent processes,each one handles one request o Shortcomings: need a lot of processes which use the same resource build the processes frequently switch the processes frequently huge overhead o Analysis the management information of the processes are similar the works of switching between the processes are similar
SOLUTION 3: use several independent processes, each one handles one request Shortcomings: need a lot of processes which use the same resource build the processes frequently switch the processes frequently huge overhead Analysis the management information of the processes are similar the works of switching between the processes are similar

NEW SOLUTION o deal with requests concurrently (avoid shortcomings of solution 1) o OS should take charge of the management (avoid shortcomings of solution 2) o low overhead(avoid shortcomings of solution 3)
NEW SOLUTION deal with requests concurrently (avoid shortcomings of solution 1) OS should take charge of the management (avoid shortcomings of solution 2) low overhead(avoid shortcomings of solution 3)
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec7.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec6.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec5.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-process_Lec4.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Process Synchronization_Lec14.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Process Synchronization_Lec13.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Process Synchronization_Lec12.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec24_Review.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec24_DISK MANAGEMENT AND I/O.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec23_file system implementation.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec22_file system implementation.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec21_file system interface.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec20_virtual memory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec19_virtual memory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec18_mainmemory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec17_mainmemory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Lec16_mainmemory.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Introduction_Lec3.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Introduction_Lec2.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-Introduction_Lec1.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-semaphore EXERCISES.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-OPERATING SYSTEMS(LINUX SYSTEM CALLS).pdf
- 上海交通大学:《操作系统 Operating System》课程教学资源(课件讲稿)OS-thread.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java Introduction.docx
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec1.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec2.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec3.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec4.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec5.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java Primer.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java多线程应用实例(制作烟花效果).doc
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java多线程编程.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)JAVA多线程编程详解(详细操作例子).doc
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java学习笔记(JAVA的面向对象编程——课堂笔记).doc
- 上海交通大学:《操作系统 Operating System》课程教学资料_管程.docx
- 上海交通大学:《操作系统 Operating System》课程教学资料_往年试卷.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture01.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture02.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture03 CONDITIONALS AND SEQUENCES Strings, lists and file objects.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture04 MODULAR PROGRAMMING Functions.pdf