IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk - 1 - Sissejuhatus informaatikasse.

Slides:



Advertisements
Similar presentations
What is an Operating System?
Advertisements

Chap 2 System Structures.
A. Frank - P. Weisberg Operating Systems Process Scheduling and Switching.
Winter 2005 CMPE 151: Network Administration Lecture 2.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Phones OFF Please Operating System Introduction Parminder Singh Kang Home:
Review: Operating System Manages all system resources ALU Memory I/O Files Objectives: Security Efficiency Convenience.
OS Spring’03 Introduction Operating Systems Spring 2003.
Chapter 1 and 2 Computer System and Operating System Overview
Modified from Silberschatz, Galvin and Gagne ©2009 CS 446/646 Principles of Operating Systems Lecture 1 Chapter 1: Introduction.
Chapter 1 and 2 Computer System and Operating System Overview
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
Computer Organization and Architecture
Process Description and Control A process is sometimes called a task, it is a program in execution.
OS Spring’04 Introduction Operating Systems Spring 2004.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
CS364 CH08 Operating System Support TECH Computer Science Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management.
An Introduction to Operating Systems. Definition  An Operating System, or OS, is low-level software that enables a user and higher-level application.
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Operating Systems Who’s in charge in there?. Types of Software Application Software : Does things we want to do System Software : Does things we need.
TTÜ 2007 T.Tammet, M.Kääramees IT sissejuhatus loeng 8 lk Sissejuhatus infotehnoloogiasse Operatsioonisüsteemid mitmed slaidid:
System Calls 1.
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Operating System. Architecture of Computer System Hardware Operating System (OS) Programming Language (e.g. PASCAL) Application Programs (e.g. WORD, EXCEL)
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Operating Systems.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-1 Process Concepts Department of Computer Science and Software.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview Part 2: History (continued)
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
E X C E E D I N G E X P E C T A T I O N S OP SYS Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Functions of an operating.
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Lecture 1: Network Operating Systems (NOS) An Introduction.
Operating Systems. Categories of Software System Software –Operating Systems (OS) –Language Translators –Utility Programs Application Software.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
1 OPERATING SYSTEMS. 2 CONTENTS 1.What is an Operating System? 2.OS Functions 3.OS Services 4.Structure of OS 5.Evolution of OS.
Introduction to Operating Systems Concepts
Operating System & Application Software
Chapter 1: Introduction
Introduction to Basic OS Concepts
Processes and threads.
Operating System.
Chapter 1: Introduction
Chapter 1: Introduction
TYPES OFF OPERATING SYSTEM
Chapter 1: Introduction
Who’s in charge in there?
Processor Fundamentals
Chapter 1: Introduction
Threads Chapter 4.
Chapter 1: Introduction
Chapter 1: Introduction
CS149D Elements of Computer Science
Chapter 1: Introduction
CS510 Operating System Foundations
Software - Operating Systems
Chapter 1: Introduction
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Chapter 1: Introduction
Presentation transcript:

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Sissejuhatus informaatikasse

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Miks opsüsteem? Opsüsteemi põhieesmärgid: Pakkuda programmeerijale valmistehtud standardtükke. Võimaldada kasutajal arvutis ühtemoodi ja harjumuspäraselt tegutseda, sõltumatult sellest, mis programmid tal arvutis on. Miks opsüsteem? Arvutit saaks programmeerida ka ilma opsüsteemita. Sel juhul: oleks iga programmi tegemine palju raskem kui opsüsteemi olemasolu korral. kasutajate jaoks näeks eri programmid väga eri moodi välja.

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Mida opsüsteem enamasti teeb? Oskab kettalt programme lugeda ja neid käima panna. Oskab programme seisma panna (lõplikult või ainult väikese pausi jaoks) Oskab kettale faile ja katalooge kirjutada ja sealt neid lugeda. Oskab välisseadmetega (printer, monitor, klaviatuur jne jne) suhelda. Oskab võrguga suhelda. jne Kui opsüsteemi ei oleks, peaks iga programm kõiki neid asju ise teha oskama!

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Naked machine What is there in the naked machine (unclothed by an OS)? CPU (registers, opcodes), Memory (may be several chunks), Devices (mapped to memory locations, able to transfer data to and from memory).

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Definitions of OS!? … Extended machine, or virtual machine. Takes the basic hardware, and provides additional layers of functionality. The virtual machine is usually simpler and more consistent than the real machine. Practically, additional layers will build on the lowest-level ones, providing a rich programming model for the applications software (which in turn provides a 'virtual machine' to the user). Resource manager. Allocates scarce resources, like disk space, memory, processor between competing processes and users. Each process thinks that it has its own machine (its own files, its own printer, whatever). In a way, this is also extending the machine (in order to appear to be many machines). Anything which runs in the computer's privileged mode, or supervisor mode. Typically most modern processors have two or more operating modes, user and supervisor. In supervisor mode, able to access all of memory and all hardware.

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Definitions of OS!? The software which is supplied with the machine. Often includes many things not traditionally considered part of the operating system, like GUIs, editors, Web browsers, and stuff. A platform on which other software can run. Lots of platforms are not operating systems (like Netscape Navigator, or Microsoft Word). Java is almost an operating system. Provides many services commonly associated with Operating Systems, like managing multiple concurrent processes, and providing access to files.

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Operatsioonisüsteemide arengulugu Arvutid ilma OS-ita Batch processing süsteemid Multiprotsessing ja terminalid - UNIX Personaalarvutid - IBM, Xerox, Apple, DOS, Windows

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Operatsioonisüsteemi roll

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk OS layers

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Operatsioonisüsteemide omadused Funktsionaalsus Protsesside haldamine Mälu haldamine Failisüsteemid Võrguprotokollid Kasutajate haldamine

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Interrupts The interrupt handler must save the machine state, do some processing, then call the process scheduler and dispatcher. When an interrupt occurs 1.the processor hardware makes a quick copy of the program counter and CPU registers 2.the hardware switches to kernel mode and jumps to the interrupt service routine 3.the ISR is usually very short. It may inform a device driver that it received the interrupt; it may just increment some clock counters. 4.next the ISR calls the scheduler, which decides which process to run 5.the scheduler calls the dispatcher, and new process (or maybe the same process) resumes where it left off An important goal of the OS is to hide interrupts from the user---and from user-level processes.

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Processes have their own memory areas

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Multitasking and scheduling

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Parallel running of processes is a movie-like illusion http: //w ww. yout ube. com /wat ch?v =qq smei __k mQ

Running programs in parallel Each program gets ca 0.01 sec time slice, then another runs, etc, cyclically. Slices vary: from to ca 0.1

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Processes wait and run – when chance comes

Main scheduling algorithm goals Fairness. Treating users fairly: everybody gets some time to run Respecting priority. That is, giving more important processes higher priorit Efficiency. Do not spend excessive time in the scheduler. Try to keep all parts of the system busy. Low turnaround time. Minimize the time from the submission of a job to its termination. High throughput. Maximize the number of jobs completed per day. Low response time. Minimize the time from when an interactive user issues a command to when the response is given. Repeatability. Non-random, predictable behavious Degrade gracefully under load.

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Process lifecycle in more details

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Memory handling Defines - which application occupies, which part (block/segment)

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Memory handling Organise virtual memory to fit all application memory into existing (static memory size) Consider we have App1, App2, App3, App4. App1 occupies section 1, App2 occupies section 2, App3 occupies section 3. What we do with App4?? All those Applications are not runnig at the same time (see previous slides or processes handling). So we could store another application memory to HDD and reuse that space fro Appl4!!!... and then when this other (lets say App1) is activated move App4 memory to HDD and restore App1 memory (before activating App1 – so it is not visible for her). This process is called swapping. Decrease number of swaps: For example if the execution sequence is App1, App2, App3, App4, App1, App4, App1 and all apps requires the same block then instead of replacing App1 with App4 we could replace App2 with App4. The last case App4, App1, App4, App1 will not require swapping App1 and App4 permanently. Instead App2 will be at HDD and both App1 and App4 in memory

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Memory handling a, b, x since we use: b=2; x=3; a=b/x; a, b, x are integer, so requires 2 bytes, so: a=> address 000 (i.e. bytes 000, 001) b => address 010 (i.e. bytes 010, 011) c => address 100 (i.e. bytes 100, 101) App is loaded starting from address, so: a starts at b starts at c starts at

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Cache ja mälu hierarhia Pilt selgitustega tahvlil. Alternatiiv: loe vastavat kohta lisamaterjalist Computer Systems: a programmers perspective Computer Systems: a programmers perspective

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Operatsioonisüsteemide omadused Kasutatavus Liides: käsurida (CLI), graafika (GUI) Olemasolevad rakendused, teenused Vajalik riistvara Haldusvahendid, kaughaldus Stabiilsus Skaleeruvus Tugi Hind

Suured praegused opsüsteemid, nende põhirakendusvaldkonnad ja umbkaudsed turuosad Windows (Microsoft) Tava-arvutid (92%) Serverid (36% servereid) Mobiilid (alla 1% mobiile) OS X ja iOS (Apple) Mobiilid (iphone 25% / ipad 36 %) Tava-arvutid (mac, 6.5%) Linux (vabavara) Mobiilid (Android, 21% mobiile) Serverid (63% servereid) Pisiseadmed (domineeriv) Tava-arvutid (1.5 %) BSD (vabavara) Serverid Mõned väiksemad: Symbian (mobiil) Blackberry (mobiil) Bada (Samsungi mobiil) TinyOS (pisiseadmed) zOS (IBM mainframes) Unix

Android OS structure

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Süsteemi koguhind Riistvara Tarkvara litsentsid Tehniline tugi Tarkvara upgrade Riistvara upgrade Seisaku põhjustatud kasumi kadu Installeerimise kulu Haldamise kulu Riistvarast või OS-ist põhjustatud rikutud andmete taastamise kulu Välja- ja ümberõppe kulud

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Näide: süsteemi hinna kujunemine

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Failisüsteemide võrdlus

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Pääsuõigused NTFS failisüsteemis Iga faili ja kataloogiga on seotud pääsuõiguste nimekiri (ACL - Access Control List)‏ ACL on nimekiri pääsuõiguste kirjetest (ACE - Access Control Entry)‏ ACE koosneb: kasutaja, grupi või arvuti nimest pääsuõiguste loetoelust Kui kasutajale, ega tema grupile ei ole mingi ressursi juures vastavat õigust antud, siis pole tal võimalik seda ressurssi kasutada

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk POSIX pääsuõigused d r w x r w x r w x teiste õigused grupi õigused omaniku õigused faili tüüp rlugemisõigus wkirjutamisõigus xkäivitamisõigus ssetUID, setGID tsticky bit

IT Kolledzh/TTÜ 2003 T.Tammet IT sissejuhatus loeng 8 lk Virtualiseerimisvahendid PC riistvara emuleerimine Vmware Olemas nii Linux, kui Windows versioon Eri versioonid töökoha ja serverirakendusteks Virtual PC (Microsoft)‏ Parallels (MacOS)‏ Linuxipõhised virtualiseerimisvahendid Virtuozzo. OpenVZ Vserver XEN UML QEMU Bare hardware Linux VMware Linux App 1 App 2 App 3 VMware Windows NTFreeBSD Õppeotstarbel Testkeskkondadeks Tootearenduses ning kasutajatoes Server - hosting Kliendid saavad täiesti oma serveri Serverite virtualiseerimine Riistvararessurss jaguneb mitme serveri vahel Lihtsustub riistvara hooldus Virtuaalservereid saab ümber tõsta teisele riistvarale Teenuste eraldamiseks - igale teenusele oma server turvalisus