Computer System: Computer System Provide A Capability For Gathering Data, Performing Computations
Computer System: Computer System Provide A Capability For Gathering Data, Performing Computations
Figure 1-1. A computer system consists of hardware, system programs, and application
programs.
The hardware-the central processing unit (CPU), the memory, and the input/output
devices-provides the basic computing resources. The application programs-such as word
processors, spreadsheets, compilers, and web browsers-define the ways in which these
resources are used to solve the computing problems of the users. The operating system
controls and coordinates the use of the hardware among the various application programs
for the various users.
The components of a computer system are its hardware, software, and data. The
operating system provides the means for the proper use of these resources in the operation
of the computer system. It simply provides an environment within which other programs
can do useful work.
OPERATING SYSTEM
The 1960’s definition of an operating system is “the software that controls the hardware”.
Most computer users have had some experience with an operating system, but it is difficult
to pin down precisely what an operating system is. Part of the problem is that operating
systems perform two basically unrelated functions, extending the machine and managing
resources.
The program that hides the truth about the hardware from the programmer and presents a
nice, simple view of named files that can be read and written is, of course, the operating
system. Just as the operating system shields the programmer from the disk hardware and
presents a simple file-oriented interface, it also conceals a lot of unpleasant business
concerning interrupts, timers, memory management, and other low-level features. In each
case, the abstraction offered by the operating system is simpler and easier to use than that
offered by the underlying hardware.
In this view, the function of the operating system is to present the user
with the equivalent of an extended machine or virtual machine that is easier to program
than the underlying hardware.
1.2 The Operating System as a Resource Manager
The concept of the operating system as primarily providing its users with a convenient
interface is a top-down view. An alternative, bottom-up, view holds that the operating
system is there to manage all the pieces of a complex system.
In the alternative view, the job of the operating system is to provide for an orderly and
controlled allocation of the processors, memories, and I/O devices among the various
programs competing for them.
In these early days, a single group of people designed, built, programmed, operated, and
maintained each machine. All programming was done in absolute machine language, often
by wiring up plugboards to control the machine’s basic functions. Programming languages
were unknown (even assembly language was unknown). Operating systems were unheard
of. The usual made of operation was for the programmer to sign up for a block of time on
the signup sheet on the wall, then come down to the machine room, insert his or her
plugboard into the computer, and spend the next few hours hoping that none of the 20,000
or so vacuum tubes would burn out during the run. Virtually all the problems were
straightforward numerical calculations, such as grinding out tables of sines, cosines, and
logarithms.
By the early 1950s, the routine had improved somewhat with the introduction of
punched cards. It was now possible to write programs on cards and read them in instead of
using plugboards; otherwise, the procedure was the same.
VI. A user had to rely on machine language to perform operations. For additional
function manual assembly of components were required.
VII. They lack in versatility and speed.
VIII. Machine language was used for programming.
IX. They were difficult to program and use
X. Acoustic delay lines were used as main memory because of high cost of vacuum
tubes.
XI. Magnetic drum or punch cards were used as secondary storage.
XII. They were used by government for different purposes such as census, defense.
XIII. they were not available for commercial purpose as their cost was very high.
XIV. Input was based on punched cards and paper tape and output was displayed on
printouts.
The introduction of the transistor in the mid-1950s changed the picture radically. there
was a clear separation between designers, builders, operators, programmers, and
maintenance personnel. To run a job (i.e., a program or set of programs), a programmer
would first write the program on paper (in FORTRAN or assembler), then punch it on
cards. He would then bring the card deck down to the input room and hand it to one of the
operators and he waits until the output was ready. When the computer finished whatever
job it was currently running, an operator would go over to the printer and later it was
handed to programmer. Much computer time was wasted while operators were walking
around the machine room. The solution generally adopted to reduce the wasted time was
the batch system. The idea behind it was to collect a jobs in the input room and then read
them onto a magnetic tape using a small (relatively) inexpensive computer, such as the IBM
1401, which was very good at reading cards, copying tapes, and printing output, but not at
all good at numerical calculations. Other, much more expensive machines, such as the IBM
7094, were used for the real computing.
The magnetic tape was mounted on a tape drive. The operator then loaded a special
program , which read the first job from tape and ran it. The output was written onto a
second tape, instead of being printed. After each job finished, the operating system
automatically read the next job from the tape and began running it. When the whole batch
was done, the operator removed the input and output tapes, replaced the input tape with
the next batch, and brought the output tape.
IBM 7000, NCR 304, IBM 650, IBM 1401, ATLAS and Mark III are the examples of second
generation computers.
While one job was waiting for I/O to complete, another job could be run ,this gives CPU
busy all the times. Another major feature present in third-generation operating systems
was whenever a running job finished, the operating system could load a new job from the
disk into the now-empty partition and run it. This technique is called spooling (from
Simultaneous Peripheral Operation On Line) and was also used for output. With spooling,
the 1401s were no longer needed, and much carrying of tapes disappeared.
PDP-8, PDP-11, ICL 2900, IBM 360 and IBM 370 are the examples of third
generation computers.
The microprocessor chip made it possible for a single individual to have his or her own
personal computer. An interesting development that began taking place during the mid-
1980s is the growth of networks of personal computers running network operating
systems and distributed operating systems .In a network operating system, the users are
aware of the existence of multiple computers and can log in to remote machines and copy
files from one machine to another. Each machine runs its own local operating system and
has its own local user (or users). A distributed operating system, in contrast, is one that
appears to its users as a traditional uniprocessor system, even though it is actually
composed of multiple processors. The users should not be aware of where their programs
are being run or where their files are located; that should all be handled automatically and
efficiently by the operating system. User friendly system and real time system was
introduced too .
A time-shared operating system allows many users to share the computer simultaneously.
Since each action or command in a time-shared system tends to be short, only a little CPU
time is needed for each user.
Time-sharing operating systems are even more complex than multiprogrammed operating
systems. In both, several jobs must be kept simultaneously in memory, so the system must
have memory management and protection
Time-sharing systems must also provide a file system . The file system resides on a
collection of disks; hence, disk management must be provided .
In time sharing operating system divides the time of CPU and provide the fraction of time
to each process in queue.
The idea of time sharing was demonstrated as early as 1960, but since time-shared systems
are difficult and expensive to build, they did not become common until the early 1970s.
Multiprogramming and time sharing are the central themes of modern operating systems.
Today’s most system are time sharing .for example: XP, window NT, Linux etc.
Real-Time Operating Systems
Another form of a special-purpose operating system is the real-time system. A real-time
system is used when rigid time requirements have been placed on the operation of a
processor or the flow of data; thus, it is often used as a control device in a dedicated
application.
Systems that control scientific experiments, medical imaging systems, industrial
control systems, and certain display systems are real-time systems. Some automobile-
engine fuel-injection systems, home-appliance controllers, and weapon systems are also
real-time systems.
A real-time system has well-defined, fixed time constraints. Processing must be
done within the defined constraints, or the system will fail. A real-time system functions
correctly only if it returns the correct result within its time constraints.
There are two type of real time system. They are:
1. Hard real time system
2. Soft real time system
3. Increased reliability.
The failure of one processor does not affect the other processors though it
will slow down the machine.
Asymmetric multiprocessing:
Some systems use asymmetric multiprocessing, in which each processor is
assigned a specific task. A master processor controls the system; the other processors
either look to the master for instruction or have predefined tasks. This scheme defines a
master-slave relationship.
Mainframe Operating Systems
An example mainframe operating system is OS/390, a descendant of OS/360
Personal Computer (PC) Operating Systems
The personal computer operating system job is to provide a good interface to a single user.
They are widely used for word processing, spreadsheets, and Internet access. Common
examples are Windows 98, Windows 2000, the Macintosh operating system, and Linux.
The only major difference is that a mainframe operating system will probably need to
service many users at the same time, whereas a PC operating system normally only has to
worry about one user at a time.
There are some differences between personal computer OS and mainframe OS, one of them
a mainframe OS can be used by many users at the same time so it must need to service for
many users. However a personal computer operating system designed for one user
normally. Second of them a mainframe OS is more powerful and expensive than PC OS.
Mainframe OS designed to huge process from many users and it means, it manages lots of
I/O for many users, but in PC OS there is just one user to log in it means, it does not
manages lots of I/O for one user. Mainframe OS offers three kinds of service batch,
transaction processing and timesharing. Personal computer OS used for some basic
processing like word processing, spreadsheets and Internet access that PC OS is supports
multiprogramming.
SYSTEM CALLS
System calls provide the interface between a process and the operating system.
These calls are generally available as assembly-language instructions, and
they are usually listed in the various manuals used by the assembly-language
Programmers.
Certain systems allow system calls to be made directly from a higher-level
Language program, in which case the calls normally resemble predefined
Function or subroutine calls. They may generate a call to a special run-time
Routine that makes the system call, or the system call may be generated directly
in-line.
Several languages-such as C, C++, and Perl-have been defined to replace
Assembly language for systems programming. These languages allow system
Calls to be made directly. System calls can be grouped roughly into five major categories:
1. Process control,
2. file management,
3. device management,
4. information maintenance, and
5. Communications.
1. Process control
end, abort
load, execute
create process, terminate process
get process attributes, set process attributes
wait for time
wait event, signal event
allocate and free memory
2. File management
create file, delete file
open, close
read, write, reposition
get file attributes, set file attributes
3. Device management
request device, release device
read, write, reposition
get device attributes, set device attributes
logically attach or detach devices
4. Information maintenance
get time or date, set time or date
get system data, set system data
get process, file, or device attributes
set process, file, or device attributes
5. Communications
create, delete communication connection
send, receive messages
transfer status information
attach or detach remote devices
A system call is an explicit request to the kernel made via a software interrupt
Control Flow Diagram of a System Call
1. When a User Mode process invokes a system call, the CPU switches to
Kernel Mode and starts the execution of a kernel function
2. Because the kernel implements many different system calls, the User Mode
process must pass a parameter called the system call number to identify the
required system call.
In the kernel
When any user logs in, a shell is started up. The shell has the terminal as standard input
and standard output. Many shells exist, including sh, csh, ksh, and bash. It starts out by
typing the prompt, a character such as a dollar sign, which tells the user that the shell is
waiting to accept a command. If the user now types date
For example, the shell creates a child process and runs the date program as the child.
While the child process is running, the shell waits for it to terminate. When the child
finishes, the shell types the prompt again and tries to read the next input line.
Many pc uses GUI now days in fact GUI is just a program running on top of the
operating system