Download OS/2 API

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

MS-DOS wikipedia , lookup

Acorn MOS wikipedia , lookup

RSTS/E wikipedia , lookup

Distributed operating system wikipedia , lookup

Unix security wikipedia , lookup

Process management (computing) wikipedia , lookup

OS/2 wikipedia , lookup

Copland (operating system) wikipedia , lookup

Burroughs MCP wikipedia , lookup

DOS wikipedia , lookup

VS/9 wikipedia , lookup

Spring (operating system) wikipedia , lookup

Library (computing) wikipedia , lookup

DR-DOS wikipedia , lookup

CP/M wikipedia , lookup

Paging wikipedia , lookup

Transcript
INTRODUCTION
• OS/2 was initially designed to extend the capabilities
of DOS by IBM and Microsoft Corporations.
• To create a single industry-standard operating system.
• Initially the OS/2 was developed from the MT-DOS and
DOS 3.2 source code bases and did not include the
Presentation Manager (PM) GUI. The later versions
included the PM
• Designed to support radical changes in hardware, from
older 8- or 16-bit microprocessors to new high-powered 32bit processors.
1
REQUIREMENTS TO DEVELOP OS/2
• Break the 640KB physical memory barrier and support up
to 16MB of physical memory
• Make use of Virtual Memory to extend the Physical
Memory resource of a system
• To provide a protected Multitasking environment
• Provide an extendible, flexible system Application
Program Interface (API)
• Provide a Graphical User Interface (GUI)
• Support DOS application binary compatibility to
encourage migration from DOS to OS/2.
2
SYSTEM STRUCTURE
6
1 - Hardware
5
4
2 - Device Drivers
3
3 - OS/2 Kernel
2
4 - Dynamic Link Libraries
1
5 - OS/2 API
6 - User Shell / Desktop
Manager
7 - Application Programs
8 - Utilities
7
8
Figure 1
3
SYSTEM STRUCTURE - contd
•The OS/2 system is composed of the kernel, device drivers,
dynamic link libraries, and applications programs.
•As in DOS, the OS/2 kernel uses device drivers to access the
system’s hardware resources.
•The most critical portions of the operating system, such as
multitasking, memory management, inter-process
communication, DOS compatibility, and I/O reside in the
kernel.
•Many of the system’s API is located in the kernel, but some
of them are located in the dynamic link libraries – shared
libraries that can be used to extend the functionality of the
system.
4
MULTITASKING
•The OS/2 multitasking architecture provides the capability
to execute programs concurrently in a protected environment.
•The model consists of a hierarchy of multitasking objects
called sessions, processes, and threads.
•OS/2 is a preemptive, priority based, multitasking system.
•The scheduler implements a multilevel priority scheme with
dynamic priority variation and round-robin scheduling
within a priority level.
•OS/2 is interrupt driven to allow the processor to be used
while I/O is occurring.
•The 32-bit OS/2 system supports up to 4095 processes and
threads
5
MEMORY MANAGEMENT
• OS/2’s virtual memory model provides 4-gigabyte addressing
•The large 32-bit memory model frees the application developer from the
memory constraints of the 16-bit segmented model.
•The 32-bit paging model achieves better utilization of memory and
higher performance.
•The flat model is easily portable to most processor architectures
• Two forms of protection - Protection is among the processes in the
system and isolation of the system from the user processes.
•The memory management component of the system is responsible for
allocating process virtual address spaces and for setting up the required
hardware structures to enable processes to be protected from one another
and from the system.
•OS/2 provides functions for object allocation, deallocation, and sharing.
6
DYNAMIC LINKING
• Dynamic linking allows the binding of code and data
references to be delayed until the program is actually loaded
or until the program specifically requests the operating
system to link dynamically to a dynamic link library (DLL).
•Two types of dynamic linking - load-time dynamic linking,
and run-time dynamic linking.
•There are two executable modes in OS/2 environment: EXE
modules for programs and DLL modules containing shared
libraries.
•Dynamic linking is a powerful mechanism for providing
linkages to shared code and data objects in a multitasking
virtual memory environment.
7
I/O
• OS/2 can be categorized in two categories: system I/O and user I/O.
•Processes use system I/O to perform file level; I/O to secondary storage
devices managed by the file systems.
•Processes utilize user I/O to interact with the user by employing keyboard,
display, and mouse.
•OS/2 supports the FAT file system used by DOS, and consequently can
read and write DOS files.
•OS/2 provides an alternative file system, called the High Performance
File System (HPFS) to support many concurrent I/O requests from
different processes on large block devices.
•OS/2 has an installable file system (IFS) to provide an architecture in
which programs are transparent to the type of file system.
•Device drivers run in the most privileged execution state, privilege level 0
8
PAGING
• The paging feature is not only used to support the flat model
and multiple DOS address spaces, but also to allow OS/2 to
provide memory overcommitment.
•The storage can be virtualized on fixed disk media at a much
lower I/O cost, because the size of the page is not variable.
•It makes use of demand paged, virtual memory system and is
designed so that the system will run acceptably in nominally
overcommited situations.
9
OS/2 API
• OS/2 provides the dynamically linked 32-bit API to allow
flat-model applications to use the OS/2 system services
•The 32-bit API has been designed so that applications and
subsystems that use and provide 32-bit APIs will be portable
to any future OS/2 platform.
•The multitasking API provides better thread management in
the areas of creation and termination, and the system supports
up to 4095 processes and 4095 threads.
•The 32-bit API uses the Presentation Manager (PM) for
managing the user I/O.
10
INTERPROCESS COMMUNICATION
• Inter-process communication primitives provide the basic
features for data sharing and thread synchronization.
•The IPC facilities of the OS/2 system are organized into a
tiered hierarchy based on the complexity of the IPC
mechanism.
•The simplest IPC mechanisms are shared memory,
semaphores, signals, and exceptions.
•Queues and named pipes are examples of higher-level
abstractions that allow processes to exchange data and to
synchronize their execution.
•The highest-level abstraction is the API call.
11
PRESENTATION MANAGEMENT
• Sessions, or screen groups, are managed by the session
manager, a component of OS/2.
•The user shell allows the users to start or stop applications,
and to select the foreground session
•The Presentation Manager is the graphical user interface of
OS/2.
•It extends the functionality of the base user I/O services to
include a windowed user interface and device-independent
graphic presentations.
•The PM is divided into two functional groups: the windows
API and the graphics API
12
DOS COMPATIBILILTY
• OS/2 provides DOS compatibility using the virtual mode
•OS/2 uses paging to provide more than one DOS
compatibility environment.
•DOS applications can be run full screen, windowed, or
iconized in the background.
•Since DOS environments are swappable, starting many DOS
sessions does not drive up the system memory requirements.
13
CONCLUSION
• The OS/2 is an advanced single-user, multitasking personal computer
operating system that exploits advanced hardware platforms.
•It provides a demand-paged system with a 32-bit programming model that
is portable to other 32-bit processor architectures
•OS/2 is compelling because it offers the best system for running 16-bit
DOS and Windows applications while moving into the more flexible and
powerful 32-bit world.
•OS/2's object-oriented interface and free technical support are compelling
factors
•OS/2 is smallest of the three major operating system (Linux, Windows
NT, and OS/2) when using a graphical interface.
•OS/2 is the strongest of the three for backward compatibility with DOS
and Windows.
•It is a high performance, highly reliable, information accessible, and
integrated operating system
14