Operating Systems, 8 op

Samankaltaiset tiedostot
Kernel (Fig 4.10 [Stal 05]) Operating Systems Examples and Process Management

Processes and threads

Information on preparing Presentation

Käyttöjärjestelmät. Tietokoneen rakenne. Stallings, Luku 1. KJ-I S2003 / Auvo Häkkinen, CT50A2602 / Leena Ikonen 1-1

FinFamily PostgreSQL installation ( ) FinFamily PostgreSQL

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

Capacity Utilization

7. Product-line architectures

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

Lab SBS3.FARM_Hyper-V - Navigating a SharePoint site

Information on Finnish Language Courses Spring Semester 2018 Päivi Paukku & Jenni Laine Centre for Language and Communication Studies

Käyttöjärjestelmät, 8 op

Uusi Ajatus Löytyy Luonnosta 4 (käsikirja) (Finnish Edition)

Information on Finnish Courses Autumn Semester 2017 Jenni Laine & Päivi Paukku Centre for Language and Communication Studies

Tervetuloa! (2 ov,, 4 op) KJ on tärkein tietokoneessa pörräävistä ohjelmista

Käyttöjärjestelmän rakenne

Kurssin asema Käyttöjärjestelmät, 8 op. Kurssikirja. Kurssin tavoite. Kurssin rakenne: Kurssin suorittaminen. Käyttöjärjestelmät - Luento 1

Information on Finnish Language Courses Spring Semester 2017 Jenni Laine

7.4 Variability management

BDD (behavior-driven development) suunnittelumenetelmän käyttö open source projektissa, case: SpecFlow/.NET.

1.3Lohkorakenne muodostetaan käyttämällä a) puolipistettä b) aaltosulkeita c) BEGIN ja END lausekkeita d) sisennystä

Sisällysluettelo Table of contents

1. SIT. The handler and dog stop with the dog sitting at heel. When the dog is sitting, the handler cues the dog to heel forward.

Use of spatial data in the new production environment and in a data warehouse

Windows Phone. Module Descriptions. Opiframe Oy puh Espoo

Salasanan vaihto uuteen / How to change password

u Tietokone ilman käyttöjärjestelmää on kuin

AYYE 9/ HOUSING POLICY

Results on the new polydrug use questions in the Finnish TDI data

Voice Over LTE (VoLTE) By Miikka Poikselkä;Harri Holma;Jukka Hongisto

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

Tietokonejärjestelmä. Tietokoneen rakenne. Ch 1 - Ch 8 [Sta06] Valikoituja paloja. TITO-kurssista. John von Neumann ja EDVAC, 1949.

Security server v6 installation requirements

National Building Code of Finland, Part D1, Building Water Supply and Sewerage Systems, Regulations and guidelines 2007

Kysymys 5 Compared to the workload, the number of credits awarded was (1 credits equals 27 working hours): (4)

1.3 Lohkorakenne muodostetaan käyttämällä a) puolipistettä b) aaltosulkeita c) BEGIN ja END lausekkeita d) sisennystä

Sisältöä. Tietokoneen rakenne. Ch 1 - Ch 8 [Sta06] Valikoituja paloja TITO-kurssista. Tietokonejärjestelmä

Network to Get Work. Tehtäviä opiskelijoille Assignments for students.

TIEKE Verkottaja Service Tools for electronic data interchange utilizers. Heikki Laaksamo

Rinnakkaisohjelmistot. Liisa Marttinen Tietojenkäsittelytieteen laitos Helsingin yliopisto Kevät 2004

Microsoft Lync 2010 Attendee

Security server v6 installation requirements

C++11 seminaari, kevät Johannes Koskinen

ltöä rjestelmä Luento 2: LAITTEISTOSTA Tietokonejärjestelm KESKUSYKSIKKÖ Keskusyksikkö Kuva 1.1 KJ-I S2005 / Tiina Niklander & Auvo Häkkinen 2-1

Tietorakenteet ja algoritmit

Luento 2: LAITTEISTOSTA

Käyttöjärjestelmät, 8 op

Kurssin asema Käyttöjärjestelmät, 8 op. Siirtymävaiheen vastaavuudet. Kurssin tavoite. Kurssikirja. Kurssin rakenne:

FinFamily Installation and importing data ( ) FinFamily Asennus / Installation

KONEISTUSKOKOONPANON TEKEMINEN NX10-YMPÄRISTÖSSÄ

Alternative DEA Models

Choose Finland-Helsinki Valitse Finland-Helsinki

Curriculum. Gym card

General studies: Art and theory studies and language studies

toukokuu 2011: Lukion kokeiden kehittämistyöryhmien suunnittelukokous

Stallings, Luku 1. KJ-I S2043 / Tiina Niklander Auvo Häkkisen kalvojen pohjalta 2-2. KJ-I S2003 / Auvo Häkkinen 2-1

ECVETin soveltuvuus suomalaisiin tutkinnon perusteisiin. Case:Yrittäjyyskurssi matkailualan opiskelijoille englantilaisen opettajan toteuttamana

You can check above like this: Start->Control Panel->Programs->find if Microsoft Lync or Microsoft Lync Attendeed is listed

HITSAUKSEN TUOTTAVUUSRATKAISUT

The CCR Model and Production Correspondence

Encapsulation. Imperative programming abstraction via subprograms Modular programming data abstraction. TTY Ohjelmistotekniikka

Returns to Scale II. S ysteemianalyysin. Laboratorio. Esitelmä 8 Timo Salminen. Teknillinen korkeakoulu

Miksi Suomi on Suomi (Finnish Edition)

Ylläpitäjät, järjestelmäarkkitehdit ja muut, jotka huolehtivat VMwareinfrastruktuurin

Business Opening. Arvoisa Herra Presidentti Very formal, recipient has a special title that must be used in place of their name

MUSEOT KULTTUURIPALVELUINA

RINNAKKAINEN OHJELMOINTI A,

HUMAN RESOURCE DEVELOPMENT PROJECT AT THE UNIVERSITY OF NAMIBIA LIBRARY

Efficiency change over time

Käyttöjärjestelmät, Luento 11 WEEK 6. Scheduling. Stallings, Chapter 9. Syksy 2007, Tiina Niklander 11-1

Ohjelmien kehittämisstudiot varmistavat laadukkaat ja linjakkaat maisteriohjelmat Maire Syrjäkari ja Riikka Rissanen

LYTH-CONS CONSISTENCY TRANSMITTER

Innovative and responsible public procurement Urban Agenda kumppanuusryhmä. public-procurement

Hankkeen toiminnot työsuunnitelman laatiminen

MEETING PEOPLE COMMUNICATIVE QUESTIONS

BLOCKCHAINS AND ODR: SMART CONTRACTS AS AN ALTERNATIVE TO ENFORCEMENT

LANSEERAUS LÄHESTYY AIKATAULU OMINAISUUDET. Sähköinen jäsenkortti. Yksinkertainen tapa lähettää viestejä jäsenille

Other approaches to restrict multipliers

Paikkatiedon semanttinen mallinnus, integrointi ja julkaiseminen Case Suomalainen ajallinen paikkaontologia SAPO

Bachelor level exams by date in Otaniemi

Opiskelijoiden ajatuksia koulun alkuun liittyen / students thoughts about the beginning of their studies at KSYK

Bachelor level exams by subject in Otaniemi

Nuku hyvin, pieni susi -????????????,?????????????????. Kaksikielinen satukirja (suomi - venäjä) ( (Finnish Edition)

Skene. Games Refueled. Muokkaa perustyyl. for Health, Kuopio

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

anna minun kertoa let me tell you

Constructive Alignment in Specialisation Studies in Industrial Pharmacy in Finland

Data protection template

6.3. AVR_rauta. EEPROM-muisti pva

Office 2013 ja SQL Server 2012 SP1 uudet BI toiminnallisuudet Marko Somppi/Invenco Oy

The Use of Hardware Simulation in Smartphone Projects

Gap-filling methods for CH 4 data

Tarua vai totta: sähkön vähittäismarkkina ei toimi? Satu Viljainen Professori, sähkömarkkinat

OP1. PreDP StudyPlan

Data Quality Master Data Management

SIMULINK S-funktiot. SIMULINK S-funktiot

ebooks in the libraries ebib trial and results

Collaborative & Co-Creative Design in the Semogen -projects

FIS IMATRAN KYLPYLÄHIIHDOT Team captains meeting

Luento 2 (verkkoluento 2) Ttk-91 järjestelmä

Transkriptio:

WEEK 1 582497 Operating Systems, 8 op Tiina Niklander University of Helsinki Department of Computer Science Course Structure 12 weeks 2 exams Prerequisites: Bachelor level studies, at least our courses Computer Organisation I Concurrent Programming http://www.cs.helsinki.fi/u/niklande/opetus/kj/ Syksy 2007, Tiina Niklander 1

Goal To understand the fundamental principles and methods of Operating System both from the user s and implementor s view points You need to be able to explain the general principles and some alternative implementation algorithms to them Examples Operating Systems: Unix = Linux, Windows XP ja Solaris After the course you are expected to be able to Describe the main parts of the OS, their functionality, dependences and their interactions. Study how one specific OS implements certain feature (if necessary by reading the source code) Course book (must have!) [Stal05] William Stallings, Operating Systems, 5th. ed., Prentice-Hall, 2005 Alternative books: [SGG07] A. Silberschatz, P. Galvin ja G. Gagne: Operating System Concepts with Java, seventh edition. Wiley, 2007 [Tane01] A.S. Tanenbaum, Modern Operating Systems, 2nd. ed., Prentice-Hall, 2001. [DDC04] H.M. Deitel, P.J. Deitel, D.R. Choffnes, Operating Systems, 3rd ed., Prentice-Hall 2004 Any (good quality) book with the title: Operating Systems Syksy 2007, Tiina Niklander 2

Course structure Part 1: OS structure, Processes, threads Myös käyttöjärjestelmän rakenne ja tehtävät Part 2: Memory Management, virtual memory, scheduling Part 3: I/O and file management Part 4: Distribution and security How to do the course Alternative 1: participate to the course Enroll to the small group session in ILMO Read the material (and/or go to lectures) Prepare for the sessions by solving the problems in advance Group projects Exams Weekly sessions, projects and exams give points for passing the course. They are used in grading also Syksy 2007, Tiina Niklander 3

How to do the course Alternative 2: Separate exam Enroll to the exam in ILMO Inform the teacher that you need to have English questions (at least a week before) Exam based on the preceeding course (material information from that course) Questions quite often similar to the weekly exercises Group projects (group tasks) Three projects during the course (1-4 points each) Optimum group size 2 or 3 students Tasks are mainly Solving a larger problem and writing a report Explaining the functionalities of certain features in the report (how something works or is implemented) Syksy 2007, Tiina Niklander 4

WEEK 1 Read for next week: Chapters 1 & 2 (+ solve the problems presented in the webpage) Hardware CPU, Execution cycle Interrupts and exceptions I/O, Memory Stallings, Chapter 1 (known from Computer Organisation I) Syksy 2007, Tiina Niklander 5

Central Processing Unit Fig 1.1 [Stal05] Remember the status register PSW! Memory Management Unit - MMU Transforms the program s internal address to physical memory address Registers for address and content MAR, Memory Address Register MBR, Memory Buffer Register Syksy 2007, Tiina Niklander 6

MMU No virtual memory: Base Register: physical location start here Limit Register: last allowed physical address or the size of the address space of the process Virtual memory (example): PTR, Page Table Register Physical address location of the start of the page table TLB, Translation Lookaside Buffer Cache for the page table entries (most recently used) PSW Program status word 32 bits (each has a value 0 or 1) GEL OZUM IS P D... D = Interrupts Disabled (kesk. esto) P = Privileged mode (etuoik. tila) S = SVC (supervisor call) palvelupyyntö I = device Interrupt (laitekeskeytys) M = forbidden Memory address U = Unknown instruction Z = divide by Zero O = arithmetic Overflow GEL = comparison indicators: Greater, Equal, Less Syksy 2007, Tiina Niklander 7

Instruction cycle Fig 1.7 Start Interrupt Handler Interrupts - error - System call Syksy 2007, Tiina Niklander 8

I/O & Interrupts Fig 1.5b [Stal05] Fig 1.11 Interrupt Return Syksy 2007, Tiina Niklander 9

Memory hierarchy Tan01 1.14 Pentium 4 cache: 8 KB data, 12 KB code, external 256 KB nano = 10-9, micro = 10-6, milli = 10-3 Locality of reference Spatial and temporal locality: For example in a loop a small set of instructions is executed several times Certain part of code only uses a small set of variables (data) Ł When program makes a memory reference (data or instructions), it is likely to refer again to the same location or a location near by This is the principle behind the usage of caches Syksy 2007, Tiina Niklander 10

OS s execution turn new ready trap only when running on CPU Layers Systems calls and Application Programming Interface (API) Interrupts and exceptions System calls Interrupts Syksy 2007, Tiina Niklander 11

Eaxmple of a system call: read(fd, buffer, nbytes) Tan01 1-17 Example Tan01 1-19 Simple shell Syksy 2007, Tiina Niklander 12

WEEK 1 OS structure Chapter 2 Computing System OS offers: Process management Memory management I/O management File management Fig 1.1 [SGG07] Silbershatz, Galvin and Gagne: Operating Systems Concepts with Java, Wiley, 2007 Syksy 2007, Tiina Niklander 13

OS structure Applications User Shell Varusohjelmat Service calls Process management Resource management File system protection blocks Memory management I/O management I/O module Interrupt handling (Device controller) Devices and device drivers Services User interface Utility programs Program execution Memory management I/O File systems Protection Accounting (statistics) Syksy 2007, Tiina Niklander 14

Services Failure handling/ management Harware faults and failures Software faults and failures Missing resources Support for recovery Status information (to the process) Retries Killing a process Hierarchical structure: OS device-independent services Level Name Objects Example Operations 13 Shell User programming Statements in shell language environment 12 User processes User processes Quit, kill, suspend, resume 11 Directories Directories Create, destroy, attach, detach, search, list 10 Devices External devices, such Create, destroy, open, close, as printer, displays read, write and keyboards 9 File system Files Create, destroy, open, close read, write 8 Communications Pipes Create, destroy, open. close, read, write Syksy 2007, Tiina Niklander 15

Hierarchical structure: OS device-dependent services Level Name Objects Example Operations 7 Virtual Memory Segments, pages Read, write, fetch 6 Local secondary Blocks of data, Read, write, allocate, free store device channels 5 Primitive processes Primitive process, Suspend, resume, wait, signal semaphores, ready P / V list Memory management: must consider the structure of MMU Device controllers: must consider the structure of the devices Scheduler: synchronization primitives, registers copy/restore Hierarchical structure: Device layers Brown, Denning 1984 Level Name Objects Example Operations 4 Interrupts Interrupt-handling Invoke, mask, unmask, programs retry 3 Procedures Procedures, call stack Mark stack, call, return 2 Instruction Set Evaluation stack, micro- Load, store, add, program interpreter, subtract, branch scalar and array data 1 Electronic circuits Registers, gates, buses, Clear, transfer, activate, etc. complement What hardware features are needed to support OS functionalities? Syksy 2007, Tiina Niklander 16

Difficult parts in OS implementation Synchronisation / timing Occasionally must wait until something else has happened Priorities of the interrupts Signals from devices and messages from program must not be lost or duplicated Mutual exclusion Some resources can be allocated only for one user at a time Shared data, shared file, printer Deadlock, Starvation Difficult to detect Occasionally must wait for others (which cannot happen) Too low priority, no access to services (everybody goes before) Part of the Concurrent Concurrency Ch 5, 6.1-6 [Stal05] Programming course. Not covered in this course. Short history of OS Old (basic) models: Batch System Multiprogramming, multitasking Time-Sharing More complex models: Multiprocessor Networked systems Distributed system Client-Server ALL OFFER SIMILAR FUNDAMENTAL SERVICES Syksy 2007, Tiina Niklander 17

Hardware support (1) Memory protection (MMU) Interrupt mechanism Detection and initiation by hardware, continue in sw Clock interrupts Needed to allow OS to run on certain periods (otherwise the program running on CPU could continue forever) ALSO (often provided features) Privileged instructions Supervisor and user modes Multiprogramming More OS features: scheduling, memory allocation Syksy 2007, Tiina Niklander 18