operating system/2 warp shawn ortiz john mcaveney andrew bates paul graf kevin tougher

44
Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Upload: warren-potter

Post on 31-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Operating System/2 Warp

Shawn Ortiz

John McAveney

Andrew Bates

Paul Graf

Kevin Tougher

Page 2: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

History of OS/2

• Developed by IBM in collaboration with Microsoft– OS/2 originally developed to take the place of DOS

– Wanted to build an OS with multitasking

• 1987 OS/2 1.00– 1st OS with built in multitasking based on hardware

support for a PC

– One program displayed on screen at a time, others running in the background

– command line interface

Page 3: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

History of OS/2 continued

• 1988 OS/2 1.10 Standard Edition– Graphical User Interface

– Supported FAT hard drives

• 1988 OS/2 1.10 Extended Edition– Database Manager and Communications Manager

• 1989 OS/2 1.20 SE and EE– High Performance File System

Page 4: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

History of OS/2 continued

• 1990 IBM and Microsoft split– IBM took control of all OS/2 versions 1.X and OS/2 2.00

– Microsoft continued development of Windows and OS/2 3.00, which it renamed Windows NT

• 1991 OS/2 1.30 SE and EE– More device drivers

– More fonts

– Improved swapping algorithm to enhance performance

Page 5: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

History of OS/2 continued

• 1992 OS/2 2.00– 1st true 32 bit operating system for the PC

– Virtual DOS Machines

– Workplace Shell: Object Oriented User Interface

• 1993 OS/2 2.11– For users with Windows 3.1 already installed

– Used existing version of Windows 3.1 to run Windows programs

Page 6: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

History of OS/2 continued

• 1994 OS/2 Warp 3– 1st OS for the PC with Internet support built in

• Web Explorer, Ultimail, Graphical and Textual FTP

• 1995 OS/2 Warp Connect– Combined features of Warp 3 with network connectivity

and tools

• 1996 OS/2 Warp Server– Combined Warp 3 with IBM’s LAN Server 4.0 product

Page 7: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

History of OS/2 continued

• 1996 OS/2 Warp 4– VoiceType Navigation

• Requires no additional software

– Built in Java• Requires no additional software

– IBM calls it “Universal Client” because of unparalleled network connectivity.

• Able to connect to LAN Server, Warp Server, Windows NT Server, Novell NetWare, Windows 95, Warp Connect, FTP, SLIP, PPP, NetBIOS and many more

Page 8: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Some Commercial Users of OS/2

• AT&T• First Union Bank• Wal-Mart• Audi• Toyota• Mitsubishi• Sony• Starbucks

• Sprint• Nations Bank• USMC• US Navy• GEICO• Ford• FAA• Delta Airlines

Page 9: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Task Scheduling

• Task management or scheduling is one of the primary functions of the OS/2 Warp operating system.

• The OS/2 kernel manages the execution of all tasks running on the system.

• The scheduler allocates CPU time to each process based on its priority and whether it is capable of running or not.

Page 10: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Characteristics of the OS/2 Warp Operating System:

• Priority Based Multitasking System• Dynamic• Preemptive• Uses Round-robin Scheduling

Page 11: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Priority Based Multitasking System

• OS/2 Warp supports user-level prioritization. • In the OS/2 Warp operating system, each task is

assigned a priority. • The priority of each task can be determined

directly by the programmer, or, if no priority is assigned, the operating system assigns a default priority.

Page 12: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Priority Based Multitasking System (cont.)

• Programs that have higher priorities, and are ready to run, are given access to the processor before programs with lower priorities.

• All other tasks must wait until the higher priority task becomes blocked before they may have CPU time.

Page 13: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Priority Levels

• OS/2 Warp supports 128 priority levels. • These are divided into four classes, each with 32

sublevels. • The priority values within the sublevels range

from 0 – 31, with higher numbers representing higher priorities.

• Threads are also grouped into priority classes.

Page 14: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Priority Classes

The four priority classes that determine how the

processor schedules a thread’s execution are, ranked

from highest to lowest priority:

1. Time-critical (priority 3)

2. Server (priority 4)

3. Regular (priority 2)

4. Idle-time (priority 1)

Page 15: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Time-critical (Priority 3)

• Programs that need to have access to the CPU very quickly

• Time critical tasks take a very small portion of the CPU's time. Even after all time critical tasks receive all the CPU time they require, there is still plenty of time left for all the other tasks running on the computer. Examples:

– Communication and Networking tasks– Real-time robotics applications

Page 16: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Server (Priority 4)

• Server class programs are used by Warp Server.

Example:– Used to process requests for data by client

workstations and to get the data requested ready to transfer across the network.

– Processing these types of tasks at the Server class ensures that administrative tasks such as creating new user IDs do not interfere with them.

Page 17: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Regular (Priority 2)

• This is the default priority class assigned to tasks when the programmer hasn’t directly specified a priority.

• The Regular class is the priority class in which most application programs run.

Page 18: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Idle-time (Priority 1)

• When a task is assigned an Idle-time priority, it only receives CPU time after all other higher priority tasks have become blocked.

• Most of the time the processor is doing very little, if anything, so there is lots of time for idle class programs to run.

Page 19: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Scheduling Thread Execution

To schedule a thread’s execution:

1. The system first checks the thread’s priority class.

2. The system then checks the priority value that was assigned to that thread.

3. The thread with the higher priority will then be executed.

Page 20: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Round-robin Scheduling

• Because many tasks will run at the same priority level, round-robin scheduling is used.

• Round-robin scheduling provides regular time slices of CPU time to tasks running at the same priority level. This limits each task to a short burst of processor time.

• When a task has taken the maximum time slice, or when a higher priority program is ready to run, the OS/2 Warp task dispatcher preempts the task and rotates to the next ready process.

Page 21: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

OS/2 Warp is Dynamic

• Each thread receives a priority when it is created (it inherits the priority of the thread that started it).

• The operating system can change the priority level of the thread based on the dynamic conditions to the user’s environment.

Page 22: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

OS/2 Warp is Dynamic (cont.)

Example: – it is possible for some lower priority tasks to suffer

starvation for CPU time.

– When a task becomes starved for CPU time, the OS/2 task scheduler can boost the priority of the starved task by one priority level to make sure each task receives at least some CPU time.

– After the task receives its time slice, it is reduced to its base priority.

Page 23: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Partitioning

• Way of dividing a single physical disk into two or more “disks”– lose some parallelism

• OS/2 Warp uses either FAT or HPFS partitioning schemes– uses FDISK to manage and create partitions

– Up to four primary partitions, and no logical partitions;

– Up to three primary partitions, and any number of logical partitions.

Page 24: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

FAT Partitioning

• block size is 512 Bytes• file sizes rounded up to the next integral block size• only allows for small hard drives, have to use

clusters to extend size of manageable drive• file sizes rounded up to nearest integral cluster

size– makes for large files

Page 25: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

FAT Partitioning (cont’d)

• directories are arranged in linear fashion– if the array gets too large, it can be a pain to

search through

• for space allocation, it finds the first available block– increases disk fragmentation

Page 26: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

The HPFS

• block size still 512 Bytes• cluster size is always equal to the physical

drive’s size, irregardless of how large it is– less wasted space

• don’t have to worry about making partitions too large

• directories are arranged in tree structure– makes searching faster and easier

Page 27: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

The HPFS (cont’d)

• space allocation

• makes sure block is physically close to it’s directory– decreases fragmentation– never reaches level that is noticeable

Page 28: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

HPFS Advantages

• longer file names (254 characters in length)• higher performance

– FAT decreases in performance as drive size goes up

• HPFS allocates sectors only– much less wasted space– much better granularity

• less fragmentation• incompatible with windows 95/98/NT/2000

– no worrying about windows messing with your files

Page 29: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

HPFS Disadvantages

• more complex• requires 300 kB of memory for code, plus

more for the cache• need third party drivers to access under

DOS and Linux • Overhead is more than made up for by

increase in performace– Especially true for large drives

Page 30: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Extended Attributes (EA)

• any extra information about a file – E.g. icon file

• allows for longer file names (>11 characters)• HPFS contains native support for EA, FAT does

not• For FAT drives, OS/2 stores EA in one file in the

root directory– WP ROOT.SF– Conatins all EA for all files on the drive that need it

• Can get rather large

Page 31: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Memory Management

• Dividing up user memory to accommodate for multiple processes - multiprogramming

• Effective memory management essential for efficient processor utilization (ex. processor blocking on I/O)

Page 32: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Use of Virtual Memory

• Most modern multiprogramming environments (including OS/2 Warp) utilize Virtual Memory

Virtual Memory - memory allocated on a separate disk

• Two techniques using VM - segmentation and paging

Page 33: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Paging

• Static partitions of main memory into small chunks (page frames)

• Process chunks (pages) are stored onto page frames• OS/2 default page size - 4KB• Use of page table maps page to specific page frame

- allows for multiple page frames for one process

Page 34: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Paging with Swapping

• OS/2 carries out paging using swapping• Swapping - allows the use of some other disk file as an

extension of main memory• Why? - OS/2 (as do most multiprogramming environments)

needs more memory than is physically in main memory• Result - OS/2’s page table now must know whereabouts of

each page (physically in memory or not)• Page faults occur when a page not in main memory is

requested - process blocks temporarily

Page 35: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Paging with Swapping (contd..)

• OS/2’s use of process swapping increases flexibility

• Too much swapping - thrashing• Thrashing - processor spends majority of time

swapping memory• Thrashing causes your machine to slow to a crawl• Memory MISManagement of OS/2 Warp?

Page 36: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Segmentation

• Dynamically divides main memory into segments • Provides processes with protection - one process

cannot access the segments of another• OS/2 1.x and beyond (Intel 80286 was the first Intel

chip to implement a segment model)• OS/2 segmentation provides a segment hierarchy

ex. - which processes can perform “dangerous” operations, etc.

• Use of segment table - segment number, within segment offset

Page 37: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Segmentation(contd.)

• Segmentation was underutilized by OS/2 users:– Intel 8086 chip (predecessor to 80286) emulated

segmentation poorly- users couldn’t distinguish difference and became disillusioned

– Many 80286 applications used 8086 legacy software - did not utilize segmentation capabilities of 80286

– 80286 (OS2 1.x) limited segment size (16KB). 80386 (OS/2 2.x) broadened (4GB) segment size, but most users were using techniques other than segmentation

Page 38: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Flat Memory Model

• Memory model currently used by OS/2• Flat Memory - memory is regarded as a single

large linear address space of 4GB• Cannot disable segmentation on OS/2, only bypass

it - combine entire program (data and code) into one large segment

• Programmer must only worry about within segment offsets, no segment numbers

Page 39: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Flat Memory Model (contd.)

• Global address space - entire 4GB linear address space

• Each process has distinct process address space - threads belonging to same process also share process address space

• Process address spaces not quite 4GB - some memory used by operating system

Page 40: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Flat Memory Model (contd.)

• Mapping process address space into global address space in OS/2:

• OS/2 limits process address space to 512MB• Space above 512MB is the system region - used for

operating system resident processes

System Region

Process Address Space

0

512MB

4GB

Page 41: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Threading

• Supports preemptive multithreading• Uses 3 methods to determine priority:

– Privilege Settings

– States

– Priority Classes

Page 42: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Privilege Settings

• On 386 processors and above, there are 4 levels, or “rings”, of privilege: ring 0, 1, 2, and 3

• Determines level of access, and scheduling method

• OS/2 primarily uses ring 0 and ring 3– Ring 0 is highest level, for kernel and device drivers

– Ring 3 is lowest level, for all user applications (Word, email, etc)

• Ring 0 is cooperative, while ring 3 is preemptive

Page 43: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

States

• 3 different states: running, ready, and blocked– Running is whatever thread is executing at the time

– Ready is a thread ready to be run, but is not actually running

– Blocked is a sleeping thread, waiting for I/O or another thread

• Threads in a blocked state are not considered for execution when a thread switch occurs

Page 44: Operating System/2 Warp Shawn Ortiz John McAveney Andrew Bates Paul Graf Kevin Tougher

Priority Classes

• 4 classes: idle (I), regular (R), foreground server or fixed high (S), and time-critical (TC)– Idle threads lie in the background until nothing else is running. Example:

passive virus scanner

– Regular threads are ordinary threads. Baseline class for comparison to other classes

– Foreground server or fixed high threads are like ordinary threads, except they don’t lose priority when placed in the background

– Time-critical threads are the most important threads, and are executed before any other class of threads

• Additional value, called delta, added to each class. Value ranges from 0 to 31, and can be dynamically changed