operating systems - inf.uni-konstanz.de · operating systems • prof. dr. marc h. scholl • dbis...

49
Operating Systems Bachelor and Master Studies Information Engineering Marc H. Scholl, Alexander Holupirek & Stefan Klinger Summer Term 2009

Upload: hanga

Post on 14-Feb-2019

220 views

Category:

Documents


0 download

TRANSCRIPT

Operating SystemsBachelor and Master Studies

Information Engineering

Marc H. Scholl, Alexander Holupirek & Stefan KlingerSummer Term 2009

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

0. Introducing

Operating Systems

2

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Schedule for today

• Welcome all!• Your lecturers

• Organizational matters

• 0. Introduction: Bird's eye perspective on OS• What is an Operating System?

• Main Features

• Course Outline

3

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Welcome all!

4

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Your Lecturer

• Marc H. SchollHead of Database & Information Systems Group (DBIS)

☞ E 211 ☎ 88-4432

[email protected]

http://www.informatik.uni-konstanz.de/~scholl

• Want to talk to me?• Stop by. [Or send an email first.]

5

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Your Tutors

• Alexander HolupirekResearch Assistant

Database and Information Systems Group (DBIS)

☞ E 203 ☎ 88-4039

[email protected]

http://www.inf.uni-konstanz.de/~holupire

• Just drop by or send an e-mail.

6

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Your Tutors

• Stefan KlingerResearch Assistant

Database and Information Systems Group (DBIS)

☞ E 217 ☎ 88-4449

[email protected]

http://www.inf.uni-konstanz.de/~klinger

7

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Local Unix Account and Mailing List

• The old and famous Accounttool 1

• Creates/prolongs your personal UNIX account at the department 2

• Registers you to the mailing list of the course:

[email protected]

• If you have just created your account• ... you have to get your password

• Sekretariat ☞ E 210, Barbara Lüthke ³

1 http://www.informatik.uni-konstanz.de/organisation/systemadministration/nutzeraccounts/

2 http://www.informatik.uni-konstanz.de/organisation/systemadministration/nutzeraccounts/anmeldung/

3 http://www.informatik.uni-konstanz.de/~luethke/

10

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

LSF Registration

• Please additionally register to the course using LSF1

• We want to use this course to prepare the upcoming registration mode for the next terms, i.e.,• Register once for a lecture (via LSF)

• Triggers UNIX account registrations

• Enables mailing list

• Registers to tutorials ...

• StudIS will then be used just for exam registration and crediting.

11

1 http://lsf.uni-konstanz.de

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Course Facts

• Weekly lecture• Monday, 12:00 - 14:00

• D 247

• Webseite 1

• Credits and Schein

• 6 ECTS (‘Inf. der Systeme’ 2)

• Final exam at the end of the term

2 http://www.informatik.uni-konstanz.de/studieren/pruefungsordnungen/

1 http://www.informatik.uni-konstanz.de/arbeitsgruppen/dbis/lehre/operating-systems/

• Weekly tutorial• Tuesday, 16:00 - 18:00

• C 252

• 10 Assignments

• > 90% ➛ 0.7 to final grade

• 80% - 90% ➛ 0.3 to final grade

12

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Accompanying literature

13

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Two Main Textbooks for this Course

14

• Eduard Glatz: Betriebssysteme - Grundlagen, Konzepte, Systemprogrammierung dpunkt.verlag, Heidelberg, 2006lbs 843/g51, kid 270:n/g51(Local copies Bib U KN)

• Abraham Silberschatz, Peter Baer Galvin, Greg Gagne:Operating Systems Concepts,Wiley & Sons, Hoboken, NJ, 2005lbs 843/s45(7), kid 270/p29(7) (Local copies Bib U KN)

• Both come with sets of lecture slides, we use parts of both of them

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Introduction

16

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$

!"#$%"&''('#")"

*+*,-."/0

4"532&'56&63&'(37&6,'&855956&/:

;<3=>&'3?,*(@)*(!6'1(&(A

! B,>&'6&,6&3C"5D+'(&A

;3E&,8',-63E'&2&3!2&'(&F3!""#$%!&$'()*(!+,-(.$./3G&'2)*(!6'1(&(

;3!"((3&'()"D+&,38&(*6H6F3@.+.3"*D+3#,1-,"//'&,63>&,@&(3"25382"(!&3I&D+(&,;J",@>",&

! 7&6,'&85/'66&2E&,>"26&,A

;3E&,>"26&63H&'62'D+&3=*6&'2*(-3@&,3I&551*,D&(3K=&'6;C*26'#2&LM

;3E&,>"26&63,N*/2'D+&3=*6&'2*(-3@&,3I&551*,D&(3KI"*/;C*26'#2&LM

Operating Systems ... ?

17

„Glatz“-slide

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34

!"#$%"&''('#")"

*+,-#%.,/0%#1#",23"'2!"#$%"&''('#")'

! 5",67",&8*("9+:(-'-&3;,1-,"//'&,<=+('>><>&22&

! ?&,:>&*("9+:(-'-&3@'(8AB*<-"9&80*(!>'1(&(

! C&<<1*,=&(D&,7"2>*(-

! E#&'=+&,D&,7"2>*(-3F5"*#><#&'=+&,G

! H"<<&(<#&'=+&,D&,7"2>*(-3FI">&'<J<>&/G

! ;","22&29&>,'&93FH*2>'>"<!'(-G

! K(>&,#,1L&<<8M1//*('!">'1(

! E'=+&,+&'<>/&=+"('</&(

Operating Systems ... ?

18

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34

!"#$%"&''('#")"

*%+,-./'01&"234+"2/+52)%#2!"#$%"&''('#")

5,16&771, 8#&'9+&, :'(;<=*7;

-">&

?&@,'&>77A7@&/

=(B&(C&,#,1-,"//

!"#$%&'())))))*+,-!(

5,16&771, 8#&'9+&, :'(;<=*7;

-">&

=(B&(C&,#,1-,"//

.'/%$%&'()))))*+,-!(

Operating Systems ... ?

19

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34

!"#$%"&''('#")"

*+,-."/%0%#%10"0

5*/36&'7#'&28

.23-445677

...9'&3:,1-,"//&3&'(&739'-';"2&(3<&=+(&,7>7;&/739'&3?*7"//&(3/';39&(3@'-&(7=+");&(

9'&7&,3<&=+&("(2"-&39'&36"7'739&,3/A-2'=+&(36&;,'&B7",;&(39&73<&=+(&,7>7;&/73B'29&(

*(93'(7B&71(9&,&39'&3CBD'=!2*(-3E1(3:,1-,"//&(37;&*&,(3*(93FB&,D"=+&(.

809"$"-."/%0%#%10

@'(36&;,'&B77>7;&/3'7;3&'(&3G&(-&3E1(3:,1-,"//&(H39'&39'&3C*7)F+,*(-3E1(36&(*;?&,I

:,1-,"//&(3"*)3&'(&/3<&=+(&,3*(939&(3J&B,"*=+39&,3E1,+"(9&(&(36&;,'&B7/';;&237;&*I

&,(.

Operating Systems ... ?

20

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34

!"#$%"&''('#")"

!"#$%"&''('#")*+,'*!"##$%&'"()"&*+,-"&

! 5&661*,7&3839",*(:&,2'&-&(9&3;",9<",&

! 5&7+(&,3836:,*!:*,'&,:&3="//2*(-3>1(35&661*,7&(!2"66&(

! ?&9&3@2"66&3<',939*,7+3&'-&(&3=A6:&/#,1-,"//&3!1(:,122'&,:

-".#$+,"*/"''01$2". 3"$%45"$"*/"''01$2".

67#%8"/"''01$2".

3$09"''0$:".;

<0))1.%7+#%0.'"%.5"%#".=>*?.@A"$B#"*:C+'#+#1$".D*E$17F7"$D*6.9"%A".D*-"%A"A"$B#"D*"#2>;G>*H"#9I"$7*:".#J"$.#D*,07+,;*"#2>

3+''%8"/"''01$2".

K+14#'4"%25"$

L4"%25"$"%.5"%#".=>*3,+##".G>*!B.@"$M>*NEF/OPQERE*"#2>

Ressource Manager

21

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34

!"#$%"&''('#")"

!"*$%++',-$%-.#".

! 5&6&'7+(*(-389:;<&/=91)<>",&?31@&,389:;<&/#,1-,"//&?3"(;<&22&385&<,'&A;;:;<&/?! 97+&/"36*,3B'(<&'2*(-3C1(391)<>",&3

DE*&22&F35"*!(&7+<GH&+(@&,38I,*(@6J-&3@&,3K"<&(C&,",A&'<*(-?L

91)<>",&

9:;<&/#,1-,"//&3D5&<,'&A;;:;<&/L M(>&(@*(-;#,1-,"//&

9&2A;<&,;<&22<&

5'A2'1<+&!;#,1-,"//&

91)<>",&3N"!&<&

N,1-,"//&9<&*&,#,1-,"//&

9*#&,C';1,O3P1('<1,B'(-"A&GM*;-"A&9:;<&/21-0&+2&,,1*<'(&(

QA&,;&<6&, R&;<+'2)&( K'&(;<#,1-,"//&

S'2);#,1-,"//&6.5.391,<'&,#,1-,"//5'2A2'1<+&!;C&,>"2<*(-B@'<'&,#,1-,"//&

System Software

22

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34

!"#$%"&''('#")"

*+,-.%/0$1/2/3-%)-40)52#"$'('#")

5&678&,9",:&'7*(-

;/"'2<2'&(7

=&:>,1?@&,

A1//"(B19'(7&,#,&7&, <1/#'2&, ;B'71,

>&7,'&:@@C@7&/

D(@7,*!7'1(@@"7E9F,G+'7&!7*,3HDIFJ

K+C@'@G+&3L&,M7&N3IC@7&/#2"7'(&

F##2'!"7'1(&(

IC@7&/#,1-,"//&

O",B?",&

Computing System

23

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Computing System Components

24

1.6 Silberschatz, Galvin and Gagne ©2005Operating System Principles

Four Components of a Computer SystemFour Components of a Computer System

„Silberschatz“-slide

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34

!"#$%"&''('#")"

!"*+,-*+-./)0+#"$#"123%4

! 5&6,'&788986&/3:&,;"26&6<

! =,1>&881,

! ?,7&'68#&'@+&,

! A"88&(8#&'@+&,

! 5&(*6>&,8@+('6686&22&

! B1//*('!"6'1(8C3*(D3"(D&,&3=&,'#+&,'&-&,E6&

CF35&6,'&788986&/6+&1,'&37&,*+63D"/'63"*)3G1/#*6&,6&@+('!

! G1/#*6&,6&@+('!37&)"88638'@+3/'6<

H$I3J&@+(&,CK,*(D/1D&22&3HL1(3M&*/"((N3O",:",D3?,@+'6&!6*,I

HPI30*(!6'1(8;&'8&3D&83=,1>&881,83HQ(86,*!6'1(88"6>N3J&-'86&,"*)7"*N3?D,&88,"*/N

333333R(6&,#,1-,"//6&@+('!&(I

HSI3T#&'@+&,3*(D3'+,&3J&"2'8'&,*(-&(3H=,'/E,C3*(D3T&!*(DE,8#&'@+&,I

HUI3=&,'#+&,'&-&,E6&(3HV"86"6*,N35'2D8@+',/N3T@+('6686&22&(7"*86&'(&N3*8;.I

B*,>&,3J&:'&;3:1(3H$I3*(D3HPI3"283W'()X+,*(-3'(3D'&3V+&/"6'!3H8'&+&3012-&!"#'6&23P.$I

Computer Systems

25

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34

!"#$%"&''('#")"

*+,-!"#$%"&''('#").$#"/

5,*(6789:2';+3-'29<3!"#$%"&''('#")*+*,)-"&./-*0.$*1.'234$./-*56/*7$6-$8))"/

=>?<3@/!&+,7;+2*773-'293(';+93'//&,AB

?&'7#'&2&3)C,3@/-&D*(-&(3:*,3E*7)C+,*(-3F1(3G,1-,"//&(<

! H"*):&'97I79&/3&'(&,3G,1-,"//'&,7#,";+&

?&'7#'&2&<3EJEK3L16*2"MN

! O',9*&22&3L"7;+'(&3:*,3PQ'7;+&(!16&ME*7)C+,*(-

?&'7#'&2<3R"F"3O',9*"23L";+'(&K3GESTEH3GMU16&MV(9&,#,&9&,

! ?"7'7#,1-,"//3&'(&73W&;+(&,73=XL*99&,3D:Q.3O"9&,3"22&,3G,1-,"//&YB

?&'7#'&2&<3@>VZK3LSM['(61Q7

! G,1-,"//D'D2'19+&!

?&'7#'&2&<3L'!,1!1(9,122&,M?&9,'&D77I79&/&K3O\[1,!73&9;.

Kinds of Operating Systems

26

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$4

!"#$%"&''('#")"

*+,+*-./0''%'12"-3%4#"%/546"4

5'(6&'2*(-3("7+38(9&(:*(-;-&<'&6&(=

! >6"#&2?&,",<&'6*(-

! @'/&A>+",'(-AB&6,'&<

! 57+6C&'6<&6,'&<

5'(6&'2*(-3("7+3*(6&,;6D6C6&,3E&7+(&,;6,*!6*,=

! 5'(#,1C&;;1,;F;6&/&

! G*26'#,1C&;;1,;F;6&/&

! H&,6&'26&3>F;6&/&

IB=3&'(3<&;6'//6&;3B>3!"((3&'(&31:&,3/&+,&,&3E&7+(&,;6,*!6*,&(3*(6&,;6D6C&(

Kinds of Operating Systems

27

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009 28

1.25 Silberschatz, Galvin and Gagne ©2005Operating System Principles

Operating System StructureOperating System Structure

! Multiprogramming needed for efficiency

" Single user cannot keep CPU and I/O devices busy at all times

" Multiprogramming organizes jobs (code and data) so CPU always hasone to execute

" A subset of total jobs in system is kept in memory

" One job selected and run via job scheduling

" When it has to wait (for I/O for example), OS switches to another job

! Timesharing (multitasking) is logical extension in which CPU switchesjobs so frequently that users can interact with each job while it is running,creating interactive computing

" Response time should be < 1 second

" Each user has at least one program executing in memory !process

" If several jobs ready to run at the same time ! CPU scheduling

" If processes don!t fit in memory, swapping moves them in and out torun

" Virtual memory allows execution of processes not completely inmemory

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$$

!"#$%"&''('#")"

*+,-!"#$%"&''('#").$/0%#"1#2$"3

*+,+*-4$/0%#"1#2$56$)"3

! 452"6!351783*(934:+';&<5178<5&;,"6+;*(-3=5&'>#'&2?3@('7A

5&(*;B&,"##2'!";'1(C39'&3DEF3"(>#,'6+;

EGHFI.$3HJ>;&/3K"223F(;&,)"6&

52"6!3517

EGHFI.$3HJ>;&/3K"223F(;&,)"6&

:+';&3517 5&;,'&L>>J>;&/<M&,(3=!"#$%&'()*+*&#,-.#$(#/A

5&(*;B&,"##2'!";'1(C39'&3DEF3"(>#,'6+;

OS Architectures

29

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$4

!"#$%"&''('#")"

*+,+-.!"/0#1"$2.3.4"$/)560'

7"%'#0/8'9:;''"/.<5/.=$51"''5$"/

! 5'!,1!1(6,122&,

! 7#&8'"2'9'&,6&3:,18&991,&(

! ;'()"<+&3=('>&,9"2?5'!,1#,18&991,&(

! @&'96*(-9)A+'-&3=('>&,9"2?5'!,1#,18&991,&(B

??C3,&"2'9'&,&(3:,'>'2&-'&(9D96&/

=$%<%:"8%"/'('#")

! 7D96&/?51E*9B

F"22&3G&<+6&H3?C3)I,3J&6,'&K99D96&/<1E&

! L(M&(E&,?51E*9B

F&'(-&9<+,A(!6&3G&<+6&H3?C3)I,3L##2'!"6'1(9<1E&

Operating Modes

30

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$4

!"#$%"&''('#")"

!"%'*%"+,-.$%/%+"0%"1'('#")-2"$-34#4$4+5-3678-.$49"''4$:5)%+%"

5*#&,6'71,358"8&

97&,358"8&

:22&73&,2"*;83*(<3/=-2'>+3?53@3$A

?53@3BAC&D'77&3E(78,*!8'1(&(36&,;18&(3

5F02"-3"*)3B37&8G&(?;&(*8G83<*,>+35H78&/!1<&A

'22&-"2&3E(78,*!8'1(!"#$%'(8&,(&30&+27'8*"8'1(3!"#$%&I8&,(&30&+27'8*"8'1(3"#$%J",<D",&FE(8&,,*#83"#$%51)8D",&FE(8&,,*#83?&'&($)!(%*+A

Privileges in 68k Series Computers

31

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$4

!"#$%"&''('#")"

!"%'*%"+,-.$%/%+"0%"1'('#")-2"$-%1#"+-%345-.$67"''6$89)%+%"

5&(*67&,"##2'!"6'1(&(

89:6&/&,;&'6&,*(-&(

89:6&/<'&(:6&

33333=&,(

>?@AB

>?@A$

>?@AC

>?@AD

E"6&:

>?@3A3>,'F'2&-'&(:6*)&3G!"#$#%&'&()&$&%H

/I-2'J+&,3K'(:"67'(3&'(&/35&6,'&L:M:9:6&/

Privileges in Intel Series Computers

32

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$4

!"#$%"&''('#")"

*"$+,"%-./0'"$1/2/3"$4",/567"

!"48#9"$)678' 3"$4)678'

5*6)7+,8",&39"6:+'(&(8&)&+2& ;&-,&(<=&35*6>"+2 522&

?",@>",&AB*-,')) C&'(38<>.3(*,3/'=3?'2)&

@&63;&=,'&866D6=&/6

E"F3G122<*-,'))

5@,&66,"*/ H'(&,3#,13I,1<&66 J&#","=F3&K!2*6'L

Machine Instructions vs. Modes

33

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Mode Switching

34

1.28 Silberschatz, Galvin and Gagne ©2005Operating System Principles

Transition from User to Kernel ModeTransition from User to Kernel Mode

! Timer to prevent infinite loop / process hogging resources

" Set interrupt after specific period

" Operating system decrements counter

" When counter zero generate an interrupt

" Set up before scheduling process to regain control or terminate

program that exceeds allotted time

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$4

!"#$%"&''('#")"

*+,+-./0102%#3%'43".5('#")"

5##2'!"6'1(3$ 5##2'!"6'1(37 5##2'!"6'1(38

9'&(:6;&,6&'2&,

<",=>",&

„Monolithic OSs“

35

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$4

!"#$%"&''('#")"

*+,+-./"'01%01#"#".2('#")"

56+'6+738

56+'6+739

56+'6+73$

:##2'!"7'1(3$ :##2'!"7'1(39

;",<=",&

„Layered OSs“

36

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&3$4

!"#$%"&''('#")"

*+,+,-.%/$0/"$123('#")"

5&(*67&,#,17&889:2'&(6;

<"6&'=>&,?&, <'8#2"@=>&,?&, A&67B&!=>&?&,

C'!,1!&,(39!"#$%&'$(');

D",EB",&

*(+,%$+

*(-$./'

0'(1+2'$!%314

5'$(!%314

„Microkernel OSs“

37

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&345

!"#$%"&''('#")"

*+%,-.('#")-/

01$231$"

01$231$"4.#"5"$5+6

!"#$"%&'"("%

)*#+,*#"&'"("%

-."#&'"("%

!"#$"%&'"("%

71#"%4.5&'('#")-8/0%"&.12.3.4"59

:$;<"'''#"5"$5+6'4.5&'('#")-86#78"..87$4#7%&.12.3.4"59

.="%>?"$4@"$31A#5+6

:$;<"'';$4<5#"%A5+6

B+#"$4:$;<"''4C;))5+%D1#%;+

:5EE"$5+6821//"#&8*89"9

85"57#35*$*:"5"$49

8.89"+1%0$:9

8;<=9

F"%>?"+-889*#*84"#9 !A;>D-82%78>9

G"$H#"#$"%&"$-82"@%>"-2$%@"$9

!"+5#<"$=$;6$1))"

.('#")15E$5E4.>?+%##'#"AA"-8.3.4"5&8*%%&0$4"#/*8"9

:$;6$1))&%&A%;#?"D

Ex: System V

38

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&34$

!"#$%"&''('#")"

*%+,-.'/0111234

!"#$%&'(#

)#$*#+%&'(#

56$,.6$"78&'#$69#%-+'':;%:;#/<,-$(.-$#%/0"1$-213'*%4-5#$6%,/4=

56$,.6$"

>$6?%9#$"%&"$<7$-8932"%:$3;#$=

@"$+/<)#$*#+=

>"$A#"7/B+,/C6#"%'('#")7#$"%&"$/<:#;32#%-*(%<3+#=5"1#>:$3;#$=

DE"9B#%F"/<?@#2A13;#=

G"E#7/B+,/>$6?%9/D%+72

H('#"),%"+'#7I"$#"%J"$/<=5"1#>%"#$;32#%(3"8-129#$=

8B'K6&"/<>CL7/B+,MHDN/@-)O-+"+#"=

H('#")7G;$"6,'

H('#"),%"+'#74$-P"''"=#$;32#%8$'B2#""#"=

H('#");%J?'74$-P"''"/<"5"B1#>%"A88'$18$'2#""#"=

!"+B#P"$78OOJ%96#%-+"+

M)K"&B+K'7HB&'('#")"<?*;3$'*>#*1"A0"5"1#>"=

HB&'('#")74$-K$6))&%&J%-#;"9"+/<D+F%$-+)"+#/CQQR'=

Ex: MS Windows

39

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&344

!"#$%"&''('#")"

*+,+-./&'#$01#%23"3.04'.!"34#5"$6.437.83#9%:1;"$'%:<#

! 5678,"!8'1(3"*739&(*8:&,7';+8<

==>3'(8*'8'?&39&@'&(*(-3&,/A-2';+&(

! 5678,"!8'1(3"*73BC78&/=3*(@3D(8E';!2&,7';+8<

==>3D'()";++&'83@&,3F,1-,"//'&,*(-

==>302&G'6'2'8H83@*,;+3I("6+H(-'!&'83?1(3J&;+(&,#2"88)1,/3K3F&,'#+&,'&

OS = Abstract Machine Interface

40

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&345

!"#$%"&''('#")"

*&'#$+,#%-./+0'/!".0#1"$'%23#

4"5".'6#1"

! 6'()"7+&3*(83'(9*'9':&3;'<*"2'<'&,*(-3:1(=

>3-&<#&'7+&,9&,3?()1,/"9'1(

>3;1,-@(-&(38&,3A"9&(:&,",B&'9*(-

! 6))'C'&(9&3A"9&("B2"-&3*(83;&,",B&'9*(-

! D'<91,'<7+3B&8'(-9=

>3E&<<1*,7&(>3*(83F&'<9*(-<B&-,&(C*(-&(

>3E&7+(&,B&(*9C&,3/&'<930"7+2&*9&

>3!&'(&36'('-!&'93B&CG-2'7+3A",<9&22*(-3:1(3E&7+(&,1BH&!9&(

! FI<*(-3/'99&2<3J&9"#+&,(=

!"#$%&'()'*(+,, -..&/*0)'*(+,, 1'+&'('2-..&/*0)'*(+,,'

)'2& K!9& A"9&'L3&2&!9,1('<7+&<3A1!*/&(9

)128&, D@(-&/"##& M,8(&,L3;&,C&'7+('<

User I/F

41

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Abstraction of Varying Device-I/Fs

42

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

!"#$%&'()*&+,*(-.)/ 012'&345

!"#$%"&''('#")"

*&'#$+,#%-./+0'/1('#")2/0.3/4.#5%6,7"$'%68#

9.%:"$'"77"/;"$5".3&+$,"%#/30$68/<"''-0$6".+&'#$+,#%-.

! 6789,"!9'1(3:1(3;(89,*!9'1(88"9<",=+'9&!9*,3>?7&(&3@&83A,1<&881,9B#8C

! 6789,"!9'1(3:1(3<&(9,"2&,3D&=+(&,+",@E",&3>?7&(&3@&,3FB89&/#2"9'(&C

! 6789,"!9'1(3@&,3?'(G3H36*8-"7&8=+('9989&22&(

! 6789,"!9'1(3:1(3!1(!,&9&,3A&,'#+&,'&

=$->"''+&'#$+,#%-.

! I&@&,3"*8-&)J+,9&3A,1<&883+"938=+&'(7",3D&=+(&,3)J,38'=+3"22&'(&

! ?'(-&8&9<9&3K'99&2L

G3M&'9/*29'#2&N3@&,3OAP

G3D"*//*29'#2&N3@&836,7&'988#&'=+&,8

!"%'?%"7/9@AB

! M&(9,"2&3?(9E*,)8#+'2181#+'&(L3!"#$%"&'#(")#%*+3*(@3,(*-$''"&'#(")#%*+

System Internals

43

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Storage Device Hierarchy

44

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Programs vs. Processes

45

1.29 Silberschatz, Galvin and Gagne ©2005Operating System Principles

Process ManagementProcess Management

! A process is a program in execution. It is a unit of work within the system.Program is a passive entity, process is an active entity.

! Process needs resources to accomplish its task

" CPU, memory, I/O, files

" Initialization data

! Process termination requires reclaim of any reusable resources

! Single-threaded process has one program counter specifying location ofnext instruction to execute

" Process executes instructions sequentially, one at a time, untilcompletion

! Multi-threaded process has one program counter per thread

! Typically system has many processes, some user, some operating systemrunning concurrently on one or more CPUs

" Concurrency by multiplexing the CPUs among the processes / threads

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Process Management

46

1.30 Silberschatz, Galvin and Gagne ©2005Operating System Principles

Process Management ActivitiesProcess Management Activities

The operating system is responsible for the following activities in

connection with process management:

! Creating and deleting both user and system processes

! Suspending and resuming processes

! Providing mechanisms for process synchronization

! Providing mechanisms for process communication

! Providing mechanisms for deadlock handling

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Intended Schedule

47

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Intended Schedule

Date Lecture Hand out Submission

0 20.04. Introducing Operating Systems Course registrationCourse registration1 27.04. Systems Programming using C 1. Assignment2 04.05. Program Execution, System Calls 2. Assignment 1. Assignment3 11.05. Processes (Scheduling ...) 3. Assignment 2. Assignment4 18.05. Synchronization (Semaphors, Deadlocks ...) 4. Assignment 3. Assignment5 25.05. IPC (Pipes, Signals, Shared Memory ...) 5. Assignment 4. Assignment6 01.06. Pfingstmontag 6. Assignment 5. Assignment7 08.06. Input / Output 7. Assignment 6. Assignment8 15.06. Memory Management 8. Assignment 7. Assignment9 22.06.

Filesystems9. Assignment 8. Assignment

10 29.06.Filesystems

10. Assignment 9. Assignment11 06.07. Special subject: Transactional Memory 10. Assignment12 13.07. Special subject: XQuery your Filesystem13 20.07. Wrap up session

✏27.07. First examination dateFirst examination dateFirst examination date

✏ 12.10. Second examination dateSecond examination dateSecond examination date

48

Operating Systems • Prof. Dr. Marc H. Scholl • DBIS • U KN • Summer Term 2009

Next lecture

• Next lecture:• Systems Programming using C (1/3), 27.04., 12:00 - 14:00, D 247

• Next tutorial:• Systems Programming using C (2/3), 28.04., 16:00 - 18:00, C 252

• Slides:http://www.informatik.uni-konstanz.de/arbeitsgruppen/dbis/lehre/operating-systems/

• Have fun and see you next week!

49