Ceng 334 - Operating Systems

Download Report

Transcript Ceng 334 - Operating Systems

Chapter 6 : Case Studies
•
•
•
•
UNIX
Dos
Windows 95
Windows NT
Ceng 334 - Operating Systems
6-1
UNIX
• There are two main versions:
– AT&T System V Release 4 (SVR4)
• Originally developed by AT&T, now
SCO
– BSD (Berkeley Software Distribution)
Ceng 334 - Operating Systems
6-2
•
•
•
•
Supports various architectures
Structure varies
Supports preemptive multitasking
Multiuser environment - generally
secure
• Supports multithreaded applications
• Protection/Security is high on modern
versions
Ceng 334 - Operating Systems
6-3
• Supports symmetric multiprocessing
• Highly scalabe/portable to various systems
• Many types/flavours of UNIX exist
Ceng 334 - Operating Systems
6-4
Ceng 334 - Operating Systems
6-5
MS-DOS
• Limited to x86 architecture
• Simple Structure
• Single User (No tasking, scheduling,
priorities)
• No protection
• Monolithic structure
• Old, outdated but still widely used
(hardware and cost driven decision)
Ceng 334 - Operating Systems
6-6
Ceng 334 - Operating Systems
6-7
Windows 95
•
•
•
•
x86 architecture
Layered
Single user
32 bit applications run in a preemptive,
multithreaded, multitasking environment
• 16 bit applications (of Windows 3.x) run in
shared memory space in a cooperative
multitasking environment
Ceng 334 - Operating Systems
6-8
• Virtual DOS Machine for DOS applications
• “Plug and Play” - new OS “advantage”
Ceng 334 - Operating Systems
6-9
Ceng 334 - Operating Systems
6-10
Ceng 334 - Operating Systems
6-11
Windows 95 Architecture
System Virtual Machine
Win32
app
Win32
app
Win32
app
System
services,
KERNEL,
USER,
and
GDI
DOS Virtual Machines
Win16
app
Win16
app
DOS app
DOS app
DOS app
Ring 3
Virtual Machine Manager subsystem
File Management subsystem
Ring 0
Ceng 334 - Operating Systems
6-12
• VMM (Virtual Machine Manager) and file
management subsystems run in ring 0 (the most
privileged level of the four-ring Intel 386
protection model). This implies these two modules
have unrestricted access to the whole system.
• VMM provides memory management, scheduling
and DOS Protected Mode Interface (DPMI)
• VMM also includes all Virtual Extended Drivers
(VxDs) to virtualize hardware devices.
Ceng 334 - Operating Systems
6-13
• The system Virtual Machine runs in ring 3 (The
only other protection level used by Win 95. Ring 3
is the least privileged, best isolated level)
• All applications and core dynamic link libraries
(DLLs) - KERNEL, USER, and GDI execute in
the VM
Ceng 334 - Operating Systems
6-14
Multitasking & Multithreading
• Multiple concurrent threads
• Time is allocated on a per-thread basis
• DOS VMs and VM address space shared by
Win16 applications constitute one thread
each
• Each Win32 apps represent at least one, and
possibly two or more, threads
Ceng 334 - Operating Systems
6-15
Scheduling
• The scheduler allocates time based on execution
priority, taking into account factors such as
whether the thread belongs to a foreground or
background process and how long it has been
since the thread was last run
• Win32 and DOS apps are preemptively
multitasked.
• Win16 apps are cooperatively multitasked within
the time slice allocated.
Ceng 334 - Operating Systems
6-16
Desynchronized Input Queues
• An input queue is where hardware
generated messages such as mouse clicks
and keystrokes are stored for app retrieveal
• Win95 assigns each application its own
input queue
• In Windows 3.x there is only one input
queue so a misbehaving process may delay
all other applications
Ceng 334 - Operating Systems
6-17
(Symmetric Multiprocessing) SMP
• Not applicable to Win95.
• Only in NT versions
Ceng 334 - Operating Systems
6-18
File System
• Windows 3.x Oss use DOS services to
perform file I/O.
• Win95 uses a 32-bit (16-bit for Windows
3.x) file system VFAT (Virtual FAT)
• VFAT is compatible with FAT volumes
• VFAT permits long file names (up to 255
characters)
Ceng 334 - Operating Systems
6-19
Windows NT
• 32 bit preemptive multitasking OS
• Supports different chip architectures (CISC
and RISC)
• Can work as a server or client (workstation)
• Has the same GUI as Windows 95
• Modular style
• Multiuser, multitasking
• Supports threads as well as classical
processes
Ceng 334 - Operating Systems
6-20
• Support SMP (Symmetric Multiprocessing)
(1 to 32 processors)
• Designed with security in mind
• Supports distributed processing networking is a core component to the OS
• Supports RPCs
• Very robust (reliable)
Ceng 334 - Operating Systems
6-21
• The HAL (Hardware Abstraction Level)
makes porting very easy
• Supports non-NT applications through
environment sub systems - meaning it
can run Win32, OS/2 and POSIX
applications (supports multiple
personalities)
• NT style OSes are the way of the future
Ceng 334 - Operating Systems
6-22
Ceng 334 - Operating Systems
6-23
Comparative OS Characteristics
Operating System Characteristics
Preemptive multitasking – 32-bit apps
Windows
95
Windows NT
worksation
.
.
.
.
.
.
.
Preemptive multitasking – 16-bit apps
Supports multithreaded apps
Apps run in protected memory space
.
32 bit only
Subsystems run in protected memory
space
Supports symmetric processing
Desktop (object-oriented) user interface
Ceng 334 - Operating Systems
.
Version 4.0
6-24
References
• Modern Operating Systems, Andrew S. Tanenbaum, Prentice-Hall,
1992
• Operating Systems (Second Edition), William Stallings, Prentice-Hall,
1995
• Local Area Networks : A Client/Server Approach, James E. Goldman,
John Wiley&Sons, 1997
• Your Next Operating System, PC Magazine, September 26, 1995, pp.
102-159
• Windows 95 And Its Competitors, PC Magazine, May 16, 1995, pp.
139-156
• Chicago: Under Construction, PC Magazine, April 12, 1994, pp. 183207
Ceng 334 - Operating Systems
6-25