80 likes | 211 Views
CGS 3763 Operating Systems Concepts Spring 2013. Dan C. Marinescu Office: HEC 304 Office hours: M- Wd 11:30 - 12:30 A M. Last time: Pthreads Java threads CPU scheduling Today: Answers to student question from past week CPU Scheduling Next time Midterm
E N D
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11:30 - 12:30 AM
Last time: Pthreads Java threads CPU scheduling Today: Answers to student question from past week CPU Scheduling Next time Midterm Reading assignments Chapter 5 of the textbook Lecture 20 – Friday, February 22, 2013 Lecture 20
Student questions from week 6 lectures • Feb 11th Monday: • Which process is faster message passing or shared memory? What are the advantages and disadvantages between message passing and shared memory? • What is an example of a trusted intermediary? • Is a thin client like a workstation computer in an office with an active directory? • What is the relationship between the intermediary and the thin client? • What is an everyday example of the three-way handshake? Lecture 20
Student questions from week 6 lectures • Feb 13th Wednesday: • Little and Big endian are probably the most confusing concepts. Are there different situations that the little or big endian system would be used? What kind of system uses each? • What purpose does marshaling and unmarshaling serve? • In what situation would you use unstructured peer-to-peer networks? Give an example. • What are stubs? Where are they located and what do they do? • How do we manage so many threads with so little amount of memory? Lecture 20
Student questions from week 6 lectures • Feb 15th Friday: • Confusion on Physical, Data-link, network, transport, application layers. • Where does multithreading occur? Lecture 20
Metrics and objectives of scheduling policies • Two types of systems • Batch processing of jobs • Interactive, e.g., transaction processing systems • The metrics • Utilization ratio of useful time versus total time • Throughput number of transactions or jobs per unit of time • Turn around time the time it takes to complete a job • Response time the time to get a response at a request • Waiting time the time a job or a transaction has to wait before being processed • The objectives • Maximize: CPU utilization and Throughput • Minimize: Turn around time, Response time, Waiting time • The objectives can be contradictory!! Lecture 20
Scheduling policies First-Come First-Serve (FCFS) Shortest Job First (SJF) Round Robin (RR) Priority scheduling Lecture 20
First-Come First-Served (FCFS) P1 P2 P3 0 24 27 30 ThreadBurst Time P1 24 P2 3 P3 3 Processes arrive in the order: P1P2P3 Gantt Chart for the schedule: Waiting time for P1 = 0; P2 = 24; P3 = 27 Average waiting time: (0 + 24 + 27)/3 = 17 Convoy effectshort process behind long process Lecture 20