4. WHAT IS OPERATING
SYSTEM?
• An operating system is
– the most important software that runs on a computer.
– an integrated set of programs that acts as an
intermediary between the user and computer
hardware.
– responsible for everything from the control and
allocation of memory to recognizing input from
external devices and transmitting output to
computer displays.
4
5. WHAT IS OPERATING
SYSTEM?
• The goal of operating systems is:
– PRIMARY: to make the computer system convenient to use
in an efficient manner.
– SECOND: to manage the resource of a computer system.
• It is considered the backbone of a computer,
managing both software and hardware resources.
– manage files on computer hard drives and control peripherals, like printers
and scanners.
• Without an operating system, a computer is useless.
5
6. OPERATING SYSTEM’S JOB
Booting is the process that occurs
when we press the power button to
turn computer on. At the end of that
process, the operating system loads.
From this point,
- The OS begins to do its job of
controlling the way in which
the computer functions.
- The operating system serves as the
boss, or manager, and makes sure all
the various parts of the computer get
what they need.
Windows Operating System Loading
6
7. OPERATING SYSTEM’S JOB
• Users may work on a Word document, print an email, and have Internet
browser open for web surfing, all at the same time. These three programs need
attention from the central processing unit (CPU) to do whatever task that the
user are telling it to do.
• These programs need memory and storage, and need to be able to send
messages to devices such as the mouse and the printer to accomplish these
tasks.
• The operating system is responsible for handling these areas, as well
as processor and network management.
7
8. • Operating systems usually come preloaded on the desktop and laptop
computers.
• Most people use the operating system that comes with their computer, but it
is possible to upgrade or even change operating systems.
• The three most common operating systems for personal computers are
• Microsoft Windows, Apple Mac OS X, and Linux.
OPERATING SYSTEMS
8
9. USER MODE/KERNEL MODE
USER MODE:
- A mode of the CPU when running a
program.
- In this mode, the user process has no
access to the memory locations used by the
kernel.
- When a program is running in User Mode, it
cannot directly access the kernel data
structures or the kernel programs.
KERNEL MODE:
- A mode of the CPU when running a
program.
- In this mode, it is the kernel that is running
on behalf of the user process and directly
access the kernel data structures or the
kernel programs.
- Once the system call returns, the CPU
switches back to user mode.
USER MODE/KERNEL MODE
9
10. BASIC FUNCTION OF OS
• Managing resources:
– These programs coordinate all the computer’s resources including keyboard, mouse,
printer, monitor, storage devices and memory.
– An operating system creates a file structure on the computer hard drive where user
data can be stored and retrieved
– When a file is saved, the operating system saves it, attaches a name to it, and
remembers where it put the file for future use.
– The way an operating system organizes information into files is called the file system
– Most operating systems use a hierarchical file system, which organizes files into
directories (folders) under a tree structure
10
12. • 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.
• 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.
–
– When a user requests a program, the operating system locates the
application and loads it into the primary memory or RAM of the computer.
– As more programs are loaded, the operating system must allocate the
computer resources.
12
BASIC FUNCTION OF OS
13. • 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.
– The figure here shows the progress of the Disk Defragmenter,
which is found in Programs > Accessories > System Tools.
13
BASIC FUNCTION OF OS
15. MONOLITHIC
• The components of monolithic operating system are
– organized haphazardly and any module can call any other module
without any reservation.
• Applications in monolithic OS are
– separated from the operating system itself
• The operating system code runs
– in a privileged processor mode (referred to as kernel mode), with
access to system data and to the hardware; applications run in a non-
privileged processor mode (called as user mode), with a limited set of
interfaces available and with limited access to system data.
15
16. MONOLITHIC
When a user-mode program calls a system service,
- the processor traps the call and then switches the calling thread to kernel
mode.
- Upon completion, thread switched back to the user mode, by the operating
system and allows the caller to continue.
- It delivers better application performance, but extending such a system can be
difficult work because modifying a procedure can introduce bugs in seemingly
unrelated of the system. The example of this structure like a MS-DOS. 16
17. LAYERED
• The components of layered OS are
– organized into modules and layers them on top of the other
– Each module provide a set of functions that other module can call
– Interface functions at any particular level can invoke services provided by lower
layers but not the other way around.
– A layer does not need to know how these services are implemented, it needs to
know only what the service do.
• Advantage of layered structure:
– Each layer is given access to only lower-level interfaces (Nth layer can
access services provided by N-1th layer and provide services on N+1th
layer)
– Allow the OS to be debugged starting at the lowest layer
– Easier to enhance the OS, one entire layer can be replaced without
affecting other parts of the system.
• Disadvantage of layered structure:
– Delivers low application performance in comparison to monolithic
OS
• Example: UNIX 17
19. MICROKERNEL
• Moves as much from kernel into “user” space
• The main function of the microkernel is
– to provide communication facility between the client program and the various
services that are also running in user space.
• Communication takes place between user modules using message
passing
– If the client program wishes to access a file, it must interact with the server
– The client program and the service never interact directly, they communicate
indirectly by exchanging messages with microkernel
• Benefits:
– Easier to extend microkernel
– Easier to port the operating system to new architecture
– More reliable (less code running in kernel mode)
– More secure
• Example: Windows NT
19
all new services are added
to user space; do not
require modification of the
kernel
Most services are running as
user
21. NETWORKED
• Network Operating System
(NOS)NOS
• Loosely-coupled operating
system for heterogeneous
multicomputer (LAN and WAN)
Description
• Offer local services to remote
clientsMain goal
21
22. 22
NOS: CHARACTERISTICS
• Network Operating System
– extension of centralized operating systems
– offer local services to remote clients
– each processor has own operating system
– user owns a machine, but can access others (e.g. rlogin, telnet)
– no global naming of resources
– system has little fault tolerance
– e.g. UNIX, Windows NT, 2000
23. DISTRIBUTED
• Distributed Operating SystemDOS
• Tightly-coupled operating system
for multi-processors and
homogeneous multicomputer
Description
• Hide and manage hardware
resources
Main goal
23
24. 24
DOS: CHARACTERISTICS
• Distributed Operating Systems
– Allows a multiprocessor multicomputer network resources to be integrated
as a single system image
– Hide and manage hardware and software resources
– provide heterogeneity support
– control network in most effective way
– remote file and device access
– synchronization and deadlock avoidance
– resource allocation and protection
– global resource sharing
– deadlock avoidance
– communication security
– no examples in general use but many research systems: Amoeba, Chorus
etc.
27. ARCHITECTURE OF OS
SINGLE PROCESSOR SYSTEM
– Most systems use single processor systems.
– They perform only one process at a given time, and it carries out the
next process in the queue only after the current process is completed.
– OS monitors the status of them and also sends them next executable
instruction.
– It relieves CPU of disk scheduling and other tasks.
– It is suitable for general purpose computers, as it cannot run multiple
processes in parallel.
27
28. MULTI PROCESSOR SYSTEM
- Also known as parallel or tightly coupled systems as they can run
multiple process in parallel to each other efficiently.
- Two or more processors will be in close communication with each
other with shared memory, storage and power supply.
28
ARCHITECTURE OF OS
29. CLUSTERED SYSTEM
- Clustering allows two or more systems to share storage.
- Provides high reliability
- Asymmetric clustering: one server runs the application or
applications while other servers standby
- Symmetric clustering: all N hosts are running the application or
applications
29
ARCHITECTURE OF OS
31. PRODUCT OF OS
CLOSED SOURCE SYSTEM
• Developed by Companies and developers work for economic purposes.
• Users may suggest requirements but they may or may not be implemented
• Release is not too often. There may be only yearly releases.
• Market believes commercial CSS is highly secure because it is developed
by a group of professionals confined to one geographical area under a
strict time schedule.
– But quite often this is not the case, hiding information does not make it secure, it only hides its
weaknesses.
• Security cannot be enhanced by modifying the source code.
• Example: WINDOWS
31
32. OPEN SOURCE SYSTEM
- Developed By Volunteers work for peer recognition.
- People know that recognition as a good developer have great advantage.
- User suggests additional features that often get implemented.
- Software is released on a daily or weekly basis.
- OSSD is not market driven; it is quality driven.
- Community reaction to bug reports is much faster compared to CSSD which
makes it easier to fix bugs and make the component highly secure
- The ability to modify the source code could be a great advantage if
you want to deploy a highly secure system.
- Example LINUX
32
PRODUCT OF OS
33. CONCEPTS IN RELATION TO OPERATING
SYSTEM
MULTITASKING
- The ability to execute more than one task at the same time, a task being a
program.
- 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.
- There are two basic types of multitasking:
– Preemptive
• the operating system parcels out CPU time slices to each program.
• e.g: Windows 95, Windows NT, Amiga operating system and UNIX
– Cooperative
• 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.
• e.g: Microsoft Windows 3.x and the MultiFinder (for Macintosh computers)
33
35. MULTIPROGRAMMING
- Multiprogramming is the technique of running several programs at a time
using timesharing.
- It allows a computer to do several things at the same time.
- Multiprogramming creates logical parallelism.
- The concept of multiprogramming is that the operating system keeps
several jobs in memory simultaneously.
- The operating system selects a job from the job pool and starts executing
a job, when that job needs to wait for any i/o operations the CPU is
switched to another job
35
CONCEPTS IN RELATION TO OPERATING
SYSTEM
36. • Example of multiprogramming, we listen to music and do internet
browsing at the same time (they execute parallely).
MEMORY
BOTH PROGRAM
EXECUTE
PARALLELY
36
37. TIME-SHARING
- The use of a computer system by more than one individual at the
same time.
- Time-sharing runs separate programs concurrently by interleaving
portions of processing time allotted to each program (user).
- Time-sharing, however, is generally associated with multiple users
accessing larger computers and service organizations, whereas
multitasking in functions related to microcomputers implies the
performance of multiple tasks for a single user.
37
CONCEPTS IN RELATION TO OPERATING
SYSTEM
38. BUFFERING
• A temporary storage area, usually in RAM.
• Store data in memory while transferring between devices.
• The purpose of most buffers is to act as a holding area, enabling the CPU to
manipulate data before transferring it to a device.
– because the processes of reading and writing data to a disk are relatively slow,
many programs keep track of data changes in a buffer and then copy the buffer to a
disk
• For example;
– word processors employ a buffer to keep track of changes to files. Then when
you save the file, the word processor updates the disk file with the contents of the
buffer. This is much more efficient than accessing the file on the disk each time you
make a change to the file.
• Commonly used when;
– burning data onto a compact disc, where the data is transferred to the buffer before
being written to the disc.
– printing documents. When you enter a PRINT command, the operating system copies
your document to a print buffer (a free area in memory or on a disk)
38
CONCEPTS IN RELATION TO OPERATING
SYSTEM
39. SPOOLING
- Spool stands for “simultaneous peripheral operations online”.
- A spool is a buffer that holds output for a device, such as a printer that
cannot accept interleaved data streams.
- Spooling refers to
– process of transferring data by placing it in a temporary working area where another
program may access it for processing at a later point in time
– Although a printer can serve only one job at a time,
– several applications may wish to print their output concurrently,
– without having their output mixed together.
– operating system solves this problem by intercepting all output to the printer.
39
CONCEPTS IN RELATION TO OPERATING
SYSTEM
40. • Each application's output is spooled to a separate disk file.
– When an application finishes printing, the spooling system
queues the corresponding spool file for output to the printer.
• The spooling system copies the queued spool files to the printer
one at a time.
• Without a spooler, the OS would allow data to pass to the printer
and the application program would wait for completion before
continuing.
40
41. CACHING
• A cache is a temporary storage area that keeps data available for
fast and easy access.
• For example, the files you automatically request by looking at a web
page are stored on your hard disk in a cache subdirectory under
your browser’s directory.
• When you return to a page that you have recently viewed, the
browser can get those files from the cache rather than from the
original server, saving you time and saving the network the burden
of additional traffic.
• Caching (verb, pronounced “cashing”) is the process of storing data
in a cache.
41
CONCEPTS IN RELATION TO OPERATING
SYSTEM
43. 43
KERNEL
Represents the OS basic functions such as
- management of memory,
- processes,
- files,
- main inputs/outputs
- communication functionalities
SHELL
Allowing communication with the operating system via a control
language,
Letting the user control the peripherals without knowing the
characteristics of the hardware used,
Management of physical addresses, etc.
FILE SYSTEM
A file system (sometimes written filesystem) is the way in
which files are named and where they are placed logically
for storage and retrieval.
45. USER INTERFACE
• A user interface is
– the system by which people (users) interact with a machine. The user interface
includes hardware (physical) and software (logical) components.
• User interfaces exist for various systems, and provide a means of;
– Input, allowing the users to manipulate a system, and/or
– Output, allowing the system to indicate the effects of the users' manipulation.
• Users may also interact with the operating system with some kind of
software user interface like typing commands by using command line
interface (CLI) or using a graphical user interface.
• For hand-held and desktop computers, the user interface is generally
considered part of the operating system.
• On large multi-user systems such as Unix-like systems, the user
interface is generally implemented as an application program that runs
outside the operating system.
45
47. COMPONENTS OF THE USER
INTERFACE
The user interface has two main components:
– Presentation language, which is the computer-to-human part
of the transaction.
– Action language that characterizes the human-to-computer
portion.
47
48. VOICE USER INTERFACE
• A Voice User Interface (VUI) makes human interaction with
computers possible through a voice/speech platform in order to
initiate an automated service or process.
– the interface to any speech application.
• There are two different types of voice recognition:
– Continuous speech systems, allowing for dictation.
– Speaker independence, so people can enter commands or
words at a given workstation.
48
49. GRAPHICAL USER INTERFACE
(GUI)
• A graphical user interface or GUI is
– a type of user interface item that allows people to interact with programs in more ways
than typing such as computers
• Examples:
– hand-held devices such as MP3 Players, Portable Media Players or Gaming devices;
household appliances and office equipment with images rather than text commands.
• A GUI offers graphical icons, and visual indicators, as opposed to text-
based interfaces, typed command labels or text navigation to fully
represent the information and actions available to a user.
49
50. GUI CHARACTERISTICS
Characteristic Description
Windows Multiple windows allow different information to be
displayed simultaneously on the user’s screen.
Icons Icons different types of information.On some systems,
icons represent files; on others, icons represent
processes.
Menus Commands are selected from a menu rather than typed
in a command language.
Pointing A pointing device such as a mouse is used for selecting
choices from a menu or indicating items of interestin a
window.
Graphics Graphical elements can be mixed with texton the same
display.
50
51. WEB FORM INTERFACES
• Web Form interfaces are onscreen forms displaying fields containing data
items or parameters that need to be communicated to the user.
• Web Form interfaces may be implemented using the Web.
• A Web Form allows a user to enter data that is sent to a server for
processing.
• Web forms resemble paper forms because internet users fill out the forms
using checkboxes, radio buttons, or text fields.
– For example, Web Forms can be used to enter shipping or credit card data to order a product or
can be used to retrieve data (e.g.: searching on a search engine).
• In addition to functioning as input templates for new information, Web Forms
can also be used to query and display existing data in a similar manner to
mail merge forms, with the same advantages.
51
53. COMMAND-LINE
INTERFACE• CLI are often used by programmers and system administrators, in
engineering and scientific environments, and by technically
advanced personal computer users.
• Examples of CLI application:
53
55. SYSTEM CALLS
• User programs are not allowed to access system resources
directly.
– They must ask the OS to do that for them.
• OS provides a set of functions that can be called by user programs
to request for OS services. These functions are called “system
calls”
• System calls run in kernel mode.
– They can be called by executing a special instruction (trap or software interrupt)
which causes processor to switch to the kernel mode and jump to a previously
defined location in the kernel.
– When the system call finishes, processor returns to the user program and runs in
user mode.
55
56. APPLICATION PROGRAMMING
INTERFACE (API)
• An API is a set of functions provided by an operating system or other system
software.
– An application program calls the functions to request the services.
• An API clearly defines how to call functions and what the results are. (API is
specification, not implementation)
– Examples: APIs for file system, graphics user interface, networking, etc.
• Portability
– User programs that follow the API’s definition are portable.
• An API can provide a common interface for different implementations of a
service.
– For example, the UNIX file system API is the same for all kinds of devices.
– X windows API has many implementations on different machine architectures
• Using an API allows upgrading system software without changing user programs
56
57. ACTIVITY
Describe the interaction by using graphical
representation between applications and the
operating system.
Describe the relationship between system calls
and Application Programming Interface (API)
57