Download Systems II

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

CP/M wikipedia , lookup

VS/9 wikipedia , lookup

DNIX wikipedia , lookup

Security-focused operating system wikipedia , lookup

Unix security wikipedia , lookup

Distributed operating system wikipedia , lookup

Burroughs MCP wikipedia , lookup

Process management (computing) wikipedia , lookup

Transcript
Systems II
San Pham
CS 490
10/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.
2.
3.
4.
Process state – new, ready, running…
Program counter – address of next
instruction to be executed
CPU registers – registers which varies in
number and type, condition code, index
register, stack pointer
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, 6th edition.
Wiley: 2003.