Professional Documents
Culture Documents
Chapter 1 ONE
Chapter 1 ONE
User 1
Applicatio 2
n
Operating
3
System
Hardware 4
Operating System Definition
OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and fair
resource use
OS is a control program
Controls execution of programs to prevent errors and
improper use of the computer
Operating System Definition (Cont.)
“The one program running at all times on the
computer” is the kernel.
Everything else is either a system program (shipped
with the operating system) or an application program
Identify the basic functions of
operating system
Basic functions of operating system
Basic Functions
of OS
Program
Create Password Memory
execution
Edit
Rename
and more
11
Describe the various operating
system structure
Monolithic, Layered, Microkernel, Networked
and distributed
Operating System Structure
The operating system structure is divided into:
1. Monolithic
2. Layered
3. Microkernel
4. Networked and distributed
1. Monolithic Architecture
The earliest and most common OS architecture.
Every component of OS contained in the kernel and
can directly communicate with any other (i.e by using
function system call).
The kernel typically executes with unrestricted
access to the computer system (refer to next
diagram)
Monolithic OS kernel architecture
Kernel Space
System Call Interface
System Services
Windows Security
VM Process
MGR Reference
Manager Manager
& GDI Monitor
IO
Graphics Manager
Device Windows 2000 Kernel
Drivers
Closed Source
Software
Have
copyright/ source
patented, code is
legally
protected as kept as
intellectual secret
property
i.e. Microsoft
Windows
and Office
Closed Source Software
Weakness: Users have no idea how it was made. You
must accept the word of a software vendor for the quality
of their own product.
Commercial vendors have, in theory, the resources to
respond very rapidly to severe reliability or security
problems in their software. They should be able to
provide manned contact points on a 24 by 7 basis. They
should be able analyse a problem and have a fix ready in
hours.
It takes little to medium skills to find security holes in
closed source software. It takes very advanced reverse
engineering and assembly language skills to fix closed
source software. Often the license prohibits you from
modifying the product.
Open Source Software
Open Source Software
Weakness: its supporters.
Strength: Most open source projects are being
worked on by developers who do it for fun and in
their own time. Most projects have no funding or
financial support. There are often no official code
reviews or quality assurance processes in place.
With the correct knowledge it is quite trivial to find
security problems in open source software. With the
correct knowledge, it becomes trivial to use this
information for evil purposes. With the correct
knowledge, it is quite trivial to fix these problems.
permits users to study permits users to change
Open Source
Software
License
2) 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.
… Operating System Components
3) File System
Allowing files to be recorded in a tree structure.
Describe the interaction between applications
and the operating system by using graphical
representation.
Identify the different interfaces of
operating systems:
Title ISBN
Author Price
Publication
Publisher date
Number of
Edition copies
Classification Loan
status
Date of
Order
purchase
status
Describe the relationship between System Calls
and Application Programming Interface (API)
System Calls & Application Program Interface
(API)
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.
System Calls
Programming interface to the services provided by
the OS
Typically written in a high-level language (C or C++)
OS Services mostly accessed by programs via a
high-level Application Program Interface (API)
rather than direct system call use
Most common APIs:
Win32 API for Windows,
POSIX API for POSIX-based systems (including virtually
all versions of UNIX, Linux, and Mac OS X), and
Java API for the Java virtual machine (JVM)
How System Calls Are Used:
Job: Open two files in order to read data from
one file then copy them to another file.
Program ask user for
name of files.
Prompt Message
Read from
Interactive:
Name
keyboard: name
on screen, asking
for name of files
of files typed by
user
of 2
files
Mouse/Icon based:
New Window
appear: user
specify
destination name
Why use APIs rather than system calls?
An application programmer designing a program
using an API can expect his program to compile and
run on any system that supports the same API.
Actual system calls can often be more detailed and
difficult to work with than the API.
Example of Standard API
Consider the ReadFile() function in the Win32 API—a function for reading from a
file