Ch02 Structures
Ch02 Structures
2.2
Objectives
2.3
Operating System Services
2.4
Operating System Services (Cont.)
2.5
Operating System Services (Cont.)
Another set of OS functions exists for ensuring the efficient operation of the
system itself via resource sharing
Resource allocation - When multiple users or multiple jobs running
concurrently, resources must be allocated to each of them
Many types of resources - Some (such as CPU cycles,mainmemory,
and file storage) may have special allocation code, others (such as I/O
devices) may have general request and release code.
Accounting - To keep track of which users use how much and what kinds
of computer resources
Protection and security - The owners of information stored in a multiuser
or networked computer system may want to control use of that information,
concurrent processes should not interfere with each other
Protection involves ensuring that all access to system resources is
controlled
Security of the system from outsiders requires user authentication,
extends to defending external I/O devices from invalid access attempts
If a system is to be protected and secure, precautions must be
instituted throughout it. A chain is only as strong as its weakest link.
2.6
User Operating System Interface - CLI
2.7
User Operating System Interface - GUI
2.8
System Calls
(Note that the system-call names used throughout this text are generic)
2.9
Example of System Calls
System call sequence to copy the contents of one file to another file
2.10
Example of Standard API
Consider the ReadFile() function in the
Win32 API—a function for reading from a file
2.11
System Call Implementation
2.12
API – System Call – OS Relationship
2.13
Standard C Library Example
C program invoking printf() library call, which calls write() system call
2.14
System Call Parameter Passing
2.15
Parameter Passing via Table
2.16
Types of System Calls
Process control
File management
Device management
Information maintenance
Communications
2.17
MS-DOS execution
2.18
FreeBSD Running Multiple Programs
2.19
System Programs
2.20
System Programs
2.21
System Programs (cont’d)
File modification
Text editors to create and modify files
Special commands to search contents of files or perform
transformations of the text
Programming-language support - Compilers, assemblers, debuggers
and interpreters sometimes provided
Program loading and execution- Absolute loaders, relocatable loaders,
linkage editors, and overlay-loaders, debugging systems for higher-level
and machine language
Communications - Provide the mechanism for creating virtual
connections among processes, users, and computer systems
Allow users to send messages to one another’s screens, browse
web pages, send electronic-mail messages, log in remotely, transfer
files from one machine to another
2.22
Operating System Design and Implementation
2.23
Operating System Design and Implementation (Cont.)
2.24
Simple Structure
2.25
MS-DOS Layer Structure
2.26
Layered Approach
2.27
Layered Operating System
2.28
UNIX
2.29
UNIX System Structure
2.30
Microkernel System Structure
2.31
Mac OS X Structure
2.32
Modules
2.33
Solaris Modular Approach
2.34
Virtual Machines
2.35
Virtual Machines (Cont.)
The resources of the physical computer are shared to create the virtual
machines
CPU scheduling can create the appearance that users have their
own processor
Spooling and a file system can provide virtual card readers and
virtual line printers
A normal user time-sharing terminal serves as the virtual machine
operator’s console
2.36
Virtual Machines (Cont.)
2.37
Virtual Machines (Cont.)
2.38
VMware Architecture
2.39
The Java Virtual Machine
2.40
Operating System Generation
2.41
System Boot
2.42
Types of Operating Systems
2.43
Simple Batch Systems
In this type of system, there is no direct interaction between user and the
computer.
The user has to submit a job (written on cards or tape) to a computer
operator.
Then computer operator places a batch of several jobs on an input device.
Jobs are batched together by type of languages and requirement.
Then a special program, the monitor, manages the execution of each
program in the batch.
The monitor is always in the main memory and available for execution.
2.44
Simple Batch Systems
2.45
Multiprogramming Batch Systems
In this the operating system picks up and begins to execute one of the jobs
from memory.
Once this job needs an I/O operation operating system switches to another
job (CPU and OS always busy).
Jobs in the memory are always less than the number of jobs on disk(Job
Pool).
If several jobs are ready to run at the same time, then the system chooses
which one to run through the process of CPU Scheduling.
2.46
Multiprogramming Batch Systems
2.47
Multiprogramming Batch Systems
2.48
Multiprocessor Systems
2.49
Multiprocessor Systems
2.50
Desktop Systems
Earlier, CPUs and PCs lacked the features needed to protect an operating
system from user programs. PC operating systems therefore were
neither multiuser nor multitasking. However, the goals of these operating
systems have changed with time; instead of maximizing CPU and peripheral
utilization, the systems opt for maximizing user convenience and
responsiveness. These systems are called Desktop Systems and include
PCs running Microsoft Windows and the Apple Macintosh. Operating
systems for these computers have benefited in several ways from the
development of operating systems for mainframes.
2.51
Desktop Systems
2.52
Distributed Operating System
2.53
Distributed Operating System
2.54
Distributed Operating System
Client-Server Systems
Centralized systems today act as server systems to satisfy requests
generated by client systems. The general structure of a client-server
system is depicted in the figure below:
2.55
Distributed Operating System
Client-Server Systems
Server Systems can be broadly categorized as:
Compute Server systems, provide an interface to which clients can
send requests to perform an action, in response to which they
execute the action and send back results to the client.
File Server systems, provide a file-system interface where clients
can create, update, read, and delete files.
2.56
Distributed Operating System
Peer-to-Peer Systems
The growth of computer networks - especially the Internet and World
Wide Web (WWW) – has had a profound influence on the recent
development of operating systems. When PCs were introduced in the
1970s, they were designed for personal use and were generally
considered standalone computers. With the beginning of widespread
public use of the Internet in the 1990s for electronic mail and FTP, many
PCs became connected to computer networks.
2.57
Distributed Operating System
Peer-to-Peer Systems
In contrast to the Tightly Coupled systems, the computer networks
used in these applications consist of a collection of processors that do
not share memory or a clock. Instead, each processor has its own local
memory. The processors communicate with one another through various
communication lines, such as high-speed buses or telephone lines.
These systems are usually referred to as loosely coupled systems ( or
distributed systems). The general structure of a client-server system is
depicted in the figure below:
2.58
Clustered Systems
Like parallel systems, clustered systems gather together multiple CPUs to
accomplish computational work.
Clustered systems differ from parallel systems, however, in that they are
composed of two or more individual systems coupled together.
The definition of the term clustered is not concrete; the general accepted
definition is that clustered computers share storage and are closely linked
via LAN networking.
Clustering is usually performed to provide high availability.
2.59
Clustered Systems
A layer of cluster software runs on the cluster nodes. Each node can monitor
one or more of the others. If the monitored machine fails, the monitoring
machine can take ownership of its storage, and restart the application(s) that
were running on the failed machine. The failed machine can remain down,
but the users and clients of the application would only see a brief interruption
of service.
2.60
Clustered Systems
Asymmetric Clustering - In this, one machine is in hot standby mode while
the other is running the applications. The hot standby host (machine) does
nothing but monitor the active server. If that server fails, the hot standby host
becomes the active server.
Symmetric Clustering - In this, two or more hosts are running applications,
and they are monitoring each other. This mode is obviously more efficient,
as it uses all of the available hardware.
2.61
Clustered Systems
Parallel Clustering - Parallel clusters allow multiple hosts to access the
same data on the shared storage. Because most operating systems lack
support for this simultaneous data access by multiple hosts, parallel clusters
are usually accomplished by special versions of software and special
releases of applications.
Clustered technology is rapidly changing. Clustered system's usage and it's
features should expand greatly as Storage Area Networks(SANs). SANs
allow easy attachment of multiple hosts to multiple storage units. Current
clusters are usually limited to two or four hosts due to the complexity of
connecting the hosts to shared storage.
2.62
Real Time Operating System
It is defined as an operating system known to give maximum time for each
of the critical operations that it performs, like OS calls and interrupt handling.
The Real-Time Operating system which guarantees the maximum time for
critical operations and complete them on time are referred to as Hard Real-
Time Operating Systems.
While the real-time operating systems that can only guarantee a maximum of
the time, i.e. the critical task will get priority over other tasks, but no assurity
of completeing it in a defined time. These systems are referred to as Soft
Real-Time Operating Systems.
2.63
Handheld Systems
Handheld systems include Personal Digital Assistants(PDAs), such
as Palm-Pilots or Cellular Telephones with connectivity to a network such as
the Internet. They are usually of limited size due to which most handheld
devices have a small amount of memory, include slow processors, and
feature small display screens.
Many handheld devices have between 512 KB and 8 MB of memory. As a
result, the operating system and applications must manage memory
efficiently. This includes returning all allocated memory back to the memory
manager once the memory is no longer being used.
2.64
Handheld Systems
Currently, many handheld devices do not use virtual memory techniques,
thus forcing program developers to work within the confines of limited
physical memory.
Processors for most handheld devices often run at a fraction of the speed of
a processor in a PC. Faster processors require more power. To include a
faster processor in a handheld device would require a larger battery that
would have to be replaced more frequently.
2.65
Handheld Systems
The last issue confronting program designers for handheld devices is the
small display screens typically available. One approach for displaying the
content in web pages is web clipping, where only a small subset of a web
page is delivered and displayed on the handheld device.
Some handheld devices may use wireless technology such as BlueTooth,
allowing remote access to e-mail and web browsing. Cellular
telephones with connectivity to the Internet fall into this category. Their use
continues to expand as network connections become more available and
other options such as cameras and MP3 players, expand their utility.
2.66
End of Chapter 2