Systems II San Pham CS 490 10/20/03. Topics Operating Systems Resource Management – Process Management – CPU Scheduling – Deadlock Protection/Security.

Slides:



Advertisements
Similar presentations
Chapter 7: Deadlocks Adapted by Donghui Zhang from the original version by Silberschatz et al.
Advertisements

Processes Management.
Topic : Process Management Lecture By: Rupinder Kaur Lecturer IT, SRS Govt. Polytechnic College for Girls,Ludhiana.
CS 149: Operating Systems February 3 Class Meeting
DEADLOCK. Contents  Principles of deadlock  Deadlock prevention  Deadlock detection.
Operating Systems: Introduction n 1. Historical Development n 2. The OS as a Resource Manager n 3. Definitions n 4. The Process.
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.
Chapter 3: CPU Scheduling
Process Description and Control Module 1.0. Major Requirements of an Operating System Interleave the execution of several processes to maximize processor.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
1/27/2010CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying an earlier version.
Final Review Monday, May 5th. Functional Components Process Manager: creates/removes processes Scheduler: allocates processes to processors Memory Manager:
OS Spring’03 Introduction Operating Systems Spring 2003.
1/23/2008CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
CSE451 Processes Spring 2001 Gary Kimura Lecture #4 April 2, 2001.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Bridge Crossing Example Traffic only in one direction. Each section.
Process Concept An operating system executes a variety of programs
Silberschatz, Galvin and Gagne  Operating System Concepts Deadlock and Starvation Deadlock – two or more processes are waiting indefinitely for.
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
Operating system Security By Murtaza K. Madraswala.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Deadlocks.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 8: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks.
SWE202 Review. Processes Process State As a process executes, it changes state – new: The process is being created – running: Instructions are being.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 7: Deadlocks.
Chapter 7 Operating Systems. Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the.
Process by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
3.1 : Resource Management Part2 :Processor Management.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Distributed System Concepts and Architectures 2.3 Services Fall 2011 Student: Fan Bai
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,
11/13/20151 Processes ICS 240: Operating Systems –William Albritton Information and Computer Sciences Department at Leeward Community College –Original.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 7: Deadlocks.
Distributed System Services Fall 2008 Siva Josyula
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock.
Review for Quiz-2 Applied Operating System Concepts Chap.s 1,2,6,7 - ECE3055b, Spring 2005.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Chapter 7: Deadlocks. 7.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 14, 2005 Chapter 7: Deadlocks The Deadlock.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Operating Systems Unit VI Deadlocks and Protection Department of Computer Science Engineering and Information Technology.
7.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 6: Deadlocks.
Process Control Management Prepared by: Dhason Operating Systems.
Introduction to operating systems What is an operating system? An operating system is a program that, from a programmer’s perspective, adds a variety of.
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Process Management Process Concept Why only the global variables?
Applied Operating System Concepts -
Lecture Topics: 11/1 Processes Process Management
Operating system Security
Process Description and Control
Intro to Processes CSSE 332 Operating Systems
Process Virtualization. Process Process is a program that has initiated its execution. A program is a passive entity; whereas a process is an active entity.
Chapter 7: Deadlocks.
Chapter 7: Deadlocks.
Processes Hank Levy 1.
Chapter 2: Operating-System Structures
Processes Hank Levy 1.
Chapter 2: Operating-System Structures
CSE 153 Design of Operating Systems Winter 2019
Presentation transcript:

Systems II San Pham CS /20/03

Topics Operating Systems Resource Management – Process Management – CPU Scheduling – Deadlock Protection/Security Distributed Systems Networking

Operating System What is an operating system? – A program that acts as an intermediary between the user of a computer and the computer hardware.

Resources OS Manages Process Management * CPU Scheduling * Main Memory File I/O-System Deadlock *

Process Management Process is a program in execution Requires certain resources to accomplish task – CPU time – Memory – Files – I/O devices

Process State New Running Waiting Ready Terminated STEPS: New->Waiting->Ready->Run->Ter

Process Control Block Each Process is represented in the OS by a PCB. A PCB contains many pieces of information about a process. The PCB simply serves as the repository for any information that may vary from process to process

PCB information 1. Process state – new, ready, running… 2. Program counter – address of next instruction to be executed 3. CPU registers – registers which varies in number and type, condition code, index register, stack pointer 4. CPU Scheduling info – process priority and pointer to scheduling queues

PCB info. Cont. 5.Memory Management info – value of base and limit registers 6.Accounting info – amount of CPU and real time used, time limits, job or process ID 7.I/O status info – list of I/O devices allocated to process

Process Scheduling As processes enter the system, they are put into a “job queue”. Resides in Main Memory

CPU Scheduling The objective is to maximize CPU utilization CPU scheduling is central to operating system design CPU selects on job to process form ready queue

Scheduling Algorithms First Come First Served (FCFS) – FIFO queue Shortest Job First (SJF)- based on CPU burst, if there is a tie, FCFS is used Priority Scheduling- Based on some fixed range of numbers, developers decide Round Robin – Time Sharing system

Deadlocks A deadlock state occurs when 2 or more processes are waiting indefinitely for an event that can be caused only by one of the waiting processes.

Deadlock Characteristics Deadlock situation can arise if the following 4 conditions hold SIMULTANEOUSLY in a system. 1. Mutual Exclusion- one resource must be held in a NONSHARABLE mode 2. Hold and Wait – P1 is holding one resource and waiting for P2 to release its resource 3. No Preemption- Resource cannot be preempted 4. Circular Wait – a SET of waiting processes {P0->P1->P2->…->Pn -> P0}

Dealing with Deadlocks Use some protocol to prevent or avoid deadlocks Allow the system to enter deadlock, detect it, and then recover Ignore the problem all together and pretend that deadlocks never occur – Note: Used by many systems, including UNIX

Protection Protection refers to a mechanism for controlling the access of programs, processes or users to the resources defined by a computer system The processes in an operating system must be protected from one another’s activities Various mechanisms can be used to ensure that the files, memory segments, CPU, and other resources can be operated on by only those processes that have gained proper authorization from the operating system

Examples of Protection Data files can be created, opened, read, written, closed, and deleted Program files can be read, written, executed and deleted Process should be able to access only those resources that it currently requires to complete its task

Security NOTE: Absolute protection of the system from malicious abuse is not possible, nonetheless there are mechanism to make security breaches a rare occurrence, rather than the norm.

Security measures Physical – site or sites containing the computer systems Human – user must be screened to have physical access Network – interception of data transmitted over public shared lines Operating System – system must protect itself from accidental or purposeful security breaches

Types of Attacks to gain access Trojan Horse Trap Doors Stack and Buffer Overflow

Annoying System Threats Worms Viruses Denial of Service

Preventive Measures Install Intrusion Detection – Types of intrusion Signature based detection – analyze network traffic pattern Anomaly detection – techniques used to detect anomalous behavior within computer systems –Not all indicates an intrusion Audit Trail Processing – for example logs Install Tripwire – integrity checking tool

Distributed Systems A distributed system is a collection of processors that DO NOT share MEMORY or CLOCK. DS is a collection of loosely coupled processors interconnected by a communication network Basically the WEB and a NETWORK

Benefits of DS Resource Sharing Computation Speedup Reliability Communication

Networking Connection of two or more computers over a shared media First developed in the late 1960s and was called the Arpanet.

Common Network Types LAN- local area network WAN - wide area network

Network Topology Fully Connected – connection from every machine, 4 machines = 6 connections Partially Connected Tree Structured Star – widely used Ring – token ring

Reference Silberschatz A., Galvin P., Gagne G.. Operating System Concepts, 6 th edition. Wiley: 2003.