Вы находитесь на странице: 1из 43

DFC 2063

OPERATING SYSTEM (OS)

SITI NUR THAZLIAH BINTI MOHD THAZALI


thazliah@gmail.com
019-7108077

Sources:
Reference books & Internet
CHAPTER 1 - INTRODUCTION TO
OPERATING SYSTEM
Learning Outcome:
Students will be able to
explain the basic
knowledge of OS ;
structures, platforms,
various products,
concepts related to
OS, components of OS
and interfaces
What is an Operating System?

• OS is a program that controls the execution of


application programs and acts as an interface between
applications and the computer hardware
• According to Deitel, H.M, Deitel, P. J, Choffnes, D. R.
(2004):
OS = Software that enables applications to interact
with a computer’s hardware.
(Operating System, 3rd Ed.)
• OS = is the one program running at all times on the
computer
▪ Objectives / Goals:

 to make using computer more convenient


 to use the computer system resources efficiently
 to permit effective development, testing and
introduction of new system functions without
interfering with service
 to execute user programs and to solve user
problems easier
Basic function of operating system

Managing Resources

• These programs coordinate all the computer’s


resources including keyboard, mouse, printer,
monitor, storage devices and memory.

Providing a user interface

• Users interact with application programs and


computer hardware through a user interface.
Almost all operating systems today provide a
windows-like Graphical
• User Interface (GUI) in which graphic objects
called icons are used to represent commonly
used features.
Basic function of operating system (cont…)
Running applications
• These programs load and run applications such as word processors and
spreadsheets.
• Most operating systems support multitasking, or the ability to run more
than one application at a time.
• As more programs are loaded, the operating system must allocate the
computer resources.

Support for built-in utility programs


• The operating system uses utility programs for maintenance and
repairs.
• Utility programs help identify problems, locate lost files, repair
damaged files, and backup data.
• Example Disk Defragmenter
Basic function of operating system (cont…)

Control to the computer hardware

• The operating system sits between the programs


and the Basic Input Output System (BIOS).
• The BIOS controls the hardware. All programs
that need hardware resources must go through
the operating system.
• The operating system can either access the
hardware through the BIOS or through the device
drivers.
Operating System Sturcture

A) Monolithic

B) Layered

C) Microkernel

D) Network / Distributed
MONOLITHIC STRUCTURE • earliest and most common
• Every component of the OS was contained within
the kernel, could communicate directly with any
other component, and had unlimited system
access
• Similar to the other OS, application and OS are
separating from each other.
• OS code runs in a privileged processor mode
(kernel mode) → has access to system data &
hardware
• Applications run in a non-privileged processor
mode (user mode) → has limited set of interfaces
available & with limited access to system data
MONOLITHIC STRUCTURE

• Problems with monolithic structure


1. Difficult to maintain
2. Difficult to take care of concurrency due to multiple users/jobs

• Example Systems: CP/M (control program/monitor) and MS- DOS


L S
A T • OS became larger and complex
• The component of layered OS are organized into
Y R modules & layers them one on top of each other.
E U • Each module provide a set of functions that other
module can call
R C • Interface functions at any particular level can invoke
services provided by lower layers but not the other way
E T around.

D U In this approach, the Nth layer can access services
provided by the (N-1)th layer and provide services to
R the (N+1)th layer
• This structure allows the OS to be debugged starting at
E the lowest layer, adding one layer at a time until the
whole system works correctly
L S
A T
Y R
E U
R C
E T
▪ Layering also makes it easier to enhance the OS → one
D U entire layer can be replaced without affecting other parts of
the system.
R ▪ However layered OS delivers low application performance
▪ Example Systems: VAX/VMS, Multics, UNIX
▪ Including Windows XP & Linux – implement some level of
E layering
MICROKERNEL STRUCTURE
• Provides small number of services and trying to keep kernel
small & scalable.
• File system, Process Scheduler & Device manager
components of OS execute outside the kernel with
lower privilege level.
• Microkernels are highly modular, making them
extensible, portable and scalable
• one or more component can fail, but NOT causing the
OS to fail.
• The new concepts in operating system → user-
level process
➢ The idea is to divide the operating system into several
processes, each of which implements a single set of
services –for example, I/O servers, memory server,
MICROKERNEL
process server, threads & interface system
STRUCTURE ➢ Each server runs in user mode, provides services to the
requested client .
➢ The client, which can be either another operating system
component or application program, requests a service by
sending a message to the server
NETWORK / DISTRIBUTED STRUCTURE
❑ Enables its process to access resources (e.g: files) from other
independent computers on network
❑ Client / server model
❑ Amongst popular local area network operating systems (NOS) are Novell
NetWare and Windows 2003
❑ NOS is software that controls the operations of a computer, including
local hardware activities and communication over network media.
❑ Most NOS are multitasking systems because they must support both
local and remote activities.
NETWORK / DISTRIBUTED
STRUCTURE
▪ Important features of NOS:-
▪ connect all machines and peripherals into a network.

▪ coordinates and controls the functions of machines and


peripherals across the network.
▪ support security and privacy for network and local.
▪ control access to resources depends on user
authentication.
▪ manages resources from centralized directory.

▪ gives ability to share resources


Operating System architectures are used in
different processing platforms

Single Processor Systems

Multi Processor
Systems

Clustered Systems
1st Platform: Single Processor System
✓ The main purpose of this system was to
enable the computer to move automatically
from one job to another, without the
operator having to intervene.
✓ Jobs (that consist of data and programs)
are queued.
✓ The computer would then process the jobs
one at a time without further human
intervention.

How this system works?


▪ user submit a job (written on card or
tape) to a computer operator.
▪ computer operator place a batch of
several jobs on a input device.
▪ Monitor manages the execution of each
program in the batch.
SINGLE PROCESSOR SYSTEM

• Monitor reads jobs one at a time from the


input device.
• Monitor places a job in the user program
area.
• Each program is constructed to branch back
to the monitor when it completes processing
▪ the monitor would automatically begin
loading the next program

• Drawbacks:
▪ some main memory is now given over to
the monitor
▪ some machine time is consumed by the
monitor
▪ both of these are forms of overhead
2nd Platform: Multi Processor System
• Multiple job are performed by the operating system
simultaneously at a time.
➢ when one job needs to wait for I/O, the processor
can switch to the other job – no waiting for I/O
➢ This means the system does not have to wait for one job
to be completed before starting the next
• Memory management is needed – requires scheduling
algorithm such as round robin algorithm.
• Multiple jobs are loaded into the central memory, and each is
allotted some CPU-TIME,
• When a job’s CPU-TIME is up, it is suspended and control
passes to the next job, which can continue from where it left
off before
MULTI PROCESSOR SYSTEM
3rd Platform: Clustered System

• Also known as Loosely Coupled configuration. It


features several complete computer systems which
has its own memory, I/O devices, CPU and operating
system
• This configuration is called Loosely Coupled because
each processor controls its own resources ( its own
files, access to memory…)
• But, each processor can communicate and
cooperate with the others.
Operating System Products
❑ Closed source
❑ Open source
HOW MUCH CAN YOU EXPLAIN THESE??
❑ What is an Operating System?
❑ List down the OS Architecture
(explain each one of them)
❑ Processing platforms of Operating System?
❑ List out various operating system products.
Concepts in relation to OS

Multitasking

• The ability to execute more than one


task at the same time, a task being a
program.
• Two basic types of multitasking:
preemptive and cooperative.
Concepts in relation to OS
Multiprogramming

• In the mid – 1960, computers were built with


faster CPUs but have problems interacting with
slower devices (printers, I/O devices)
• Introduced the solution = multiprogramming, a
concept of loading many programs at one time and
allowing them to share the attention of the single
CPU.
• Multiprogramming is implemented by using the
Interrupt.
Concepts in relation to OS

Time sharing

• The user can execute the job, and the


output is expected to be reasonably
instantaneous, even if other users are
executing their own jobs on the same
computer.
• The aim of a time-sharing operating system
is to give each user a response time (called
time-slice) of about three to five seconds.
Concepts in relation to OS

Buffering
• buffer is a region of memory used to temporarily hold
data while it is being moved from one place to another.
• Typically, the data is stored in a buffer as it is retrieved
from an input device (such as a keyboard) or just before
it is sent to an output device (such as a printer) or a
buffer may be used when moving data between
processes within a computer.
• Buffers can be implemented in either hardware or
software, but the vast majority of buffers are
implemented in software.
• Buffers are typically used when there is a difference
between the rate at which data is received and the rate
at which it can be processed, or in the case that these
rates are variable, for example in a printer spooler
Concepts in relation to OS

Spooling
• spool refers to the process of placing data in a
temporary working area for another program to
process.
• The most common use is in writing files on a magnetic
tape or disk and entering them in the work queue
(possibly just linking it to a designated folder in the
file system) for another process.
• Spooling is useful because devices access data at
different rates.
• Spooling allows one program to assign work to
another without directly communicating with it
• The most common spooling application is print
spooling
Concepts in relation to OS

Caching

• is a component that stores data so future requests for


that data can be served faster; the data stored in a
cache might be the results of an earlier computation,
or the duplicates of data stored elsewhere. A cache
hit occurs when the requested data can be found in a
cache, while a cache miss occurs when it cannot.
• Cache hits are served by reading data from the
cache, which is faster than recomputing a result or
reading from a slower data store; thus, the more
requests can be served from the cache, the faster the
system performs
Components of OS

• KERNEL
• SHELL
• FILE SYSTEM

FP202 - Fundamentals of Operating System


Components of OS

KERNEL

• The central module of an operating system.


• To manage the computer resources and allow
other program to run.
• It is the part of the operating system that loads
first, and it remains in main memory. Because it
stays in memory, it is important for the kernel to
be as small as possible while still providing all the
essential services required by other parts of the
operating system and applications.
• Typically, the kernel is responsible for memory
management, process and task management,
and disk management.
Components of OS

SHELL

• A shell is a piece of software that


provides an interface for users of an
operating system which provides
access to the services of a kernel
• An outer layer of interface between
the user and the internals of the
operating system (the kernel).
• Two categories of shell: command-line
and graphical
SHELL PROGRAM
program that provides the traditional, text-
only user interface for operating systems.
derives its name from the fact that it is an
outer layer of an operating system. A shell is
an interface between the user and the
internal parts of the operating system (at the
very core of which is the kernel)

Its primary function is to read commands


that are typed into a console (i.e., an all-text
display mode) or terminal window (an all-text
window) in a GUI (graphical user interface)
and then execute (i.e., run) them
Components of OS

FILE SYSTEM

• Has a File Manager, keeps track of every file in


the system, including data files, program files,
utilities, compilers, applications and so on
• File Manager enforces restrictions on who has
access to which files.
Applications talks with OS?
INTERFACES OF OS
1.COMMAND LINE
2.VOICE ACTUATED
3.GUI
4.WEB FORM
Command Line Interface
is a means of interacting with a
computer program where the user
(or client) issues commands to the
program in the form of successive
lines of text (command lines).
Voice Actuated Interface

Voice activation is the user interface of the future. Not


only will you be able to tell your computer what to do,
you will be able to activate multiple functions in your
car, television, or microwave oven by voice
commands.
Graphical User Interface
• An interface for issuing commands to a computer utilizing a pointing
device, such as a mouse, that manipulates and activates graphical
images on a monitor
Web Form Interface

• Web Forms are pages that users


request using their browser.
These pages can be written
using a combination of HTML,
client-script, server controls,
and server code
System Call vs. API
• System Call - provide an interface to the services
made available by an operating system.
• These calls are generally available as routines
written in C and C++, although certain low-level
tasks (for example, tasks where hardware must be
accessed directly), may need to be written using
assembly-language instructions.
• API - an abbreviation of application program
interface, is a set of routines, protocols, and tools for
building software applications. The API specifies how
software components should interact and APIs are
used when programming graphical user interface
(GUI) components
References
TechnologyUK (2012). Operating System Architecture. Retrieved on June 14, 2012 from
http://www.technologyuk.net/computing/operating_systems/operating_system_arc
hitecture.shtml

Silberschatz_Galvin (2005). Operating Sytem Concepts 7th ed

Chapter1:Operating System Models.Retrieved on June 18, 2012 from


http://www.buyya.com/microkernel/chap2.pdf

Murthy, U. S., & Groomer, S.M. (2001). Data communication and networking. Retrieved on
June 19, 2012 from https://www.cybertext.com/books/primer/chapters/ch2.htm

Wikimedia Foundation, Inc (2012). SunOS. Retrieved on June 21, 2012 from
http://en.wikipedia.org/wiki/Sun_os

Wikimedia Foundation, Inc (2012). Mac OS. Retrieved on June 21, 2012 from
http://en.wikipedia.org/wiki/Mac_OS

Вам также может понравиться