Computer Networks – abstraction & OS Vít PÁSZTO 10.3.2022 Abstraction • Intentionally hidden information – they are not important for the given purpose (at certain moment) – e.g. car, route description, school • More levels of abstraction – Depth of information we present / "hide" – It depends on the specific situation – e.g. informatics • In IT – computer systems complexity management technique – what is under "my" complexity - I will exclude Information and its representation • Information is a stimulus that has some significance for its recipient in a certain context or meaning. • Representation of information: – the way the data is on the computer: • Stored • Processed • Transmitted • Data - binary form (but various forms) Information and its representation • Number systems – A) binary system – B) octal system – C) hexadecimal system A B C Interpretation of information • Data as a sequence of characters is "without" information – The information is assigned by the recipient • The deepest level of abstraction (inside HW) - signals – Signals interpreted in the form of graphs, on an oscilloscope, 0/1 • And those 0/1 are the base and smallest unit in the form of a bit – A digit in binary form can have only one value (0/1) – On/Off; true/false; Yes/No – Character for digits in binary format (IEC 60027 standard) – Bits are used to encode information. If we use 1 bit, we encode 2 characters Interpretation of information • And those 0/1 are the base and smallest unit in the form of a bit – Full alphabet + numbers + "something" extra - 256 combinations (28) – 8 bits is a byte, or octet Interpretation of information Interpretation of information • At the time of data processing – computer works with the least number of bits, the so-called word. • On current computers, the word size is determined by 16, 32, 64 bits • Nibble - 4 bits (half a byte) Computer architecture • To clarify the operation of the computer • The specific way in which the computer is implemented - what components the computer is made of and how they are interconnected into a functional unit • Two basic approaches: – Von Neumann's architecture – Harvard architecture Von Neumann‘s architecture • Basic components: – control unit – arithmetic-logic unit (ALU), – (internal) memory – I/O devices – external memory (mass storage) • Our requirements/inputs – input devices • Computer replies/gives outputs – output devices Von Neumann‘s architecture • ALU – integrated with the control unit in the processor, processes our requests (+, -, *, /), evaluates them and sends the result to the output device • Control unit – sorts instructions processed by the processor in order they will be executed (according to priorities)  computer works sequentially (vs. multitasking) • Bus – connects components (it is a „cable“) – Address bus – addressable memory range – Data bus – for the data itself – Control – control signals (interrupt, read / write, etc.) Von Neumann‘s architecture • Operational memory - storage of program and data • Processor: Control unit + ALU • CPU - Central Processor Unit: Processor + Operational memory Von Neumann‘s architecture The principle of computer operation according to von Neumann: 1. The program that will perform the calculation is placed in the operational memory using the input devices via the ALU. 2. In the same way, the data that the program will process is placed in the operational memory 3. The calculation itself takes place, its individual steps are performed by the ALU. ALU with other modules is controlled by the control unit during the calculation. The intermediate results of the calculation are stored in the operating memory. 4. After the calculation, the results are sent via the ALU to the output device Harvard architecture • Same as von Neumann, BUT operation memory is divided – For data – for instructions (program) • Advantage: – Parallel processing of data and instructions (performance) • Disadvantage: – Multiple memory management (more control  demanding on CPU) – Creation of new programs (different addressing methods must be taken into account) Harvard architecture Cons & Pros Neumann • Pros: – the memory allocation for code and data is determined by the programmer, – the processor control unit accesses the memory for data and instructions in a uniform way, – one bus - easier manufacturing • Cons: – the joint storage of data and code can, in the event of an error, result in the program being overwritten, – a single bus is a bottleneck Harvard • Pros: – separation of data memory and program • the program cannot rewrite itself, • memories can be made by different technologies, • each memory can have a different size of the smallest addressing unit, • two buses allow simple parallelism, where both instructions and data can be accessed simultaneously. • Cons: – two buses place higher demands on the development of the processor control unit and increase the costs of production of the resulting computer, – the unused portion of the data memory cannot be used for the program and vice versa Operating system • is the basic software of the computer, which is loaded into the computer's memory at its startup and remains in operation until it is turned off or disconnected from the power supply • Consists of: – kernel, – auxiliary system tools (varies by version and manufacturer) • Main task: – is to provide the user with the ability to control the computer – create stable application interfaces (APIs) for processes – and allocate system resources to them Operating systems – types • For end users: – MS Windows (80%), MacOS (11.2%) and Linux (1.5%) – Mobile OS – Android (87.5%), iOS (12.1%), rest (0.4%) • For servers and supercomputers: – Exclusively used by the Linux operating system – Main reason – its security and reliability – TOP 500 supercomputers use Linux Operating system – functions • Three main functions: 1. computer control, allows the user to run applications, pass them inputs and obtain their outputs with results. 2. hardware abstraction, creates an interface for applications that abstracts hardware control and other functions into easy-to-use functions (API). 3. Resource management allocates and removes computer system resources to processes. Operating system – computer control • The ability to run a program at all, pass input data to it, and enable the results to be output to an output device • However, the concept of the operating system is also extended to the graphical user interface • Unclear boundary between the operating system and applications • OS with one GUI - included in the operating system • Systems with various GUI – it is not included in OS Operating system – composition • Kernel and auxilliary systems • Kernel is the base stone of OS – It is loaded into the computer's operating memory at startup and remains active throughout the running of the operating system. • Kernel: – monolithic core - the core is one functional unit – microkernel - the core is very small and all detachable parts work independently as normal processes. – hybrid core - combines the properties of a monolithic core and a microkernel. Operating system – GUI • Most of the modern computers • In some systems, it is directly integrated in the core of the system – The original implementation of MS Windows and Mac OS was the graphics subsystem, in fact part of the kernel • Other, modular - separates the graphics subsystem from the kernel and the operating system • The OS allows the user to install or create a graphical interface according to his requirements Computer Networks - abstraction Vít PÁSZTO 10.3.2022