Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Systems II San Pham CS 490 10/20/03. Topics Operating Systems Resource Management – Process Management – CPU Scheduling – Deadlock Protection/Security."— Presentation transcript:

1 Systems II San Pham CS 490 10/20/03

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

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

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

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

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

7 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

8 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

9 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

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

11 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

12 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

13 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.

14 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}

15 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

16 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

17 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

18 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.

19 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

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

21 Annoying System Threats Worms Viruses Denial of Service

22 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

23 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

24 Benefits of DS Resource Sharing Computation Speedup Reliability Communication

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

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

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

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


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

Similar presentations


Ads by Google