Sie sind auf Seite 1von 32

What is an Operating System ?

• An operating system is a program designed to run other programs


on a computer.

• A computer operating system considered the backbone that


manages both software and hardware resources.

• Operating systems are responsible for everything in the computer,


from control and allocation of memory to recognizing
input/output from external peripherals. As well as manage files on
hard drives.
What are Operating Systems types
• Operating system can be classified as follows:
Multi–user operating system
• Allows two or more users to run programs at the same time.

Multi-processing operating system


• Supports running a program on more than one CPU.

Multi-tasking operating system


• Allows more than one program to run concurrently.

Multi-threading operating system


• Allows different parts of a single program to run
concurrently.
Choose the appropriate
operating system
•There are several vantage points from which to view an
operating system.
•One is by examining the services it provides.
•Second is by looking at the interface it makes available to
user and programmers.
•Third is by disassembling the system into its components and
their interconnection.
To inspect the above aspects we have to understand the
operating system structure.
Operating System Structure
1- System Components
2- System Services
3- System Calls
4- System Programs
5- System Structure
6- Virtual Machine
7- System Design
8- System Generation
End
Back
Back
Back
Back
Back
 Virtual machine used to create a virtual
environment which referred to as virtualization.

 By using CPU scheduling and virtual memory


techniques an operating system can create the
illusion of multiple processes each executing on
its own processor with its own virtual memory.

 Normally the process has additional features


such as system call and file system which are
not provided by the hardware.

 The virtual machine approach does not provide


any additional function but rather provides an
interface that is identical to the underlying
hardware.
Advantages/Disadvantages of Virtual
Machines

 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.

 More efficient use of computer hardware.

 The virtual machine concept is difficult to implement due to the effort


required to provide an exact duplicate of the underlying machine.

Back
Back
 Operating systems are designed to run on any class of machines.

 The system must be configured for each specific computer type, this
process called SYSGEN (system generation).

 SYSGEN program obtains information on specific configuration of the


hardware system and (CPU, memory, devices).

 Booting – starting a computer by loading the kernel.

Back
Process Management
 A process is a program in execution. A process need certain resources,
including CPU time, memory, files, and I/O devices, to accomplish its
task.

 The operating system is responsible for the following activities:


– process creation and deletion.
– process suspension and resumption.
– provision of mechanisms for:  process synchronization
 process communication

Back
Main-Memory Management
 Memory is a large array of words or bytes, each with its own address. It is a
repository of quickly accessible data shared by the CPU and I/O devices.
 Main memory is a volatile storage device. It loses its contents in the case
of system failure.

 The operating system is responsible for the following activities:

– Keep track of which parts of memory are currently being used


and by whom.
– Decide which processes to load when memory space becomes
available.
– Allocate and de-allocate memory space as needed.

Back
File Management
 A file is a collection of related information defined by its creator.
Commonly, files represent programs and data.
 The operating system is responsible for the following activities:

– File creation and deletion.


– Directory creation and deletion.
– Support of primitives for manipulating files and directories.
– Mapping files onto secondary storage.
– File backup on stable (nonvolatile) storage media.

Back
I/O System Management

 One of the purposes of an operating system is to hide the privacy of


specific hardware devices from the users.

 The I/O system consists of:

– Memory component including buffer-caching .


– A general device-driver interface.
– Drivers for specific hardware devices.

Back
Secondary-Storage Management
 Since main memory is volatile and too small to accommodate all data
and programs permanently, the computer system must provide
secondary storage to backup main memory.

 The operating system is responsible for the following activities:

– Free-space management.
– Storage allocation.
– Disk scheduling.

Back
Networking (Distributed Systems)
 A distributed system is a collection of processors that do not share
memory or a clock. Each processor has its own local memory.

 The processors in the system are connected through a communication


network.
 A distributed system collects physically separated, heterogeneous
systems into a single coherent system to provide:

-User access to the various resources.


-Computation speedup.
-Increase data availability.
-Enhanced reliability.

Back
Protection System
 If a computer has multiple users and allows the concurrent execution
of multiple processes, then the various processes must be protected
from one another’s activities.

 Protection refers to a mechanism, which provided to ensure that the


files, memory segments, CPU, and other resources can be operated on
by only those processes that have gained proper authorization from the
operating system.

 The protection mechanism must:

– Distinguish between authorized and unauthorized usage.


– Specify the controls to be imposed.
– Provide a means of enforcement.

Back
Command-Interpreter System
 Its One of the most important component of an operating system,
which is the interface between the user and the operating system.

 The main function of a command interpreter is to get and execute the


next user specified command.

 The program that reads and interprets control statements is called


variously:
 control-card interpreter
 command-line interpreter
 shell (in UNIX)
Command-Interpreter System
 Many commands are given to the operating system by control statements
which deal with:

– Process creation and management


– I/O handling
– Secondary-storage management
– Main-memory management
– File-system access
– Protection
– Networking

Back
System Calls
 System calls provide the interface between a running program and the
operating system.
 System calls allow user-level processes to request some services from the
operating system which process itself is not allowed to do. In handling the
job, the operating system will enter in the kernel mode, where it has access
to privileged instructions, and can perform the desired service on the
behalf of user-level process.
 Typically written in a high-level language.
 Three general methods are used to pass parameters between a running
program and the operating system:
– Pass parameters in registers.
– Store the parameters in a table or block in memory, and the table
address is passed as a parameter in a register.
– Push the parameters onto the stack by the program, and popped off
the stack by the operating system.
 System calls can be grouped into five major categories:

1- Process control 3- Device manipulation


• End, abort. • Request device, release device.
• Load, execute. • Read, write, reposition.
• Create process, terminate process. • Get device attributes, set device attributes.
• Get and set process attributes. • Logically attach or detach devices.
• Wait for time.
• Wait event, signal event. 4- Information maintenance
• Allocate and free memory • 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.
2- File manipulation
• Create file, delete file.
• Open, close. 5- Communication
• Read, write, reposition. • Create, delete communication connection.
• Get file attributes, set file attributes. • Send, receive message.
• Transfer status information.
• Attach or detach remote devices.

Back
System programs
 System programs provide a more convenient environment for
program development and execution. Some of them are simply user
interfaces to system calls, whereas others are considerably more
complex. They can be divided into several categories:

1- File manipulation : Manipulate files and directories such create,


delete, copy, list, rename…..etc.
2- Status information: Date, time, disk space, number of users….etc.
3- File modification: Text editors to modify files and directories
4- Programming-language support: Compilers, assemblers,
interpreters debuggers.
6- Program loading and execution: Loaders, linkage editors
7- Communications: Virtual connection, messages, remote login,
data transfer.

Back
System Structure
• Written to provide the most functionality in the least
space.
Simple • Not divided into modules.
Structure • Although it has some structure, its interfaces and
levels of functionality are not well separated.

• Operating System is divided into a number of layers


(levels), each built on top of lower layers. The bottom
layer (layer 0), is the hardware; the highest (layer N) is
the user interface.
Layered • With modularity, layers are selected such that each
Approach uses functions (operations)and services of only lower-
level layers.
• Design and implementation of operating system get
simplified in the layered approach.
Simple Structure Layered Approach

Back
Design goals
1- User goals:
 Operating system should be convenient to use, easy to
learn, reliable, safe and fast.

2- System goals:
 Operating system should be easy to design, implement,
and maintain, as well as flexible, reliable, error-free, and
efficient.
Mechanisms and Policies
1- Mechanisms determine how to do something while
policies decide what will be done.

2- The separation of policy from mechanisms a very


important principle, it allows maximum flexibility if
policy decisions are to be changed later.
System Implementation

1- Traditionally written in assembly language, operating


systems can now be written in higher-level languages.
2- Code written in a high-level language gives the benefits :
A– Can be written faster.
B– More compact.
C– Easier to understand and debug.
3- An operating system is far easier to port (move to some
other hardware) if it is written in a high-level language.

Back
Thanks
for your time

Das könnte Ihnen auch gefallen