inleiding computersystemen en netwerken deel 3 hogeschool van utrecht / institute for computer,...
TRANSCRIPT
![Page 1: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/1.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.1Inleiding computersystemen en netwerken deel 3
![Page 2: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/2.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.2Inleiding computersystemen en netwerken deel 3
Op een ‘kale’ computer
+ kan je alles zelf doen
- moet je alles zelf doen
Bijvoorbeeld:
-- aansturing van specifieke hardware
-- algemene taken
vergelijk het met het intrekken in een leeg huis
Waarom een Operating system?
![Page 3: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/3.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.3Inleiding computersystemen en netwerken deel 3
Historie
Nul generatie: - hand codering (Operator) (1940)
Eerste generatie: - Jobs (1950)
- Batch processing systems
Tweede generatie: - Multiprocessing (1960)
- Device independence
- Timesharing (interactive)
- Real-time
Derde generatie: - General-purpose systems (1965-1975)
- Multimode systems
Vierde generatie: - Networking / Distributed processing (1975- …..)
- Menu/graphic driven
- Virtual machines
![Page 4: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/4.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.4Inleiding computersystemen en netwerken deel 3
Soorten OS naar eigenschappen
• single user / single tasking (CP/M, DOS)
• single user / multi tasking (Windows)• multi user / multi tasking (UNIX)• real time (multi tasking) (RTOS)
![Page 5: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/5.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.5Inleiding computersystemen en netwerken deel 3
Soorten O.S. naar taken
• Desk top (tekstverwerking, spreadsheet, database .. )
• Workstation (ontwerpsysteem)
• Server (bestand beheer)
• Proces besturing (fabrieken)
• Embedded (elektronische apparaten)
![Page 6: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/6.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.6Inleiding computersystemen en netwerken deel 3
Taken van het OS
• Systeem initialisatie (Boot, SysInit, etc.)• Geheugenbeheer (space management)• CPU-beheer (time management)• Communicatie en synchronisatie (transpute
management)
![Page 7: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/7.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.7Inleiding computersystemen en netwerken deel 3
Nomenclatuur
• Multitasking : meerdere processen actief op één processor (pseudo parallel).
• Process : de geanimeerde geest van een programma.
• Thread : parallel uit te voeren code van een proces.
• Kernel : de kern van het OS.
• Device driver : besturingssoftware voor de I/O.
• Scheduler : verzorgt de volgorde waarin de processes/threads processortijd krijgen.
• Context : alles wat tot het process behoort.
![Page 8: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/8.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.8Inleiding computersystemen en netwerken deel 3
Mogelijke opbouw
hardware
Device driversHardware Abstraction Layer (HAL)
KERNEL
process process process
System call
I/O manager
User mode
Kernel mode
![Page 9: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/9.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.9Inleiding computersystemen en netwerken deel 3
Bevoorrechte instructies
De CPU kent t.b.v. OS meestal minimaal twee toestanden, te weten:
supervisor-mode
gebruikers-mode
Met de system call roep je het OS aan wordt naar supervisor mode geschakeld.
![Page 10: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/10.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.10Inleiding computersystemen en netwerken deel 3
Application Programmers Interface (API)Application Binary Interface (ABI)
Applicatie
API
ABI
Besturingssysteem
POSIX / Win32
System call (interface)
![Page 11: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/11.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.11Inleiding computersystemen en netwerken deel 3
Opbouw van het O.S.
• Monolithisch (spaghetti)• Gelaagd (lasagne)• Modulair (ravioli)
![Page 12: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/12.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.12Inleiding computersystemen en netwerken deel 3
Monolithic
Application Application
System services (API)
Hardware
User mode
Kernel mode
![Page 13: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/13.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.13Inleiding computersystemen en netwerken deel 3
Layered
Application Application
System services (API)
File system
Memory and I/O device management
Processor scheduling
Hardware
User mode
Kernel mode
![Page 14: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/14.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.14Inleiding computersystemen en netwerken deel 3
Client/server (Modulair)
User mode
Kernel mode
Microkernel
Hardware
Client application
Process server
Memory server
Fileserver
Network server
Display server
HAL & device drivers
![Page 15: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/15.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.15Inleiding computersystemen en netwerken deel 3
Proces
• Een proces is een unieke uitvoering van een programma (incarnatie).
• Een proces heeft zijn eigen context:
– registers;
– Memory;
– Proces administratie t.b.v. OS.
![Page 16: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/16.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.16Inleiding computersystemen en netwerken deel 3
Thread
Thread = lichtgewicht proces:
Het deelt geheugenruimte met andere threadsHet is parallel of simultaan uitgevoerde code van een programma.
![Page 17: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/17.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.17Inleiding computersystemen en netwerken deel 3
Proces toestanden
Running (Current): het proces heeft de processor Ready to Run (Active): het proces wacht op de processor Waiting (Suspended): het proces wordt opgehouden
![Page 18: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/18.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.18Inleiding computersystemen en netwerken deel 3
Process states
Run
ReadySuspended
scheduler
Context switch
![Page 19: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/19.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.19Inleiding computersystemen en netwerken deel 3
Wie krijgt de CPU?
– Co-operative scheduling• proces loopt door totdat het klaar is
• Gevaar van een eindeloze lus => systeem hangt
• Bijvoorbeeld :Windows 98
– Pre-emptive scheduling• Onderbreekbaar doormiddel van prioriteiten
• tijdverdeling (time-slicing).
• Voordeel : een fout proces kan niet het hele systeem “ophangen”
• Bijvoorbeeld : Windows 2000
![Page 20: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/20.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.20Inleiding computersystemen en netwerken deel 3
Hoe verdeel je de processor tijd?
![Page 21: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/21.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.21Inleiding computersystemen en netwerken deel 3
Real-Time Klok
• vooraf ingestelde teller die het systeem interrumpeert (ongeveer 10 msec)
• bijhouden van de tijd, datum etc.
• communicatie en synchronisatie
• starten van de scheduler
• administratieve taken
![Page 22: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/22.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.22Inleiding computersystemen en netwerken deel 3
Geheugenbeheer
• Locatie van code en data (statisch)
• Toewijzing data (dynamisch)
• Protectie
• Gemeenschappelijk gebruik
• Logische organisatie <-> fysieke organisatie
![Page 23: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/23.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.23Inleiding computersystemen en netwerken deel 3
MMU (logisch <-> fysiek)
adressen
vertaalde adressen
databus
werk-geheugen
CPU
MMU
adresbus
![Page 24: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/24.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.24Inleiding computersystemen en netwerken deel 3
Partitionering
• een proces krijgt een vastgesteld deel van het geheugen ter beschikking
• de inhoud van een basisregister wordt opgeteld bij het adres
• het totaal wordt vergeleken met een limietregister
![Page 25: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/25.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.25Inleiding computersystemen en netwerken deel 3
Segmentering
• code-, data-, deelbare segmenten
• geen vaste lengte
• segment register + adres = fysiek adres
![Page 26: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/26.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.26Inleiding computersystemen en netwerken deel 3
8088 registers
![Page 27: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/27.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.27Inleiding computersystemen en netwerken deel 3
Segmentering bij de 8088
![Page 28: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/28.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.28Inleiding computersystemen en netwerken deel 3
Paginering
• het geheugen wordt verdeeld in pagina’s; dit zijn delen met een gelijke grootte
• een deel van het adres wijst naar een tabel waarin de verwijzing naar de pagina staat
• een pagina hoeft niet in het geheugen aanwezig te zijn
![Page 29: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/29.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.29Inleiding computersystemen en netwerken deel 3
Paginering
![Page 30: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/30.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.30Inleiding computersystemen en netwerken deel 3
Virtueel geheugen
• het geheugen heeft een lineaire adresruimte (van 0 tot n)
• voor de programmeur lijkt het of de ruimte vanaf 0 geheel of gedeeltelijk lineair beschikbaar is
![Page 31: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/31.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.31Inleiding computersystemen en netwerken deel 3
Demand paging
![Page 32: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/32.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.32Inleiding computersystemen en netwerken deel 3
Geheugenprotectie
• processen mogen elkaar niet hinderen
• processen moeten data-geheugen kunnen delen
• programma-coden moet kunnen worden gedeeld
![Page 33: Inleiding computersystemen en netwerken deel 3 Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.1](https://reader036.vdocuments.mx/reader036/viewer/2022081602/5551a0ef4979591f3c8b9b5c/html5/thumbnails/33.jpg)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6.33Inleiding computersystemen en netwerken deel 3
Opdracht besturingssystemen
• Bestudeer hoofdstuk 10
• Onderzoek windows 98, 2000 en LINUX op:– Opbouw
– Soort (naar eigenschappen en taken)
– Time management
– Space management
Lever een A4tje met je resultaten in bij de docent