0% found this document useful (0 votes)
37 views83 pages

Topic 1

Uploaded by

Kalai Shan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views83 pages

Topic 1

Uploaded by

Kalai Shan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

CHAPTER 1

INTRODUCTION
TO OPERATING
SYSTEM

Prepared by
Wan Norhayati bt Wan Tahir
Zainora bt Kamal ludin

Jabatan Kejuruteraan Elektrik


CONTENT OF TEACHING

1.1 Know Terms and Concepts of Operating System.


1.2 Understand basic concept of Operating System
1.3 Apply concept of Operating System
OPERATING
SYSTEM????
What is operating system??

• The operating system


is the systems program
or software that makes
the hardware usable.
What is an Operating System? Cont…
• A program that acts as an intermediary between a user of a
computer and the computer hardware.
• Operating system goals:
• Execute user programs and make solving user problems easier.
• Make the computer system convenient to use.
• Use the computer hardware in an efficient manner.
• is a set of program that manages all of the hardware and all of
the software.
• To be specific it controls every file, every device, every section of
main memory and every nanosecond of processing time. It
controls who can use the system and how. In short . It’s the boss.
What are the function of
operating system? ƒ
Functions of Operating System
Following are some of important functions of an operating
System.
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software and users
Computer System Components
• Computer system can be divided into four components
• Hardware – provides basic computing resources
• CPU, memory, I/O devices
• Operating system
• Controls and coordinates use of hardware among
various applications and users
• Application programs – define the ways in which the
system resources are used to solve the computing
problems of the users
• Word processors, compilers, web browsers,
database systems, video games
• Users
• People, machines, other computers
Four Components of a Computer System
HISTORY OF OPERATING
SYSTEM
Generation Period
The First Generation 1945–1955 Vacuum Tubes and
Plugboards

The Second Generation 1955–1965 Transistors and Batch


Systems

The Third Generation 1965–1980 ICs and


Multiprogramming

The Fourth Generation 1980–Present Personal Computers


1st Generation
• No operating systems
• Using mechanical relays
• Using absolute machine language, using wiring to control m/c
basic functions
• Early 50’s using punch card, need to insert in machine and
wait the result
2nd Gen
• Challenge: less relays and program oriented
• Computer using transistors instead of relays and vacuum tube
• m/c called mainframe, air-cond, need special staff to operates
• Program is compose on paper, then written in punch card
• While waiting the output, programmer can have a coffee
…continue
• People look forward to reduce waste time
• Batch system introduced(ancestor of OS)
• Bunch of punched tapes is collected, but processed serially
and resulting amount of output after that.
• Results is printed offline
Generations of OS
Generation Period
The First Generation 1945–1955 Vacuum Tubes and
Plugboards

The Second Generation 1955–1965 Transistors and Batch


Systems

The Third Generation 1965–1980 ICs and


Multiprogramming

The Fourth Generation 1980–Present Personal Computers


Batch system

• (a) Programmers bring cards to 1401.


• (b)1401 reads batch of jobs onto tape.
• (c) Operator carries input tape to 7094.
• (d)7094 does computing.
• (e) Operator carries output tape to 1401.
• (f) 1401 prints output.
Fortran Monitoring Systems
3rd Gen
• Challenge : well-matched OS and combinations of two-element:
• Word-oriented :7094
• Character oriented:1401
• IBM invent System/360 that differ a price in performance-based
• SSI based (Small Scale integrations) where consists of 2-99
transistors per IC.
• Software compatible machine with OS/360
• The invention of Multiprogramming and Spooling
• SPOOL( Simultaneous Peripheral Operations On Line)

• Even if many innovations has done, basically its still batch


systems
• Quick response time using Time-sharing
4th gen
• Challenge : faster computer, small size,User friendly OS
• Development of LSI(Large Scale Integration)
• Hardware dominator is Intel 8080, Zilog, Motorola 6800
• Microsoft invent BASIC and DOS.
• Apple Macintosh using GUI and birth of UNIX.
• Growth of NOS and Distributed OS.
Types of OS
• Batch OS
• The programs is arrange in sequent CPU will wait(idle) until
output is produced to proceed another jobs
Types of OS
• Multiprogramming
• Program is run in sequence but CPU always do the assembled job
without waiting the output for previous jobs
Types of OS
• Distributed OS
• The programs and files are located in all PC be handled
automatically and efficiently by the operating system.
VARIOUS PRODUCT OF OS

WINDOWS
LINUX
Mac
SUN
Windows
Linux

• Free Open Source-OS


• The user interface, also known as the shell, is either a command-
line interface (CLI), a graphical user interface (GUI), or through
controls attached to the associated hardware, which is common for
embedded systems. For desktop systems, the default mode is
usually a graphical user interface, although the CLI is available
through terminal emulator windows or on a separate virtual
console.
Linux distribution
• Arch
• CentOS
• Debian
• Fedora
• Gentoo
• Linux Mint
• OpenSUSE
• Red Hat
• Slackware
• Ubuntu
MAC

• MAC OS ,specially design for Apple computers


SUN (Oracle)

• Sun Micro-systems renamed their Operating system Sun OS to Solaris in 1993.


When Oracle Corporation acquired Sun Micro systems, it is named as Oracle
Solaris.
• More into Server OS
OPEN SOURCE VS. CLOSED SOURCE
Open source
• Freeware
• The open programmer can rebuild and redesign the
software until optimum performance and lack of error
• The Source Code of SW is given so that programmer can
learn how the SW working
• Distributed freely by any people
Closed source
• Paid software/Shareware
• The only SW programmer can rebuild and redesign the
software until optimum performance and lack of error
• no idea how it was made. Must accept the software quality as
it as.
• Respond to correction quickly but need a time to release a
correction patches
• Distributed closely by sole vendor
System calls for the following:

• Process Management
• File Management
• Directory management
Process management
• Examples of System Calls for Process Management in UNIX
• A lot of services such as memory management, file system
management, etc. are provided by the system calls, and one of them
is process management.

• A set of system calls given below is used to manage a process:


fork( ): To create a process we use a method called fork( ). It creates a
child process identical to the parent in every way.
exec( ): To run a program, that is, to execute a program, exec( ) method
is used.
wait( ): To make a process wait, wait( ) is used.
getpid( ): Every process has a unique process id, to get that unique id
getpid( ) is used.
getppid( ): To get the unique process id of a parent process, getppid( )
is used.
exit( ): It is used to terminate a process with an exit status.
File management

• Examples of System Calls for File Management


• For File Management, following system calls mainly are used:
open(): This system call is used to open a file for reading,
writing, or both.
read(): To read the content from a file into the buffer, we use a
read() system call.
write(): It is used to write content into the file from the buffer.
Close (): This system call is used to close the opened file.
Directory management
• Examples of System Calls for Directory Management
• For Directory Management, following system calls are mainly
used:
mkdir( ): Used to create a new directory.
rmdir( ): Used to remove a directory.
link( ): Used to create a link to an existing file.
opendir( ): Used to open a directory for reading.
closedir( ): This is used to close a directory.
Self review
1. Define the Operating System
2. State FOUR (4) main functions of operating system.
3. Define batch operating system.
4. What is the main purpose of batch operating system?
5. Give two disadvantages of batch processing system.
6. What is the key advantage of implementing
multiprogramming OS?
7. What technique used to overcome two users are
trying to print at the same time?
8. Describe distributed operating system.
9. Describe Directory System Call.
What is Kernel?
• The core software components of an operating system.
• Main component of most computer operating systems
• Bridge between applications and the actual data processing
done at the hardware level.
• The kernel has unrestricted access to all of the resources on the
system.
Kernel
Illustration DEVICES

APPLICATION
Shell
• A shell is software that provides an interface for users of an
operating system to access the services of a kernels.
• The name shell originates from shells being an outer layer of
interface between the user and the internals of the operating
system (the kernel).
• In either category the primary purpose of the shell is to invoke
or "launch" another program;
String

#!/bin/sh
clear ls -al

• the shell script would start with its normal starting line of #!/bin/sh.
• the script executes the command clear which clears the terminal of
all text before going to the next line. The following line provides the
main function of the script.
• The ls -al command list the files and directories that are in the
directory from which the script is being run. The ls command
attributes could be changed to reflect the needs of the user.
Windows Power Shell
Windows PowerShell ISE
Ubuntu GNOME Shell

• It can launch over the terminal TAB


Menu-Driven System

• An interactive computer system in which the operator


requests the processing to be performed by making selections
from a series of menus.
Fully Graphical User Interface

• Graphical User Interface(GUI) is a type of interface which helps user


to interact with electronic devices through graphical icons rather
than command line. It refers to everything that is visual in a modern
applications such as windows, menus, buttons etc.

These windows, menus, events,dialogs and other controls are the


components of GUI Application. The term came into existence
because the first interactive user interfaces to computers were not
graphical, they were text and keyboard oriented which are not easy
to operate.

The GUI was first developed by Xerox Parc by Alan Kay and Douglas
Engelbart in the late 1970s. Apple was the first to use them in there
Macintosh computers and later Microsoft uses it.
• The GUI components are use to carry out commands like copying
data, moving and deleting of files, opening files etc.

Most GUI commands are carried out through Mouse. GUI based
operating system is very easy to operate as command do not need
to be memorized. Due to ease in use almost every Operating System
uses GUI Operating System like Microsoft Windows, Apple, Mac OS,
Chrome OS, Linux etc.
NETWORK OPERATING SYSTEMS

Novell Netware
Cisco IOS
NOS
• an operating system that includes special
functions for connecting computers and devices
into a local-area network (LAN). Some operating
systems, such as UNIX and the Mac OS, have
networking functions built in.
• The term network operating system, however, is
generally reserved for software that enhances a
basic operating system by adding networking
features.
List Of NOS(p2p)
• Peer to peer
• Apple Share
• Windows Workgroup
• Advantages
• Ease of setup
• Less hardware needed, no server needs to be purchased.
• Disadvantages
• No central location for storage.
• Lack of security that a client/server type offers.
• 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.
List of NOS (client-server)
• Novell Netware,
• Artisoft's LANtastic,
• Microsoft Windows Server,
• Windows
• Apple Talk
List of NOS (client-server)
• Advantages
• Centralized servers are more stable.
• Security is provided through the server.
• New technology and hardware can be easily integrated
into the system.
• Servers are able to be accessed remotely from
different locations and types of systems.
• Disadvantages
• Cost of buying and running a server are high.
• Dependence on a central location for operation.
• Requires regular maintenance and updates.
Process Management
• Processor Management
• In multiprogramming environment, the OS decides which
process gets the processor when and for how much time. This
function is called process scheduling. An Operating System
does the following activities for processor management −
• Keeps tracks of processor and status of process. The program
responsible for this task is known as traffic controller.
• Allocates the processor (CPU) to a process.
• De-allocates processor when a process is no longer required.
• Device Management
File management
• A file system is normally organized into directories for
easy navigation and usage. These directories may contain
files and other directions.
• An Operating System does the following activities for file
management −
• Keeps track of information, location, uses, status etc. The
collective facilities are often known as file system.
• Decides who gets the resources.
• Allocates the resources.
• De-allocates the resources.
Memory Management
• Memory management refers to management of Primary
Memory or Main Memory. Main memory is a large array of
words or bytes where each word or byte has its own address.
• Main memory provides a fast storage that can be accessed
directly by the CPU. For a program to be executed, it must in
the main memory. An Operating System does the following
activities for memory management −
• Keeps tracks of primary memory, i.e., what part of it are in use
by whom, what part are not in use.
• In multiprogramming, the OS decides which process will get
memory when and how much.
• Allocates the memory when a process requests it to do so.
• De-allocates the memory when a process no longer needs it or
has been terminated.
Self Review
• Explain briefly menu-driven system .
• Explain Network Operating System
• Relate memory management subsystem in operating
system
SELF REVIEW

Examine hardware compatibility


and minimum requirement for
installation of a particular
operating system
Various OS Structure
• Today’s OS tend to be complex because
• they provide many services
• Support variety of hardware & software resources

• OS architecture can help designers manage this


complexity
• Organize OS components
• Specify the privilege with which each component
executes.
Various OS Structure
i. Monolithic
ii. Layered
iii. Client server model
iv. Virtual machines
Various OS Structure
Monolithic
• The earliest and most common OS
• Each component of the OS was contained within
the kernel
• Communicate directly with any other component
• Have unrestricted system access
• Operating system become very highly efficient
A Monolithic OS Structure
A Monolithic OS Structure
Various OS Structure
Monolithic
• Disadvantage:
• As monolithic kernels group components
together, therefore difficult to isolate the
source of bugs & other errors.
• Systems with monolithic kernels tend to
damage by erroneous code due to all codes
executes with unrestricted access to the
system.
Various OS STRUCTURE
Layered
• OS become larger and more complex
• Layered works by grouping components that perform
similar functions into layers.
• Each layer only communicate to its immediate upper and
lower layer.
• More modular than monolithic OS
• The implementation of each layer can be modified
without requiring any modification to other layers.
• Example: Windows XP, Linux
Various OS STRUCTURE
Layered
• Modular: is an approach that subdivides a system into
smaller parts (modules) that can be independently created
and then used in different systems to drive multiple
functionalities
• Each layer communicates only with the layers immediately
above and below it
• Lower-level layers provide services to higher-level ones
using an interface that hides their implementation
• The modularity of layered operating systems allows the
implementation of each layer to be modified without
requiring any modification to adjacent layers
Various OS Structure
Layered
• Layered approach overcome monolithic designs
by:
• Grouping components that perform similar
functions into layers.
• Each layer communicates ONLY to it’s nearest
upper & lower layer.
• Lower layer provide service to higher-level
using interface that hides their
implementation.
A Layered OS STRUCTURE
Various OS Structure
Layered
• Weakness:
• In layered approach, a user process’s request may need to pass
through many layers before it is serviced.
• Additional methods must be invoked to pass data from one layer
to another, performance degrades compare to monolithic, which
require only a single call to service a similar request.
• Tend to damage due to erroneous code because all layers have
unrestricted access to the system.
Various OS STRUCTURE
• Client -server model
• Server OSes are designed from the ground up to provide
platforms for multi-user, frequently business-critical, networked
applications.
• Server OSes provide a platform for multi-user applications, and
most come bundled with a batch of common server applications,
such as Web servers, e-mail agents and terminal services.
• A thin client (sometimes also called a lean or slim client) is a
computer or a computer program which depends heavily on
some other computer (its server) to fulfill its traditional
computational roles.
• The most common type of modern thin client is a low-end
computer terminal which concentrates solely on providing a
graphical user interface to the end-user.

Various OS Structure

• Common applications for server Oses


• File and printer sharing
• Application services (including databases)
• Web site services
• E-mail, groupware and messaging
• Terminal services
• Caching
Various OS Structure
Virtual Machines
• A virtual machine takes the layered approach to its
logical conclusion. It treats hardware and the
operating system kernel as though they were all
hardware.
• A virtual machine provides an interface identical to
the underlying bare hardware.
• Virtualization gives an illusion of multiple machines
(complete hardware & OS).
• The operating system creates the illusion of
multiple processes, each executing on its own
processor with its own (virtual) memory
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.
● A key enabler is VMM (Virtural Machine Monitor).
•The virtual-machine concept provides complete protection of
system resources since each virtual machine is isolated from all
other virtual machines. This isolation, however, permits no direct
sharing of resources.
Virtual machines (CONT.)
VMware Architecture
Self Review
1. What is characteristic of a monolithic OS?
2. Why monolithic tend to be efficient?
3. What is the weakness of monolithic kernel?
Self Review
1. How layered architecture are more modular than
monolithic?
2. Why do layered tend to be less efficient than monolithic?
3. Define term ‘modular’ in layered architecture.

You might also like