1 / 23

Sissejuhatus informaatikasse

Sissejuhatus informaatikasse. 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?

wweldon
Download Presentation

Sissejuhatus informaatikasse

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sissejuhatus informaatikasse

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

  3. 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!

  4. 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).

  5. Definitions of OS!? … • Extended machine, or virtual machine. Takes the basic hardware, and provides additional layers offunctionality. 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 applicationssoftware (which in turn provides a 'virtual machine' to the user). • Resource manager. Allocates scarce resources, like disk space, memory, processor between competingprocesses and users. Each process thinks that it has its own machine (its own files, its own printer, whatever). In away, 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 processorshave two or more operating modes, user and supervisor. In supervisor mode, able to access all of memory and allhardware.

  6. Definitions of OS!? • The software which is supplied with the machine. Often includes many things not traditionally considered partof 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 NetscapeNavigator, or Microsoft Word). Java is almost an operating system. Provides many services commonly associatedwith Operating Systems, like managing multiple concurrent processes, and providing access to files.

  7. Operatsioonisüsteemide arengulugu • Arvutid ilma OS-ita • Batch processing süsteemid • Multiprotsessing ja terminalid - UNIX • Personaalarvutid - IBM, Xerox, Apple, DOS, Windows

  8. Operatsioonisüsteemi roll

  9. OS layers

  10. Operatsioonisüsteemide omadused • Funktsionaalsus • Protsesside haldamine • Mälu haldamine • Failisüsteemid • Võrguprotokollid • Kasutajate haldamine

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

  12. Processes have their own memory areas

  13. Processes wait and run – when chance comes

  14. Memory handling • Defines - which application occupies, which part (block/segment)

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

  16. 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 11011000 address,so:a starts at 11011000b starts at 11011010c starts at 11011100

  17. Cache ja mälu hierarhia • Pilt selgitustega tahvlil. Alternatiiv: loe vastavat kohta lisamaterjalist Computer Systems: a programmers perspective

  18. Operatsioonisüsteemide omadused • Kasutatavus • Liides: käsurida (CLI), graafika (GUI) • Olemasolevad rakendused, teenused • Vajalik riistvara • Haldusvahendid, kaughaldus • Stabiilsus • Skaleeruvus • Tugi • Hind

  19. Riistvara Tarkvara litsentsid Tehniline tugi Tarkvara upgrade Riistvara upgrade Seisaku põhjustatud kasumi kadu Süsteemi koguhind • Installeerimise kulu • Haldamise kulu • Riistvarast või OS-ist põhjustatud rikutud andmete taastamise kulu • Välja- ja ümberõppe kulud

  20. Näide: süsteemi hinna kujunemine

More Related