operating systems and computer networks l1 - introduction · institute of computer engineering oscn...
TRANSCRIPT
Operating Systems and Computer Networks
L1 - Introduction
Prof. Dr.-Ing. Axel HungerAlexander Maxeiner, M.Sc.
Institute of Computer EngineeringFaculty of Engineering
University Duisburg-Essen
Alexander Maxeiner, M.Sc.
Alexander Maxeiner, M.Sc.University Duisburg-Essen
2Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Lecture of Operating Systems and Computer Networks
Material available at:
https://ti.uni-due.de/ti/en/education/teaching/ss19/oscn/index.php
Step by step: www.ti.uni-due.de (english site)
-> Lectures
-> Sommersemester 2019
-> Operating Systems and Computer Networks
Material
Alexander Maxeiner, M.Sc.University Duisburg-Essen
3Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Timetable
23.04. Eastern – No Lecture / Exercise
11.06. Pfingsten – No Lecture / Exercise
25.06. Survey for the demo examination
02.07. Last lecture & exercise
09.07. demo examination
Exercises are conducted after lecture
Material for Exercises will be provided. Solutions will not be published.
Alexander Maxeiner, M.Sc.University Duisburg-Essen
4Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Overview of content
Introduction to operating systems
Addressing
File management
Memory management
Process scheduling
Introduction to computer networks
Network transmission & code efficiency
Transmission protocols
Network topologies
Routing
Overview
Alexander Maxeiner, M.Sc.University Duisburg-Essen
5Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
What is an Operating System?
Introduction
A set of hardware or software components that are designed to run a specific function or task.
In computer science the focus lies on the systems build as a software to manipulate the underlying hardware.
An OS has the task to automatize several features of a given system and provide features of easy usage for the user.
It works as a mediator between parenting functions and/or human users.
Alexander Maxeiner, M.Sc.University Duisburg-Essen
6Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Introduction
The typical computer consists of 4 components:
Hardware
Operating System
Application Programs
Service Programs
Alexander Maxeiner, M.Sc.University Duisburg-Essen
7Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
The term ‘Hardware’ describes all physical components of a computer system
Example components of almost every computer system:
– Mainboard with Network-, Sound- and IO-peripherals
– Permanent storage medium (HDD, SSD)
– Volatile storage medium (RAM)
– Graphics accelerator (onboard or external)
Hardware should be easy replaceable in case of malfunctions or necessary upgrades
Added hardware should be easy implemented in a already installed OS.
Hardware
Alexander Maxeiner, M.Sc.University Duisburg-Essen
8Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
The operating system can be either an embedded software for hardware components and embedded systems or a installed set of software protocols and functions on a permanent storage device.
Operating systems vary in functionality and complexity depending on its demands.
The higher level OS of a computer has several layers, with the GUI on the highest level and the kernel mode on the lowest.
The kernel mode (supervisor mode) has access to all hardware components and can execute any instruction on it.
Safety measures usually prevent users access to the kernel mode to prevent system faults.
Operating System
Alexander Maxeiner, M.Sc.University Duisburg-Essen
9Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Service programs are additional sets of software that provide a specific service to the OS.
Drivers, for example, are service programs, since they provide libraries with addresses and instruction sets to create messages that can be interpreted by a specific hardware component for a desired effect.
I.e. the driver for a printer allows to create a message frame with the logical address for the printer, the set of instructions for the configuration and an interface for application software.
Sometimes hard to distinguish between service and application. What would be an anti virus software?
Service Programs
Alexander Maxeiner, M.Sc.University Duisburg-Essen
10Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Application Programs allow the user to interact with the computer in a specific way.
Working environments are application programs. They are set on top of the OS, interact with the OS through interfaces and have limited control over the hardware.
Direct access is usually not desired. A bug in a application software could damage the system. That is why the kernel handles system relevant tasks and handles software crashes.
Example for those interfaces provided by the OS Windows: Direct X.
Application Programs
Alexander Maxeiner, M.Sc.University Duisburg-Essen
11Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Overview of a computer
1) Central HW: CPU & Bus
2) Mass storage for the OSFile Managements fororganization
3) OS and GUI interface forthe user
4) Network communicationwithin the system & process management
Computer system overview
Alexander Maxeiner, M.Sc.University Duisburg-Essen
12Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Multilevel machines
Hierarchy
Level n
Level n-1
Level n -2
Level 1
Virtual Machine Mn
Language Ln
Virtual Machine Mn-1
Language Ln-1
Virtual Machine Mn-2
Language L n-2
Virtual Machine M1
Language L1Hardware
.
.
.
.
Applications
Alexander Maxeiner, M.Sc.University Duisburg-Essen
13Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
A computer system can be visualized as an abstract system of multiple levels interconnected with each other.
Each level is described as a virtual machine which can be simulated and abstracted.
Each level uses its own programming / interpreting language for operations.
The lower the level of a virtual machine, the closer it gets to the actual hardware.
Not to be confused with ‘Virtual machines’ as simulated computers on the top level of an operating system.
Multilevel machines
Alexander Maxeiner, M.Sc.University Duisburg-Essen
14Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Example
Level 5
Level 4
Level 3
Level 2
Level 1
Level 0
μ-program Level
Digital Logical Level
Conventional
Machine Level
Operation System
Machine Level
Assembler Languages
Problem Oriented
Translator Compiler
Translator Assembler
Interpreter : (OS)
Example of the several levels of a PC
Not a virtual machine anymore
Alexander Maxeiner, M.Sc.University Duisburg-Essen
15Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
An operating system with the GUI sits on the top level of an computer system. User application can be viewed as part of the OS or one level above.
The OS and its applications are written on the problem oriented level, meaning they are designed for specific tasks.
A compiler translates the higher level language into assembler, where direct interaction with the operating systems of the machines happens.
Those machine level embedded operating systems act as interpreters for assembler and execute the instructions.
Those instructions are then again translated into binary microprograms for logical gate manipulation.
Details of the level structure
Alexander Maxeiner, M.Sc.University Duisburg-Essen
16Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Every input in a computer system, from a keyboard in example, is stored as a symbol within the memory. The visualization of those symbols also happens on the lowest level controlled by the OS and the graphics accelerator.
There is no ‚up-compiling‘, meaning that lower level instructions are not re-translated into upper level functions. Results of processes are either stored within the memory, where top-level instruction can access them, translated into visual signals by the graphics hardware then interpreted by the monitor or other I/O features depending on the hardware.
Software designed on the higher level is not a running program until compiled. Until then it is just a text document.
I/O & OS
Alexander Maxeiner, M.Sc.University Duisburg-Essen
17Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
With all those parts combined a operating system has 4 main tasks:
Tasks of an OS
Process management
Memory management
Data management
Resources management
Alexander Maxeiner, M.Sc.University Duisburg-Essen
18Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Management not only means the handling, but also the optimization.
Optimization is implemented by the creator of the OS.
There is no solution that fits every demand, for different tasks a different solution might be more optimal than others.
Demands on optimization change through technological developments. I.e. 20 years ago every software was optimized for code size. Memory was scarce, thus every byte of code was used to full efficiency.
Today software is optimized for execution speed and power consumption for mobile devices.
Tasks of an OS
Alexander Maxeiner, M.Sc.University Duisburg-Essen
19Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Process management describes the algorithms after which an OS defines the access and runtime of tasks at the CPU.
Also the sequence of processes needs to be defined.
I.e. Boot process:
– When the system is powered, boot processes are started
– Operating system is loaded
– Kernel started, service programs initialized, GUI loaded
Process management dependent on capabilities of hardware.
Process management
Alexander Maxeiner, M.Sc.University Duisburg-Essen
20Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Programs currently running need memory to store data needed for fault-free execution of certain tasks.
As an example, video editing and rendering has high demands on the main memory. Every frame of a video needs to be stored, for optimal access times, within the RAM.
To prevent memory overflow errors and optimize the access times, depending on the priority of the data, the OS needs to manage the main memory.
If there is not enough main memory available for certain programs, the virtual memory concept will be used.
Memory management
Alexander Maxeiner, M.Sc.University Duisburg-Essen
21Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Where memory management handles the volatile storage memory, file managements is responsible for the permanent memory.
File manager need to keep track of all data stored on the device.
Thus virtual addresses are created and associated physical addresses are stored within the file manager.
File manager also need to optimize the data storage. Demands depend on the used technology.
On HDD data is organized for optimal access times.
On a SSD data is organized for fewer accesses, especially write access.
File management
Alexander Maxeiner, M.Sc.University Duisburg-Essen
22Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Resources describe the added components to a computer system.
Peripherals and tasks for those need to be managed.
Should a component be tasked with several jobs a queue needs to be established (i.e. printing).
If a new resource is added to the system, the OS needs to handle the installation of the driver or at least the management afterwards (Windows feature ‘Plug and play’).
The OS handles all functions from a application software design for a specific component.
Resources management
Alexander Maxeiner, M.Sc.University Duisburg-Essen
23Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Manual controlled OS
Time-sharing systems
Distributed systems
Real time systems
Embedded systems
Multi-user systems
Types of OS
Alexander Maxeiner, M.Sc.University Duisburg-Essen
24Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Console command based OS rely heavy on the manual user inputs for operation
Example for an old file config.sys:
Manual controlled OS
Source: David Hayward – geekfolk.com
Alexander Maxeiner, M.Sc.University Duisburg-Essen
25Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Time sharing systems
Terminals request resources from mainframe.
Mainframe grants access to resources depending on predetermined priorities.
Transfer of access due to downtimes of tasks or other algorithms. Model of a time sharing system
Alexander Maxeiner, M.Sc.University Duisburg-Essen
26Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Distributed systems
Example of a system with distributed components:
Every computer is connected to a system over a network.
Components of the systems share access to hardware.
Model of a distributed system
Alexander Maxeiner, M.Sc.University Duisburg-Essen
27Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Distinguish between hard or soft real time systems
Soft real time systems have a time limit for tasks that should be kept, but there is usual no critical repercussion if the deadline isn’t met.
Example: A video display software should deliver a frame every 33ms. No critical failure if it doesn’t.
Hard real time systems have a time limit for tasks that must be kept. Not meeting the deadline can have devastating effects.
Example: A control software for power electronic devises need a signal every fixed timeframe or the hardware can be permanently damaged.
Real time systems
Alexander Maxeiner, M.Sc.University Duisburg-Essen
28Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
The term ‚Embedded system‘ describes a computer system that has everything it needs to provide a certain task within a more complex system. (I.e. climate control system for a car)
Embedded systems
Embedded system example / Source: wikipedia
Alexander Maxeiner, M.Sc.University Duisburg-Essen
29Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Similar to time sharing systems.
Either one terminal for several users or several terminals (users) connected to one mainframe.
Multi-user systems
Multi-user system
Alexander Maxeiner, M.Sc.University Duisburg-Essen
30Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Multi-tasking / Time sharing systems
Batch systems
Overlapping CPU and I/O operations
SPOOL
Parallel systems / Multiprocessor systems
Subsystems / Functions Overview
Alexander Maxeiner, M.Sc.University Duisburg-Essen
31Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
If a system is capable of multi-tasking it tries to optimize throughput by having several jobs in the pipe and granting CPU access according to a predetermined algorithm.
Similar to the complex system with several terminals and one mainframe a single computer with a single CPU core processes instructions for a specific task and transfers CPU power to another after a certain event.
Such an event can be memory access, a predetermined time slot and/or others.
Details in respective chapter.
Multi-tasking / time sharing
Alexander Maxeiner, M.Sc.University Duisburg-Essen
32Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Batch systems bundle a set of jobs and execute them sequentially.
In a batch process there is no option to intervene until one batch is complete.
Jobs creating errors are dumped and the next one is executed.
The OS decides which jobs a merged to a batch.
Batch systems
One batch, executed linear without the option to intervene
Alexander Maxeiner, M.Sc.University Duisburg-Essen
33Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
While a computer core is running and executing instructions other hardware components can work in parallel.
A copy process from a permanent storage device to a volatile one may run parallel to the operations of a CPU.
Data may then accessed faster.
Overlapping IO / CPU
Parallel data transfer if different buses are used / bus currently free
Alexander Maxeiner, M.Sc.University Duisburg-Essen
34Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
SPOOL (Simultaneous Peripheral Operation On-Line) describes a method of storing several jobs that need access to a specific hardware until said hardware is available.
I.e. 3 jobs for the printer are an the queue. The system spools them by storing them in a memory storage and continues with other tasks not waiting for each job to be completed.
SPOOL
SPOOL-ing system
Alexander Maxeiner, M.Sc.University Duisburg-Essen
35Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
A system with 2+ cores is called a parallel-/multiprocessor system.
Jobs a distributed between the cores and executed parallel.
Compared to the single-core CPU technology one decade ago, multi-core CPU‘s have increased the speed of systems drastically.
Parallel / Multiprocessor
Intel quad core with sandy bridge / source: intel
Alexander Maxeiner, M.Sc.University Duisburg-Essen
36Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Introduction to Operating Systems
Questions?
End of lecture 1
Until next time