Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
MSN
OPERATING SYSTEM
COURSE CODE : CE- 458
CHAPTER – 1
INTRODUCTION
WEIGHTAGE: 20
Operating system
Computer hardware
• The hardware of computer system includes the Central Processing unit, (CPU), the
memory, and the input/output (I/O) devices. They are the basic resources.
• The application programs includes compilers, database system, games, and business
programs. They define the way in which the hardware resources are to be used to solve
the computing problems of the users.
• There are many different users trying to solve different problems using different
application programs.
• The operating system controls and coordinates the use of the hardware among the
various application programs for the various users.
Windows XP
32-bit. Developed for IBM PS/2. Multitasking; Networking
Palm OS
Paired-down for handheld computers, wireless communication devices
Windows CE
32-bit operating system; Multitasking; Multiprocessing; Networking; Internet services
Windows 2000
32-bit operating system; GUI; Multitasking; Networking capabilities
Windows 98 95 & ME
For IBM PCs; supports 32-bit computing; Multitasking; Networking
OS/2
For older IBM and IBM compatible PCs. Program Memory limited to 640KB
DOS
For Macintosh computers; Multitasking; Networking; Powerful multimedia capabilities
Mac OS
Free, reliable alternative to Unix & Windows. Runs on many platforms; open source code
Linux
For powerful PCs, workstations, midrange computers. Multitasking; Multi-user Processing;
Networking. Portable to various computer hardware platforms
Multiprocessing
Allows computer to execute two or more instructions simultaneously in a single computer
system by using multiple CPUs
(1) Computer system’s ability to support more than one process (program) at the same
time. Multiprocessing operating systems enable several programs run concurrently. UNIX
is one of the most widely used multiprocessing systems, but there are many others, including
OS/2 for high-end PCs. Multiprocessing systems are much more complicated than single-
process systems because the operating system must allocate resources to competing
processes in a reasonable manner.
(2) The utilization of multiple CPUs in a single computer system. This is also called parallel
processing.
Operating
system
User Program
Area
- Operators used to batch up jobs with similar needs into a group to speed up the
processing. The operators use to batch up the jobs submitted to him.
- A batch operating system, reads a stream of separate jobs, each with its own
control cards that predefine what job does. When job is completed the result is
printed.
- The batch system has no interaction between the user and the job while the job
is executing.
- The job is prepared and submitted, and some time later the output appears. The
delay between job submission and job completion is called turnaround time.
- The CPU is often idle. This idleness occurs because the speed of the mechanical
I/O devices is slower than electronic devices.
- After the introduction of disk technology, the cards are read into disk from card
reader. The location of card images is recorded in a table kept by the operating
system. When job is executed, the operating system provides input. When job is
completed, the output is actually printed. This form of processing is called
spooling (Simultaneous Peripheral Operation on-line).
- Spooling uses the disk as a huge buffer for reading as far ahead as possible on
input devices and for storing output files until the output devices are able to
accept them.
- The operating system keeps several jobs in memory simultaneously. This set of
jobs is a subset of the jobs kept in the job pool- the number of jobs that can be
kept simultaneously in memory is usually much smaller than the number of jobs
that can be in the job pool.
- Operating system picks and begins to execute one of the jobs in memory and the
other job may have to wait for some task, such as I/O operation.
Operating system
Job 1
Job 2
Job 3
Job 4
Unlike operating systems, such as DOS and Windows95, those are designed for single users
to control one computer, network operating systems (NOS) coordinate the activities of
multiple computers across a network. The network operating system acts as a director to
keep the network running smoothly.
The two major types of network operating systems are:
• Peer-to-Peer
• Client/Server
Peer-to-Peer
Peer-to-peer network operating systems allow users to share resources and files located on
their computers and to access shared resources found on other computers. However, they do
not have a file server or a centralized management source (See fig. 1). In a peer-to-peer
network, all computers are considered equal; they all have the same abilities to use the
resources available on the network. Peer-to-peer networks are designed primarily for small
to medium local area networks. AppleShare and Windows for Workgroups are examples of
programs that can function as peer-to-peer network operating systems.
- The ability to execute more than one task at the same time, a task being a
program is called multitasking.
- The terms multitasking and multiprocessing are often used interchangeably,
although multiprocessing implies that more than one CPU is involved.
- In multitasking, only one CPU is involved, but it switches from one program to
another so quickly that it gives the appearance of executing all of the programs
at the same time.
- A time-shared operating system uses CPU scheduling and multiprogramming to
provide each user with a small portion of a time-shared computer. Each user has
at least one separate program in memory. A program in execution is called
process.
- A time-sharing operating system must have memory management and
protection.
- Time-sharing system must also provide a file system.
- There are two basic types of multitasking: preemptive and cooperative.
- In preemptive multitasking, the operating system parcels out CPU time slices to
each program.
- In cooperative multitasking, each program can control the CPU for as long as it
needs it. If a program is not using the CPU, however, it can allow another
program to use it temporarily.
Examples
- OS/2, Windows 95, Windows NT, the Amiga operating system and UNIX use
preemptive multitasking, whereas Microsoft Windows 3.x and the MultiFinder
(for Macintosh computers) use cooperative multitasking.
-
1.2.5. Multithreading Operating System
- User Threads
- They are supported above the kernel and are implemented by
a thread library at the user level.
- Kernel Threads
- Kernel threads are supported by Operating system: the kernel
performs thread creation, scheduling and management in kernel
space. Kernel threads are slower to create and manage.
- Windows NT, Windows 2000, Solaris 2, BeOS, and Tru64
UNIX support kernel threads.
programs only when the processor would be idle. Batch may be used as filler to
improve processor utilization while accomplishing a useful service of its own.
- Some time-critical events, such as receipt and transmission of network data
packets may be handled in real-time fashion on system that otherwise provides
time-sharing services to their terminals.
Monolithic Systems:
This approach well known as “The Big Mess”. The structure is that there is no
structure. The operating system is written as a collection of procedures, each of which can
call any of the other ones whenever it needs to. When this technique is used, each procedure
in the system has a well-defined interface in terms of parameters and results, and each one is
free to call any other one, if the latter provides some useful computation that the former
needs.
For constructing the actual object program of the operating system when this approach is
used, one compiles all the individual procedures, or files containing the procedures and then
binds them all together into a single object file with the linker. In terms of information
hiding, there is essentially none- every procedure is visible to every other one i.e. opposed to
a structure containing modules or packages, in which much of the information is local to
module, and only officially designated entry points can be called from outside the module.
However, even in Monolithic systems, it is possible to have at least a little structure. The
services like system calls provide by the operating system are requested by putting the
parameters in well-defined places, such as in registers or on the stack, and then executing a
special trap instruction known as a kernel call or supervisor call.
- E.g. the device driver for the disk space used by virtual-memory algorithms
must be at a level lower than that of the memory-management routines, because
memory management require the ability to use the disk space.
- Layered implementations tend to be less efficient than other types.
- E.g. When a user programs executes an I/O operation, it executes a system call
that is trapped to the I/O layer, which calls the memory-management layer,
which in turn calls the CPU-scheduling layer, which is then passed to the
hardware. At each layer, the parameters may be modified; data may need to be
passed. Each layer adds overhead to the system call; the net result is a system
call that takes longer than does one on a nonlayered system.
Application program
(the users)
Shells and commands
Compilers and interpreters
System libraries
System-call interface to the kernel
- Everything below the system-call interface and above the physical hardware is
the kernel.
- The kernel provides the file system, CPU scheduling, memory management, and
other operating system functions through system calls.
- System calls define the API (Application program Interface) to UNIX; the set of
system programs commonly available defines the user interface. The
programmer and user interfaces define the context that the kernel must support.
- Example
- UTru64 UNIX provides the UNIX interface to the user, but it is
implemented with a microkernel.
- The Apple MacOS X server operating system is based on the
microkernel .The QNX is a real-time operating system that is also based on
microkernel design.
Processes
Processes
Processes
Processes
- Suppose the physical machine has three disk drives but want to
support seven virtual machines. It cannot allocate a disk drive to each
virtual machine. The virtual-machine software itself will need substantial
disk space to provide virtual memory. The solution is to provide virtual
disks, which is identical in all respects except sizes – termed minidisks. The
system implements each minidisk by allocating as many tracks on the
physical disk as the minidisk needs. The sum of sizes of all minidisks must
be smaller than that of the physical disk space.
- Advantages of Virtual-Machine
- The virtual machines provide a robust level of security, by
completely protecting system resources.
- The virtual machine allows system development to be done without
disrupting normal operation.
- Disadvantages of Virtual-Machine
- In virtual machines there is no direct sharing of resources.
- Examples
- The recent Linux operating system have virtual-machine that allow
Windows applications to run on Linux-based computers.
- Java run on a virtual machine, thereby allowing a Java program to
run on any computer system that has a Java virtual machine.
message is handled locally in its own machine, or whether it was sent across a
network to a server on a remote machine. As far as the client is concerned, the
same thing happens in both cases: a request was sent and a reply came back
- Example
- Windows NT is designed to run various applications, including Win32 (native
Windows applications), OS/2, and POSIX.
- It provides a server that runs in user space for each application type.
- Client programs for each application type also run in user space.
- The kernel coordinates the message passing between the client applications and
the application servers.
kernel
The operating system provides an environment for the execution of programs. The
operating system provides services to programs and to the users of those programs The
operating system services are provided for the convenience of the programmer..
1.4.1. Types of Services
• Program execution : The system must be able to load a program
into memory and run it. The program must be able to end its execution
either normally or abnormally (indicating error).
• I/O operations: A running program may require I/O. This I/O
involve a file or an I/O device. For specific devices, special functions may
be desired. For efficiency and protection, users usually cannot control I/O
devices directly. The operating system provides a means to do I/O.
• File-system manipulation: The programs need to read and write
files and programs must also create and delete files. The operating system
maintains the file system.
• Communications: In many conditions the process needs to
exchange information with another process. Such communication can
occur in two ways:
- The first takes place between processes that are executing on the
same computer.
- The second takes place between processes that are executing on
different computer systems that are tied together by a network.
- Communications may be implemented via shared memory, or via
message passing, in which the information is moved between processes by
operating system.
• Error detection: The operating system constantly needs to be
aware of possible errors.
- Errors may occur in the CPU and memory hardware, in I/O devices
and in user programs.
- For each type of error, the operating system should take the proper
action to ensure correct and consistent computing.
Operating a system function that exists not for helping the user, but rather
ensuring the efficient operation of the system.
• System View
- From computer’s view the operating system is the program that is most intimate
with hardware.
- The operating system is a resource allocator. The operating system acts as
manager or resources – hardware and software- required solve a problem
includes CPU time, memory space, file-storage, I/O devices etc.
- A slightly different view of operating system is as control program. A control
program manages the execution of user programs to prevent errors and improper
use of the computer. It is especially concerned with the operation and control of
I/O devices.
- The fundamental goal of operating system is to execute user programs and to
make solving user problems easier.