DOC PREVIEW
U of I CS 241 - Lecture notes

This preview shows page 1-2-17-18-19-35-36 out of 36 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 36 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

http://www.cse.buffalo.edu/~rapaport/howtostudy.htmlWork HabitsOperating System OverviewContentsQuestionInterrupt MechanismLarge Pentium systemA peek into UnixUnix: ApplicationUnix: LibrariesTypical Unix OS StructureSlide 12Process HierarchyCode Layout for ProcessConflicts --- DeadlocksInter-process CommunicationSlide 17Steps in Making a System CallSome System Calls For Process ManagementShellFile System for University DeptFile System LinksMounting File SystemsMount file systems (UNIX)Some System Calls For File ManagementSome System Calls For Directory ManagementSome System Calls For Miscellaneous TasksSystem Calls in WindowsOperating System StructureSlide 30VM Operating System StructureMicrokernel Operating System StructureDistributed Operating System StructureMetric UnitsReading for Next ClassSummary01/14/19CS241 © 2007 KN and LA, All Rights Reserved1http://www.cse.buffalo.edu/~rapaport/howtostudy.html01/14/19CS241 © 2007 KN and LA, All Rights Reserved2Work HabitsAssume education is a full-time job or 40 hours/week. 1 academic credit equals 1 hour. 12 credits is 12 hours in class. 40 – 12 gives you 28 hours that you should be spending studying at home (or in the library).CS 241 Spring 2007System Programming 01/14/19 CS241 © 2007 KN and LA, All Rights Reserved3 Operating System OverviewOperating System OverviewProfessor: Klara Nahrstedt01/14/19CS241 © 2007 KN and LA, All Rights Reserved4ContentsHardware Review S: Ch 1 Operating System ConceptsSystem CallsOperating System StructureUnits01/14/19CS241 © 2007 KN and LA, All Rights Reserved5QuestionInterrupts: are they the basis for:# Question Yes No1 Security A B2 Asynchronous Events A B3 System Calls A B4 Multiprogramming A B5 Libraries A B01/14/19CS241 © 2007 KN and LA, All Rights Reserved6Interrupt Mechanism(a)a) Steps in starting an I/O device and getting interruptb) How the CPU is interrupted(b)01/14/19CS241 © 2007 KN and LA, All Rights Reserved7Large Pentium system01/14/19CS241 © 2007 KN and LA, All Rights Reserved8A peek into UnixApplicationPortableOSLayerLibrariesMachine-dependentlayerUserspace/levelKernelspace/level• User/kernel modes are supported by hardware •Some systems do not have clear user-kernel boundary01/14/19CS241 © 2007 KN and LA, All Rights Reserved9Unix: ApplicationApplication(E.g.,emacs)PortableOSLayerLibrariesMachine-dependentlayerWrittenbyprogrammerCompiledbyprogrammerUsesfunctioncalls01/14/19CS241 © 2007 KN and LA, All Rights Reserved10Unix: LibrariesApplicationPortableOSLayerLibraries(e.g.,stdio.h)Machine-dependentlayerProvidedpre-compiledDefinedinheadersInputtolinker(compiler)InvokedlikefunctionsMaybe“resolved”whenprogramisloaded01/14/19CS241 © 2007 KN and LA, All Rights Reserved11Typical Unix OS StructureApplicationPortableOSLayerLibrariesMachine-dependentlayersystemcalls(read,open..)All“high-level”code01/14/19CS241 © 2007 KN and LA, All Rights Reserved12Typical Unix OS StructureApplicationPortableOSLayerLibrariesMachine-dependentlayerBootstrapSysteminitializationInterruptandexceptionI/OdevicedriverMemorymanagementKernel/usermodeswitchingProcessormanagement01/14/19CS241 © 2007 KN and LA, All Rights Reserved13Process HierarchyA process treeA created two child processes, B and CB created three child processes, D, E, and F01/14/19CS241 © 2007 KN and LA, All Rights Reserved14Code Layout for ProcessProcesses have three segments: text, data, stack01/14/19CS241 © 2007 KN and LA, All Rights Reserved15Conflicts --- Deadlocks(a) A potential deadlock. (b) an actual deadlock.01/14/19CS241 © 2007 KN and LA, All Rights Reserved16Inter-process CommunicationTwo processes connected by a pipe01/14/19CS241 © 2007 KN and LA, All Rights Reserved17QuestionStacks: are needed for:# Question Yes No1 Multiple Interrupts A B2 System Calls A B3 Debugging A B4 C++ A B01/14/19CS241 © 2007 KN and LA, All Rights Reserved18Steps in Making a System Call read (fd, buffer, nbytes)01/14/19CS241 © 2007 KN and LA, All Rights Reserved19Some System Calls For Process Management01/14/19CS241 © 2007 KN and LA, All Rights Reserved20ShellA stripped down shell:while (TRUE) { /* repeat forever */ type_prompt( ); /* display prompt */ read_command (command, parameters) /* input from terminal */ if (fork() != 0) { /* fork off child process */ /* Parent code */ waitpid( -1, &status, 0); /* wait for child to exit */} else { /* Child code */ execve (command, parameters, 0); /* execute command */ }}01/14/19CS241 © 2007 KN and LA, All Rights Reserved21File System for University Dept01/14/19CS241 © 2007 KN and LA, All Rights Reserved22File System Links(a) Two directories before linking/usr/jim/memo to ast's directory(b) The same directories after linking01/14/19CS241 © 2007 KN and LA, All Rights Reserved23Mounting File SystemsBefore mounting, files on floppy are inaccessibleAfter mounting floppy on b,–files on floppy are part of file hierarchy01/14/19CS241 © 2007 KN and LA, All Rights Reserved24Mount file systems (UNIX)(a) File system before the mount(b) File system after the mount01/14/19CS241 © 2007 KN and LA, All Rights Reserved25Some System Calls For File Management01/14/19CS241 © 2007 KN and LA, All Rights Reserved26Some System Calls For Directory Management01/14/19CS241 © 2007 KN and LA, All Rights Reserved27Some System Calls For Miscellaneous Tasks01/14/19CS241 © 2007 KN and LA, All Rights Reserved28System Calls in Windows01/14/19CS241 © 2007 KN and LA, All Rights Reserved29Operating System StructureSimple structuring model for a monolithic system01/14/19CS241 © 2007 KN and LA, All Rights Reserved30Operating System StructureStructure of the THE operating system01/14/19CS241 © 2007 KN and LA, All Rights Reserved31VM Operating System StructureStructure of VM/370 with CMS01/14/19CS241 © 2007 KN and LA, All Rights Reserved32Microkernel Operating System StructureThe client-server model01/14/19CS241 © 2007 KN and LA, All Rights Reserved33Distributed Operating System StructureThe client-server model in a distributed system01/14/19CS241 © 2007 KN and LA, All Rights Reserved34Metric UnitsThemetricprefixes01/14/19CS241 © 2007 KN and LA, All Rights Reserved35Reading for Next ClassS: Ch 2 pp 1-80+ R: Ch 1, 2 pp 1-48Revise your CRead


View Full Document

U of I CS 241 - Lecture notes

Documents in this Course
Process

Process

28 pages

Files

Files

37 pages

File I/O

File I/O

52 pages

C Basics

C Basics

69 pages

Memory

Memory

23 pages

Threads

Threads

14 pages

Lecture

Lecture

55 pages

C Basics

C Basics

24 pages

Signals

Signals

27 pages

Memory

Memory

45 pages

Threads

Threads

47 pages

Threads

Threads

28 pages

LECTURE

LECTURE

45 pages

Threads

Threads

30 pages

Threads

Threads

55 pages

Files

Files

37 pages

SIGNALS

SIGNALS

22 pages

Files

Files

37 pages

Threads

Threads

14 pages

Threads

Threads

13 pages

Load more
Download Lecture notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?