Overview - JMU



OS/2

CS-450-3 Operating Systems

Section 3 Fall 2003

By

Keith Ancowitz

Brian Henderson

James Mauss

Danielle Miller

Kyle Nevins

Table of Contents

3… Introduction

3… History

4… File Management System

6… Memory Management

7… Process Management

9… Process Scheduling

10… Conclusion

11… Bibliography

13… Review Questions

14… Work Breakdown Statement

Introduction

Under great secrecy in 1981, Microsoft and IBM set out to develop an operating system, which is now known as OS/2, for the line of IBM Personal Computers (PC). Because Microsoft purchased the rights to Disk Operating System (DOS), and IBM owned microprocessors, their roles fueled the alliance between the two unlikely partners. During the 1980’s, PCs emerged as the new computing segment, where Microsoft and IBM developed OS/2 specifically for that environment. Between 1981 and 1987, DOS was on over 9 million machines and had over 10,000 applications designed for it; however, DOS is very limited in its capabilities because it is a single user and single tasking operating system. Therefore, OS/2 was developed to advance DOS technologies to provide an operating system that could have multiple users, perform multitasking and multithreading, access larger memory, while still supporting DOS. OS/2 raised the standard for operating system’s technology by developing functionality even in use today. The following is a technical analysis of the graphical user interface, process scheduling, file management, memory management, and process management systems in OS/2.

History

In the mid 1980s, IBM and Microsoft, in an attempt to replace the DOS operating system, at the time was in version 3.x, began creation of OS/2. They felt that with the release of the Intel 80286 processor there needed to be an update from the 8-bit DOS operating system. For this reason IBM and Microsoft began to build a 16-bit operating system. The initial version of OS/2 was command line based; however, both companies believed that they needed to implement a user interface that was graphics oriented and easy to use. Microsoft began to create a GUI while IBM worked on creating a kernel. However, during the creation of Warp, Microsoft was also developing Windows 3.0. The operating system gained quick popularity and after a short while Microsoft chose to abandon the OS/2 project and focus on Windows. Since IBM now needed to create their own GUI, they contacted Commodore for assistance. IBM was able to keep many of the original designs from Microsoft’s initial contribution to the project and add ideas from Commodore’s operating system called AmigaOS. Shortly after, IBM released OS/2 2.0, which was a 32-bit operating system and contained all of the functionality of Windows 3.0 with addition crash prevention. In 1993, IBM released OS/2 2.1. This had many of the same functions and the same features as 2.0. It kept the same GUI, however, with the release of Windows 3.1 IBM released OS/2 2.1 with the current version of Windows built into it. With the 2.1 release, IBM was able to convince many big software companies to create OS/2 applications. However, Microsoft, in their attempt to destroy other operating systems at the time, told companies that they would be unable to access the release of the beta version of their upcoming Windows system if the software companies created software for other operating systems. This added to the problems with OS/2 never gaining popularity. In 1994, IBM released OS/2 Warp version 3.0. It was the first operating system to be built for a PC environment with Internet support. One thing that placed Warp above Windows at the time was that it did not rely on DOS as a foundation. It maintained it’s original intent to be independent of DOS, which made it much more reliable system, however, it kept compatibility with both Windows and DOS utilities. However, despite the fact that Warp seemed to beat the competition, there were still some problems. IBM did not do a very good job marketing their product, which did not inspire customers to have confidence in the system. In addition to that, Microsoft did their best to downplay OS/2 Warp to keep the public interested in Windows only. The main problem with Warp not gaining popularity mainly lay with marketing. In 1995, IBM came out with Warp Connect, which contained all of the major networking components such as NetBIOS and TCP/IP. Around this same time Microsoft came out with a very popular operating system known as Windows 95. Despite the fact that IBM seemed to get the jump on the windows systems in terms of Internet connectivity, this did not seem to help the popularity of the Warp system. In 1996 IBM came out with OS/2 Warp 4.0, also named Merlin. The new system had a more glorified GUI window, which contained new icons as well as new object oriented programming assignments. It also included support for many programming kits such as OpenGL and the Java Virtual Machine. This system also implemented a voice control system, which allowed users to access their systems without the use of a keyboard or mouse. The problems that IBM faced by this time was that simply no one needed the functionality of Warp. Most home users were using the Windows or the Macintosh operating systems. Microsoft’s main goal for upcoming versions of OS/2 is to appeal it to eBusiness. It’s crash-proof system, a term IBM trademarked because of OS/2’s high reliability, has become very appealing to web-servers and web-based computer systems.

File Management System

The introduction of the High Performance File System greatly increased OS/2’s capabilities over its predecessor with functionalities that are still in use to this day. DOS, OS/2’s predecessor, allowed a maximum of 11 characters in the 8-dot-3 format. The file name was a maximum of 8 characters, and the file was limited to a single extension of 3 characters. HPFS allowed multiple extension of varying lengths and a maximum filename of 255 characters; therefore, files could be written in formats like this.is.my.filename (Smith, 1989). With the new types of storage media, for example CD-ROM’s, DOS’s File Allocation Tables (FAT) were not efficient enough because of the format and large amount of data used to store the non-volatile data (Duncan, 1989). HPFS also allowed for larger disk support than DOS’s 512 MB. The new standard met the requirements for future versions of OS/2 and pushed for new technology like Installable File Systems (IFS) for easier expansion and updates. In addition, file attributes were extended to accommodate information such as last modified, type of data stored, and native language for the newer capabilities provided in applications like word processors. Therefore, the OS/2 file management system uses database management system’s techniques to operate more quickly and provide records of similar files (“File System…”, 1989).

The file node (FNODE) is the structure in which the HPFS organizes data into files and directories. Each FNODE is equal to one sector, and a directory consists of four contiguous sectors of physical memory; however, a file or directory may consist of multiple FNODEs. All of the directories in the system are tree structured starting with the /root, which is given a permanent location and size (Sered, 1991). The next data structure, the B+ (binary-plus) tree, is introduced when a file grows greater than 8 sectors and a directory grows greater than 2 KB. The B+ tree is a binary tree with internal nodes that point to other nodes and external nodes that contain actual data. HPFS gains significant speed increases from the efficiency of the binary tree (Frommert, 2000).

In addition to OS/2 improvements, HPFS more efficiently stores files than FAT by intelligently storing them contiguously on the disk to limit fragmentation and deadspace. It also enhanced localization by storing files and directories closer on the disks. All of the storing improvements resulted from tracking disk allocation at the sector level, rather than FAT, which tracked at the cluster level (Strom, 1989). In response to new caching techniques, HPFS provided huge performance increases by storing the system’s entire file and directory structure in cache (Smith, 1989).

Installable File System (IFS) is one of the most advantageous functionalities in HPFS because it provides OS/2 the ability to adapt to future storage media while being backward compatible with FAT. This functionality appeared after the upgrade from FAT to HPFS as to provide adaptability for file systems to come. IFS allows OS/2 to access files stored in disk formats other than FAT and HPFS, and access to files stored in other file management systems such as a Unix machine with a Berkeley Fast File System. When initially called by a request packet from the OS/2 kernel, IFS accepts one of four input points into a 16-bit dynamic link library (DLL). The four groups are basic file manipulation, swapping, file locking, and universal naming convention. After being called, IFS performs the action specified in the request packet and either returns the necessary data or error code. Because IFS only operates in context of a caller’s process and on the caller’s thread, IFS has no process or thread of its own (Asselin, 1993).

To describe IFS in more detail, the following will be the steps in the execution of a common DOS call, DOSopen. IFS performs most of the tasks to complete the process, but requires assistance from the OS/2 kernel. The process begins when an application program issues the DOS call. With initial validation of the command parameters, the OS/2 kernel calls the file system router, and if it passes, the kernel creates the call to the appropriate IFS input point. Then with the given parameters, IFS begins to validate the call. If an error occurs, IFS immediately returns error code, but if the command passes, IFS checks cache for the requested data. On a hit, the data is returned from cache, but on a miss, IFS uses the File System Helper (FSH) as the medium between IFS and the device driver to access the requested data. FSH creates the call with the appropriate parameters to the device driver that performs the actual input/output (I/O). After the I/O, a packet is returned to IFS via the FSH, where it is again examined for errors. When the process successfully passes the IFS, the data is returned to the OS/2 kernel and then the application process where the data is validated again (Asselin, 1993).

HPFS accurately describes its function in the OS/2 file system because it provides significant speed increases over its predecessor. Both HPFS and FAT were timed while performing an XCOPY for a 5 MB file, where the FAT completed the process in 39.4 seconds, and HPFS completed the process in 21.6 seconds, an 80% increase. With building an index of 4600 records in a 2.3 MB file, the FAT completed the process in 973 seconds, while HPFS completed it in 161 seconds with an astounding increase of 504% (Smith, 1989). HPFS proved to be the faster file system but also versatile by introducing IFS to adapt to the next generation of technology.

Memory Management

The operating system OS/2 developed by IBM uses a segmentation with multilevel paging scheme. This means that a process is broken up into segments, which allow for different parts of the processes to be stored separately. These segments are then stored in physical memory with paging, which prevents the occurrence of small spaces of memory from never being used. Paging also helps with the problem of placement for a process, or in this case a segment, because memory allocation does not have to be contiguous. The OS/2 operating system allows for the size of a segment to be up to 4 GB and the number of segments per process to be up to 16 KB. The paging size of the operating system is 4 KB. If a segment uses all 4 GB at 4 KB per page the segment would need 1 million pages to fit itself in memory. Therefore, OS/2 uses a multilevel paging scheme for a segment’s page table. A multilevel paging scheme has a page directory that points to the page table which then points to the page frame that is needed. Before the page table, we must consider the segment table for a process, which keeps track of where the segments of a process are located. In OS/2, there are two segment tables, a local descriptor table (LDT) and a global descriptor (GDT) each 8 KB in size out of the 16 KB allowed for segments in each process. The LDT handles all the segments that will only be used by the process and the GDT handles all the segments that will be shared with other processes.

The logical address is made up of two parts the selector and the offset. The selector is 16 bits: 13 bits for the segment number, 1 bit to tell which table the LDT or the GDT to access, and 2 bits to deal with protection. The offset is 32 bits and tells where in the segment to look. The segment number is found in the segment table returning a segment descriptor, which is then added to the offset. The resulting number is called the linear address, which is made up of a page number of 20 bits and a page offset of 12 bits. The page number is split into the higher 10 bits for the page directory and other 10 bits for the page in the page table. The result of this is the physical page frame and the 12 bit page offset tells where in the page frame to look for the physical address (Silberschatz 2003).

The OS/2 operating system also uses demand segmentation, which is similar to demand paging. The segment table has a valid bit to specify if the segment is already in physical memory or not. If a segment is not in physical memory then a segment-fault results, which traps to the operating system and brings the needed segment into physical memory, much like a page-fault (Davis 2003). Demand segmentation allows for pages that are often referenced with each other to be brought into memory together, this decreases the number of page-faults. Another space saver would be to keep some of a segment's page tables on disk and swap them into memory when needed. The original 32 bit linear address would then contain a bit in the page directory part which would represent whether the table is in memory or on disk. If the table is on disk then the rest of the 31 bits can direct to the disk location of the table (Silberschatz 2003).

The OS/2 operating system memory model of segmentation with paging along with a demand segmentation scheme allows for both the benefits of segmentation and paging at the cost of complexity.

Process Management

SMP

SMP or Symmetric Multi-Processing is probably OS/2’s greatest advantage over Windows. It provides an exceptional testing platform for all OS/2 applications. Almost all OS/2 applications are multi-threaded and make use of multiple semaphores; therefore, many of these applications leave room for unexpected deadlocks due to timing problems and error checking. There are many scenarios where code designed on uniprocessor systems works great for that system but when transferred to a system implementing SMP it hangs up do to multiple threads making API calls from within a critical section of the kernel. Any API call from inside a critical section requests entry into DOSCALL1. The thread that owns DOSCALL1 cannot run because of exclusion required by a critical section. This leads to many deadlocked applications. There are many more such circumstances which many lead to deadlock within an SMP system that are difficult to detect in a uniprocessor system. An SMP is the definitive test and should be used along with other applications before releasing a new application.

SMP is really a hybrid between symmetric, distributed, and asymmetric processing concepts, taking the best of each. Early tests showed that running 5 programs on 4 processors yielded a 404% improvement over a single processor. It seems that even single thread applications benefit from SMP. During idle cycles the OS/2 scheduler and memory management system employ an intermediate memory swapfile concept in which a minimum of 4K page files are maintained. This will run on an idle processor in the case of a single threaded application.

Process Priority

Within OS/2 there are three priority classes for processes: time-critical, normal, and idle-time. Each class of priority has 32 levels to schedule processes. Normal processes priority levels may be adjusted by the user. OS/2 also uses two priority configurations, ABSOLUTE and DYNAMIC. The default is DYNAMIC, in this configuration OS/2 tries to determine which process needs CPU resources most at any give TIMESLICE. If OS/2 determines that a process has a lower priority than it should and it is using the DYNAMIC configuration then it will increase that processes priority level. In the ABSOLUTE configuration, the operating system uses a first-come, first-served basis.

Processes and Paging

Under OS/2 memory pages are 4K. When a process starts n Page Tables are created, each 4MB in size, containing 1024 Page Table Entries or PTE’s. These PTE’s correspond to linear addresses, up to 512MB (128 Page Tables) in the virtual address space of the process. Each PTE has a memory present bit that indicates whether or not a process is loaded into physical memory. When a process attempts to allocate memory it firsts calls DosAllocMem, which determines the number of page tables to be allocated, which depend on the size of the block to be allocated. DosAllocMem then returns a pointer to the base PTE.

When the process attempts use the allocated block of memory it tries to read/write at the PTE pointer, this causes OS/2 to commit the PTE. Next OS/2 creates a Virtual Page (VP) structure for each PTE referenced and has the PTE point to the VP. Since the PTE has not yet been loaded into physical memory, its memory present bit is still FALSE

OS/2 now tries to load the PTE into physical memory. If the memory present bit is still FALSE, it creates a page fault. If the page is present in the file cache, it is taken form there. This kind of fault is known as a soft fault because no disk I/O is necessary. If the page is not in the file cache it known as a hard fault because the page must then be read from disk. OS/2 now creates a Page Frame (PF) in physical memory and writes the contents of the page to it. The PF is then added to the process’s working set. The pointer in the VP is updated to point to the PF. A page frame can have one of three states: in-use, the PF is being used by an active process; idle, the Page Frame is being used by an idle process; free, the page has been freed from the process by a call to DosFreeMem API.

Process Scheduling

OS/2’s process scheduling system has many levels. OS/2 has the ability to set which type of scheduling the system will use. The mode for the process scheduler is one that uses priority and time slices to determine which process is sent to the processor. This mode is only used in RING 3, RING 0 uses a cooperative form of process scheduling. There are four classes of priority for the processes. There are time critical processes of which there are 32 different levels. There is the normal level of process priority of which there are also 32 different levels. The system can move processes around to different levels inside the normal level. There are also 32 different levels in the idle-time priority level. There is also a foreground server level that, again, has 32 levels. Within these levels of priority, the higher the number of the level the higher the priority. The default level of priority is regular at level 0.

Within the regular priority class, the system processes that have the same priority level are then run in a round robin fashion and only the threads that are in the ready state are considered. The standard time slice for the round robin in the regular priority class is 32 microseconds. The time-slice maximum and minimum values can be changed for the system. A thread that is in the foreground class is one that always has the same priority no matter what. This is usually used for background servers that are always running. The time critical threads that are from the time critical class have only an 8 microsecond time slice. This is because when a time critical thread moves onto the ready queue it always is given the highest priority.

The scheduling that is done in RING 0 has no time slices because it is cooperative in nature. Like the processes in RING 3 the processes in RING 0 have priority levels and classes but they also have a context. There are three context levels that limit what the RING 0 threads can do. The first type of thread is init mode. These have an initialization that runs in RING 3 and can perform IO calls so they are more abilities then normal RING 3 threads. The interrupt mode threads are reserved for driver interrupt handlers that receive information for interrupts. These have the highest priority but can still be preempted by another interrupt mode thread that has a higher IRQ number. The last mode is the kernel mode. This is the context in which drivers run.

The scheduling system that OS/2 uses allows for pre-emption of processes. When a process is pre-empted the currently executing process receives a timer “theft” that begins the pre-emption process. The switch to the preemption process form the executing program takes 10-15 nanoseconds. The preemption of the process is completed in 25 microseconds and the new process is ready to go onto the processor.

Since the action of marking the linear address pages is not able to be preempted, the system has built-in bail out points which let a higher priority process take control while storing the old processes data in the pre-empted processes stack. Since the time it takes to preempt a process in known as both a minimum time and a maximum time, this allows for a process that is closer to hard real time.

OS/2 deals with the starvation of processes by changing the priory levels of the processes. This forces the processes to finish or if they have been on the queue longer than any other process then the system will increase the priority level of that process.

Conclusion

OS/2 was a commercial and economic success because Microsoft and IBM worked in partnership with a hundred third party software companies to design new applications and manufacturers like Compaq, Tandy, and Zenith to make it a leading operating system of its day (Campbell, 1989). In addition, OS/2 was a technical success by providing more functionality and efficiency than its predecessor, DOS, as a multiple user, multitasking, and multithreading operating system, and it implemented new technologies that are even in use to this day. In conclusion, analyzing the history of OS/2 is important in order to understand the development of operating system’s technology because OS/2 significantly improved it.

Bibliography

Asselin, Andre (1993). “OS/2 Installable File Systems.” URL:



Campbell, John L. (1988). Inside OS/2 : The Complete Programmer's Reference. Blue

Ridge Summit, PA: Tab Books. ISBN 0830613196.

Davis, Ernest (2003). "Demand Segmentation." URL:



Duncan, Ray (1989). “Comparing DOS and OS-2 file systems.” PC Magazine., v8 n3

p321(6).

EDM/2 (1997). "OS/2’s Symmetrical Multiprocessing Demystified." URL:



“File-system upgrade among future OS-2 features.” (1989) PC Week., v6 n1

p30(1).

Frommert, Hartmut (2000). “HPFS.” URL:



Les, Bell (1998). "Memory Management." URL:

?

OpenDocument

M2 Technologies (2001). "The Life Cycle of a Memory Page in OS/2." URL:



Sered, Yishai (1991). “Accessing HPFS file from MS-DOS.” Tech Specialists., v2 n7

p27(10).

Silberschatz, Abraham; Galvin, Peter; & Gagne, Greg (2003). Operating System

Concepts: Sixth Edition. Windows XP Update. New York, NY: John Wiley &

Sons.

Smith, Gina (1989). “New OS-2 file system swift, compatible: some tasks 500% faster,

tests show.” PC Week., v6 n24 p1(2).

Strom, David (1989). “New file system in OS-2 1.2 beats FAT hands-down.” PC Week.,

v6 n25 p29(2).

Tabi, Timur().“High Resolution Timing Under OS/2” URL:



Waldrom, Ted (1997). “Os/2’s Symmetric Multiprocessing Demystified” URL:



Review Questions

1.) What is the name of the file system introduced in OS/2 version 1.2?

a. File Allocation Table (FAT)

b. Installable File System (IFS)

c. High Performance File System (HPFS)

d. Disk Operation System (DOS)

2.) What memory scheme does OS/2 use?

a. paging

b. demand paging

c. segmentation

d. segmentation with paging

3.) With what company did IBM originally begin creation of OS/2?

a.   Macintosh

b.   Microsoft

b. Commodore

d. AT&T

4.) What does SMP stand for?

a. Super Memory Processing

b. Symmetric Multiprocessing

c. Shared Memory Multi Processors

d. Single Memory Processor

5.) What kind of scheduling does the RING 3 mode use?

a. First Come First Serve

b. Round Robin

c. Priority and Round Robin

d. The Truffle Shuffle

Work Breakdown Statement

|Sections |Student Name |

|Introduction |Keith Ancowitz |

|History |Kyle Nevins |

|File Management System |Keith Ancowitz |

|Memory Management |Danielle Miller |

|Process Management |Brian Henderson |

|Scheduling |James Mauss |

|Conclusion |Keith Ancowitz |

Keith Ancowitz ____________________________________

Brian Henderson ____________________________________

James Mauss ____________________________________

Danielle Miller ____________________________________

Kyle Nevins ____________________________________

-----------------------

13 1 2 32

Segment Table

Page offset

Page Number

Page Directory

Page Table

Page Frame

Selector

Offset

+

Linear Address

Physical Address

10 10 12

modified Figure 9.21 from Silberschatz (2003)

Page offset

Page Number

Linear Address

1 9 10 12

Invalid bit

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download