Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2. System Structures

Similar presentations


Presentation on theme: "Chapter 2. System Structures"— Presentation transcript:

1 Chapter 2. System Structures
Operating System Concepts 8th Edition Chapter 2. System Structures Gan Lin, OSLab. GNU

2 - Ch.2 System Structures -
Contents 2.1 Operating-System Services 2.2 User Operating-System Interface 2.3 System Calls 2.4 Types of System Calls 2.5 System Programs 2.6 Operating-System Design and Implementation 2.7 Operating-System Structure 2.8 Virtual Machines 2.9 Operating-System Debugging 2.10 Operating-System Generation 2.11 System Boot 2.12 Summary 2017/4/26 - Ch.2 System Structures -

3 - Ch.2 System Structures -
Objectives To describe the services an operating system provides to users, processes, and other systems. To discuss the various ways of structuring an operating system. To explain how operating systems are installed and customized and how they boot. 2017/4/26 - Ch.2 System Structures -

4 2.1 Operating-System Services
user and other system programs GUI batch command line user interface system calls program execution I/O operations file systems communication resource allocation accounting error detection protection & security services operating system hardware Fig. 2.1 A view of operating system services 2017/4/26 - Ch.2 System Structures -

5 2.2 User Operating-System Interface
Command Interpreter Graphical User Interfaces 2017/4/26 - Ch.2 System Structures -

6 - Ch.2 System Structures -
2.3 System Calls Example System Call Sequence Acquire input file name Write prompt to screen Accept input Acquire output file name Open the input file if file doesn't exits, abort Create out file if file exits, abort Loop Read from input file Write to output file Until read fails Close output file Write completion message to screen Terminate normally source file Fig. 2.2 Example of how system calls are used destination file 2017/4/26 - Ch.2 System Structures -

7 - Ch.2 System Structures -
2.3 System Calls API(Application Programming Interface) - Win32 API, POSIX API, and Java API return value BOOL ReadFile c (HANDLE file, LPVOID buffer, DWORD bytes To Read, LPDWORD bytes Read, LPOVERLAPPED ovl); parameters function name Fig. 2.3 The API for the ReadFile() function 2017/4/26 - Ch.2 System Structures -

8 - Ch.2 System Structures -
2.3 System Calls System-call interface user application open() user mode system call interface kernel mode . open() Implementation of open() system call return i . Fig.2.4 The handling of a user application invoking the open() system call 2017/4/26 - Ch.2 System Structures -

9 - Ch.2 System Structures -
2.4 Types of System Calls Windows Unix Process Control CreateProcess() fork() ExitProcess() exit() WaitForSingleObject() wait() File Manipulation CreateFile() open() ReadFile() read() WriteFile() write() CloseHandle() close() Device Manipulation SetConsoleMode() ioctl() ReadConsole() WriteConsole() Information Maintenance GetCurrentProcessID() getpid() SetTimer() alarm() Sleep() sleep() Communication CreatePipe() pipe() CreateFileMapping() shmget() MapViewOfFile() mmap() Protection SetFileSecurity() chmod() InitlializeSecurityDescriptor() umask() SetSecurityDescriptorGroup() chown() 2017/4/26 - Ch.2 System Structures -

10 - Ch.2 System Structures -
2.5 System Programs File management -create, delete, copy, rename, print, dump, list, and generally manipulate files and directories Status information -ask data, time, memory, disk, and user and such information File modification -create, modify and search the contents of the files 2017/4/26 - Ch.2 System Structures -

11 - Ch.2 System Structures -
2.5 System Programs File management -create, delete, copy, rename, print, dump, list, and generally manipulate files and directories Status information -ask data, time, memory, disk, and user and such information File modification -create, modify and search the contents of the files 2017/4/26 - Ch.2 System Structures -

12 - Ch.2 System Structures -
2.5 System Programs Programming-language support -compilers, assemblers, debuggers and interpreters Program loading and execution -absolute loaders, relocatable loaders, linkage editors and overlay loaders Communications -create virtual connections among processes, users, and computer systems. 2017/4/26 - Ch.2 System Structures -

13 - Ch.2 System Structures -
2.6 Operating-System Design and Implementation Design Goals Mechanisms and Policies Implementation 2017/4/26 - Ch.2 System Structures -

14 2.7 Operating-System Structure
Simple Structure Application program Resident system program MS-DOS device drivers Application program Fig. 2.5 MS-DOS layer structure 2017/4/26 - Ch.2 System Structures -

15 2.7 Operating-System Structure
Layered Approach layer N user interface layer 1 layer 0 hardware Fig. 2.6 A layered operating system 2017/4/26 - Ch.2 System Structures -

16 2.7 Operating-System Structure
Microkernels -Mach: remove all nonessential components from the kernel and implement them as system and user-level programs. -provide a communication facility between the client program and the various services that are also running in user space. -easy to extend the operating system 2017/4/26 - Ch.2 System Structures -

17 2.7 Operating-System Structure
Modules scheduling classes device and bus drivers file systems Core Solaris kernel miscellaneous modules loadable system call STREAMS modules executable formats Fig. 2.7 Solaris loadable modules 2017/4/26 - Ch.2 System Structures -

18 2.10 Operating-System Generation
An operating system is designed to run on any of a class of machines at a variety of sites with a variety of peripheral configurations. SYSGEN(system generation) -reads from a given file, or ask for information. 2017/4/26 - Ch.2 System Structures -

19 - Ch.2 System Structures -
2.11 System Boot Bootstrap program/loader -a small piece of code which locates the kernel and loads it into main memory, and starts its execution. 1.Powered up 2.IR load a predefined location 3.Bootstrap perform a variety of tasks(diagnostics) 4.Start the operating system 2017/4/26 - Ch.2 System Structures -


Download ppt "Chapter 2. System Structures"

Similar presentations


Ads by Google