100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Samenvatting Besturingssystemen

Rating
4.0
(1)
Sold
5
Pages
51
Uploaded on
08-01-2019
Written in
2018/2019

Zeer uitgebreide samenvatting Besturingssystemen. Bevat geen oefeningen voor Windows en/of Linux. Compleet met uitgebreide inhoudstafel. Verbetering tegenover het gebruik van slides.

Institution
Course

















Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Course

Document information

Uploaded on
January 8, 2019
Number of pages
51
Written in
2018/2019
Type
Summary

Subjects

Content preview

BESTURINGSSYSTEMEN
Academiejaar 2018 - 2019




Jakob Lierman
HoGent

,Jakob Lierman Besturingssystemen


Inhoud
INLEIDING .................................................................................................................................................. 8

WAT IS LINUX ........................................................................................................................................................... 8

AAN DE SLAG MET LINUX ............................................................................................................................................ 8

De terminal ...................................................................................................................................................... 8

Het Linux bestandssysteem.............................................................................................................................. 8

Oriëntatie in het bestandssysteem .................................................................................................................. 8

Met de shell leren werken ................................................................................................................................ 8

Enkele commando’s ....................................................................................................................................................... 8

Hulp (man pages) ........................................................................................................................................... 10

WAT IS EEN BESTURINGSSYSTEEM ............................................................................................................................... 10

Functies .......................................................................................................................................................... 10

Historisch overzicht ........................................................................................................................................ 10

Soorten besturingssystemen .......................................................................................................................... 11

Single-tasking ............................................................................................................................................................... 11

Multitasking (single-user) ............................................................................................................................................ 11

Multi-user-systemen .................................................................................................................................................... 11

Virtuele machines ........................................................................................................................................................ 12

Concepten van besturingssystemen .............................................................................................................. 12

Proces........................................................................................................................................................................... 12

Resources ..................................................................................................................................................................... 12

Concurrency ................................................................................................................................................................. 12

Ontwerp-criteria .......................................................................................................................................................... 13

Compromissen ............................................................................................................................................................. 13

SCHEDULING ............................................................................................................................................ 14


2

,Jakob Lierman Besturingssystemen


NOODZAAK TOT SCHEDULING..................................................................................................................................... 14

DOELSTELLINGEN VAN SCHEDULING ............................................................................................................................ 14

UITVOEREN VAN EEN PROCES ..................................................................................................................................... 15

SYSTEEMBEELD VAN EEN PROCES ................................................................................................................................ 16

Procestoestand-diagram................................................................................................................................ 17

Procestoestanden ........................................................................................................................................................ 17

Toestandsovergangen.................................................................................................................................................. 17


Process Control Blocks (PCB) .......................................................................................................................... 18

Niveaus van scheduling.................................................................................................................................. 18

STRATEGIEËN VOOR LOW-LEVEL SCHEDULING................................................................................................................ 18

Round Robin scheduling (RR) ......................................................................................................................... 19

First-In-First-Out scheduling (FIFO) of First-Come-First-Served scheduling (FCFS) ........................................ 19

Multilevel feedback queues (MFQ) ................................................................................................................ 20

Shortest-Job-First scheduling (SJF) ................................................................................................................. 20

Starvation....................................................................................................................................................... 21

Samenvatting strategieën low-level scheduling ............................................................................................ 21

SCRIPTING IN LINUX ................................................................................................................................. 22

INLEIDING .............................................................................................................................................................. 22

Eigenschappen van een goed script ............................................................................................................... 22

Structuur van een shell script ......................................................................................................................... 22

Instructies bovenaan het script ................................................................................................................................... 22

Debuggen van een bash script ....................................................................................................................... 22

VARIABELEN EN PARAMETERS .................................................................................................................................... 23

Variabele koppelen ........................................................................................................................................ 23

Variabele aanroepen...................................................................................................................................... 23


3

,Jakob Lierman Besturingssystemen


Soorten variabelen ......................................................................................................................................... 23

Constanten ................................................................................................................................................................... 23

Lokale variabelen ......................................................................................................................................................... 23

Omgevingsvariabelen .................................................................................................................................................. 23

Shell-variabelen ........................................................................................................................................................... 24


Werken met invoer......................................................................................................................................... 24

Positionele parameters ................................................................................................................................................ 24

Speciale parameters .................................................................................................................................................... 24

Commando substitution................................................................................................................................. 25

REGULIERE EXPRESSIES ............................................................................................................................................. 25

PROGRAMMEERBARE FILTERS .................................................................................................................................... 26

SED: Stream EDitor......................................................................................................................................... 26

Substitutieopdrachten.................................................................................................................................... 27

FLOW-CONTROL ...................................................................................................................................................... 28

Exit-status, exit............................................................................................................................................... 28

Return en test................................................................................................................................................. 28

File testers.................................................................................................................................................................... 29

File comparisons .......................................................................................................................................................... 30

String tests ................................................................................................................................................................... 30

Integer tests - operators .............................................................................................................................................. 30

If then else ...................................................................................................................................................... 30

Case ................................................................................................................................................................ 31

For .................................................................................................................................................................. 31

While / until ................................................................................................................................................... 31

REKENEN IN EEN SCRIPT ............................................................................................................................................ 32

FUNCTIES ............................................................................................................................................................... 32
4

,Jakob Lierman Besturingssystemen


Waarden uit functie teruggeven .................................................................................................................... 32

OPTIES .................................................................................................................................................................. 33

Manueel parsen ............................................................................................................................................. 33

Grep parsen.................................................................................................................................................... 33

Getopts parsen ............................................................................................................................................... 34

CONCURRENCY – PARALLELLE PROCESSEN................................................................................................. 35

WAT IS CONCURRENCY? ........................................................................................................................................... 35

WEDERZIJDSE UITSLUITINGEN (MUTUAL EXCLUSION) ...................................................................................................... 35

Concurrency met meerdere processors ......................................................................................................... 35

Concurrency met één processor ..................................................................................................................... 35

Wederzijdse uitsluiting................................................................................................................................... 36

PROGRAMMEREN VAN WEDERZIJDSE UITSLUITINGEN ...................................................................................................... 36

Eerste poging ................................................................................................................................................. 36

Tweede poging ............................................................................................................................................... 36

Derde poging.................................................................................................................................................. 36

ALGORITME VAN DEKKER .......................................................................................................................................... 37

ALGORITME VAN PETERSON ...................................................................................................................................... 38

SEMAFOREN ........................................................................................................................................................... 39

Inleiding.......................................................................................................................................................... 39

Sterke semaforen ........................................................................................................................................... 41

Implementatie semaforen ............................................................................................................................. 43

MONITOREN .......................................................................................................................................................... 44

SYNCHRONISATIE ..................................................................................................................................................... 44

DEADLOCK ............................................................................................................................................................. 44

Aspecten van deadlock .................................................................................................................................. 45

5

,Jakob Lierman Besturingssystemen


Preventie ...................................................................................................................................................................... 45

Vermijding .................................................................................................................................................................... 45

Signalering.................................................................................................................................................................... 45

Herstel .......................................................................................................................................................................... 45

THREADS ............................................................................................................................................................... 46

PROCESSEN IN LINUX ................................................................................................................................ 47

WAT IS EEN PROCES? ............................................................................................................................................... 47

SOORTEN PROCESSEN ............................................................................................................................................... 47

Interactieve processen ................................................................................................................................... 47

Automatische (batch) processen ................................................................................................................... 47

Daemons ........................................................................................................................................................ 47

BACKGROUND ........................................................................................................................................................ 47

EIGENSCHAPPEN ..................................................................................................................................................... 48

INFORMATIE WEERGEVEN ......................................................................................................................................... 48

Korte info........................................................................................................................................................ 48

Uitgebreide info ............................................................................................................................................. 48

top commando ............................................................................................................................................... 49

pstree commando .......................................................................................................................................... 49

PROCESSEN BEHEREN ............................................................................................................................................... 49

Prioriteit veranderen ...................................................................................................................................... 50

PROCESSEN ONDERBREKEN........................................................................................................................................ 50

kill commando ................................................................................................................................................ 50

xkill commando .............................................................................................................................................. 50

PROCESSEN PROGRAMMEREN VOOR AUTOMATISCHE UITVOERING .................................................................................... 50

LEVENSCYCLUS ........................................................................................................................................................ 51


6

,Jakob Lierman Besturingssystemen


Proces aanmaken ........................................................................................................................................... 51

systemd .......................................................................................................................................................... 51

Proces beëindigen .......................................................................................................................................... 51




7

,Jakob Lierman Besturingssystemen



Inleiding
Wat is Linux
Besturingssysteem ontwikkeld vanuit UNIX door Linus Torvalds.


Aan de slag met Linux

De terminal

# commando [-opties] [argument(en)]
# Bijvoorbeeld:
ls -l /etc


Het Linux bestandssysteem




Oriëntatie in het bestandssysteem

Absoluut pad: start vanaf de root en begint met een slash (/).
Relatief pad: start vanaf de huidige map.

Met de shell leren werken

Een shell is een programma dat wordt opgestart in een terminal venster.

Enkele commando’s

Werken met mappen:
8

,Jakob Lierman Besturingssystemen


# Map aanmaken (meerdere namen mag)
mkdir

# Map verwijderen (enkel lege mappen) (meerdere namen mag)
rmdir

Werken met tekstbestanden:

# Laat de inhoud van een tekstbestand over het scherm lopen
cat

# Toon tekst in omgekeerde volgorde
tac

# Laat toe om de tekst scherm per scherm te bekijken
less

# Toont de eerste 10 lijnen
head

# Toont de laatste 10 lijnen
tail

# Tekstbestanden aanmaken
touch bestand1 bestand2

# Bestanden kopiëren
cp bronmap/bronbestand doelmap/doelbestand
# Enkele opties:
# -r recursive
# -v verbose

# Bestanden verplaatsen
mv bronmap/bronbestand doelmap/doelbestand
# Enkele opties:
# -i interactive
# -v verbose
# -f force

# Bestanden verwijderen
rm map/bestand
# Enkele opties:
# -r recursive
# -v verbose

Tekst zoeken in bestanden:

grep [opties] tekenreeks [bestanden]
# Enkele opties:
# -i --ignore-case
# -n --line-number
# -s --silent

9

, Jakob Lierman Besturingssystemen


Zoeken:

# Zoeken op bestandsnaam
locate bestandsnaam
find zoekmap zoekoptie(s) [tests] [acties]

# Zoeken naar commando’s
which commandonaam


Hulp (man pages)

# Man page opvragen
man commando

Vaak ook bij het commando beschikbaar als optie --help.


Wat is een besturingssysteem
Besturingssysteem = programma dat het mogelijk maakt de hardware van een computer te
gebruiken.

Functies

- Opslaan en ophalen van informatie
- Programma’s afschermen
- Gegevensstroom regelen
- Prioriteiten regelen
- Het mogelijk maken om bronnen te delen
- Tijdelijke samenwerking tussen onafhankelijke programma’s mogelijk maken
- Reageren op fouten
- Tijdsplanning maken

Historisch overzicht

1e computers → Geen OS

Jaren 50 → Eenvoudig OS:

- Sequentieel opladen & opstarten v programma’s
- Alle bronnen bruikbaar door slechts 1 programma

Begin jaren 60 → Geavanceerder OS:

- Verscheidene programma’s konden tegelijk opgeslagen worden in geheugen
- Beurtelingse uitvoering programma’s
- Gemeenschappelijke bronnen


10
$5.43
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Reviews from verified buyers

Showing all reviews
4 year ago

4.0

1 reviews

5
0
4
1
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
jakoblierman Hogeschool Gent
Follow You need to be logged in order to follow users or courses
Sold
256
Member since
8 year
Number of followers
136
Documents
42
Last sold
8 months ago
Samenvattingen Toegepaste Informatica HoGent

Bevat samenvattingen voor alle vakken (waarvoor een samenvatting nuttig is) uit de richting Toegepaste Informatica.

3.8

49 reviews

5
9
4
22
3
16
2
1
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions