What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program.

Slides:



Advertisements
Similar presentations
Chapter 3 Process Description and Control
Advertisements

CAS3SH3 Midterm Review. The midterm 50 min, Friday, Feb 27 th Materials through CPU scheduling closed book, closed note Types of questions: True & False,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 5: CPU Scheduling.
Chap 5 Process Scheduling. Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU–I/O Burst Cycle – Process execution consists of a.
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Processes and Their Scheduling.
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
Thursday, June 08, 2006 The number of UNIX installations has grown to 10, with more expected. The UNIX Programmer's Manual, 2nd Edition, June, 1972.
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
Processes CSCI 444/544 Operating Systems Fall 2008.
Scheduling in Batch Systems
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Chapter 5-CPU Scheduling
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Process Concept An operating system executes a variety of programs
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
CE Operating Systems Lecture 5 Processes. Overview of lecture In this lecture we will be looking at What is a process? Structure of a process Process.
General What is an OS? What do you get when you buy an OS? What does the OS do? What are the parts of an OS? What is the kernel? What is a device.
Chapter 6: CPU Scheduling
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating Systems Examples Algorithm.
30 October Agenda for Today Introduction and purpose of the course Introduction and purpose of the course Organization of a computer system Organization.
Mid Term review CSC345.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
8-Sep Operating Systems Yasir Kiani. 8-Sep Agenda for Today Review of previous lecture Process scheduling concepts Process creation and termination.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 4: Threads.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating.
Processes – Part I Processes – Part I. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Review on OSs Upon brief introduction of OSs,
Chapter 5 Processor Scheduling Introduction Processor (CPU) scheduling is the sharing of the processor(s) among the processes in the ready queue.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Silberschatz, Galvin and Gagne  Operating System Concepts Process Concept An operating system executes a variety of programs:  Batch system.
OBJECTIVE: To learn about the various system calls. To perform the various CPU scheduling algorithms. To understand the concept of memory management schemes.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
Silberschatz and Galvin  Chapter 3:Processes Processes –State of a process, process control block, –Scheduling of processes  Long term scheduler,
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Processes. Process Concept Process Scheduling Operations on Processes Interprocess Communication Communication in Client-Server Systems.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
1 Module 5: Scheduling CPU Scheduling Scheduling Algorithms Reading: Chapter
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 8 Processes II Read Ch.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Operating System Components) These components reflect the services made available by the O.S. Process Management Memory Management I/O Device Management.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Operating System (OS) QUESTIONS AND ANSWERS
Process Management Presented By Aditya Gupta Assistant Professor
Operating Systems: A Modern Perspective, Chapter 6
Chapter 3: Processes.
Section 10: Last section! Final review.
Process management Information maintained by OS for process management
Chapter 6: CPU Scheduling
Introduction What is an operating system bootstrap
Operating System Concepts
Operating Systems Lecture 6.
So far…. Firmware identifies hardware devices present
Process & its States Lecture 5.
Mid Term review CSC345.
Chapter 5: CPU Scheduling
Operating Systems Lecture 1.
Major Topics in Operating Systems
February 5, 2004 Adrienne Noble
CSE 153 Design of Operating Systems Winter 2019
CPU Scheduling.
Chapter 5: CPU Scheduling
Presentation transcript:

What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program –Kernel

Abstract View of System Components

Important OS Features/services Process Management (CPU scheduling) Main Memory Management File Management I/O System Management Secondary Management Networking Protection System Command-Interpreter System

OS Control Structure Memory I/O File Processes Memory Tables I/O Tables File Tables Process 1 Process 2 … Process N Primary Table Process Image User data User program System stack PCB

Process State Diagram Ready Blocked Suspend NewRunning Exit release dispatch time-out event activate suspend admit wait

System call vs. System program

Dual mode operation & why ?

OS structure & Layered Approach The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface. With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers.

UNIX System Structure

Process Management Process vs. Thread creation Process scheduling Process Termination Unix process creation fork() & exec() –Identify parent vs. child How to find out process infomation

Process Control Block (PCB)

Process vs. Thread creation

Multithreading Models Many-to-One One-to-One Many-to-Many Pthread, JAVA thread, Kernel vs. User thread

CPU Switch From Process to Process

Process Scheduling Queues Job queue – set of all processes in the system. Ready queue – set of all processes residing in main memory, ready and waiting to execute. Device queues – set of processes waiting for an I/O device. Process migration between the various queues.

Representation of Process Scheduling

Schedulers Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue. Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU. Midterm scheduler

Addition of Medium Term Scheduling

Context Switch When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process. Context-switch time is overhead; the system does no useful work while switching. Time dependent on hardware support.

Process scheduling

Process scheduling Concepts Maximum CPU utilization obtained with multiprogramming CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait. CPU burst distribution Pre-emptive and none-preemptive

Scheduling Criteria CPU utilization – keep the CPU as busy as possible Throughput – # of processes that complete their execution per time unit Turnaround time – amount of time to execute a particular process (finishing time – arrival time) Waiting time – amount of time a process has been waiting in the ready queue Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)

Various scheduling algorithms FCFS SJF SRTF R-R with quantum Priority Multi-level Priority Pros and cons, different conditions (q time, starvation prevention etc.) Example of process arrival rate

Process Communication IPC & Unix IPC Client-Server –Raw socket –High-level comm (e.g. RPC, RMI, CORBA etc) –Pros & con on various mechanisms

Process Synchronization & deadlocks Critical Section Semaphore & implementation (Unix) Spin lock and sleep(wait) lock Deadlock –Mutex, hold-wait, no-preemption, circular-wait –Identify deadlock from resource allocation graph or code

Memory Management Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging Pros and cons Address translation

Pros & cons Paging vs Contiguous Hierarchical Paging vs. Hashed Page Tables vs. Inverted Page Tables

Example of address translation (segmetation)

Example of address translation

Virtual Memory

Demand paging Demand segmentation Page fault and how to handle Page replacement

File Management File structure File Attributes (FCB) directory Access method Access control

A Typical File Control Block

Virtual File System

Allocation Methods An allocation method refers to how disk blocks are allocated for files: Contiguous allocation Linked allocation Indexed allocation

I/O system I/O Hardware Application I/O Interface Kernel I/O Subsystem –Chracter vs. block –Polling vs. interupt

User program & Kernel interface Note: This picture is excerpted from Write a Linux Hardware Device Driver, Andrew O’Shauqhnessy, Unix world

Two I/O Methods Synchronous Asynchronous Pooling or interrupt

LKM What is it? Pros & cons (vs. recompile and patches)