●●● ●●●● 2. Operating-System Structures 9988 ●●●● 2.1 Operating System Services 2.2 User Operating System Interface ●23 System Calls 2. 4 Types of System Calls ·24 System Programs 2.6 Operating System Design and Implementation 2.7 Operating System Structure ●28 Virtual machines 2.9 Operating System Generation 2.10 System Boot
11 2. Operating-System Structures ⚫ 2.1 Operating System Services ⚫ 2.2 User Operating System Interface ⚫ 2.3 System Calls ⚫ 2.4 Types of System Calls ⚫ 2.4 System Programs ⚫ 2.6 Operating System Design and Implementation ⚫ 2.7 Operating System Structure ⚫ 2.8 Virtual Machines ⚫ 2.9 Operating System Generation ⚫ 2.10 System Boot
●●● ●●●● 2.2 User Operating System Interface 99a ●●●● Command Line Interface(CLI) ● Command interpreter(解释器) allows directly to enter command entry o The main function to fetch a command from user and executes it o Some are implemented in kernel o some are treated as a special system program o Shells multiple flavors implemented csh, bsh ksh Provide similar functionality with little differences
12 2.2 User Operating System Interface ⚫ Command Line Interface (CLI) ⚫ Command interpreter(解释器) ⚫ allows directly to enter command entry ⚫ The main function to fetch a command from user and executes it ⚫ Some are implemented in kernel ⚫ some are treated as a special system program ⚫ Shells ▪ multiple flavors implemented ▪ csh, bsh,ksh ▪ Provide similar functionality with little differences
●●● ●●●● 2.2 User Operating System Interface 99a ●●●● o Two general type of command to implement commands built -in the interpreter contains the code to execute the command ● just name of program the interpreter just use command to identify an executable file to be loaded to memory and executed For example, in UNIX,“ m fille. txt;,"“ rm"is an executable file adding new features doesn't require shell modification
13 2.2 User Operating System Interface ⚫ Two general type of command to implement ⚫ commands built-in ▪ the interpreter contains the code to execute the command ⚫ just name of program ▪ the interpreter just use command to identify an executable file to be loaded to memory and executed ▪ For example, in UNIX, “rm file.txt”, “rm” is an executable file ▪ adding new features doesn’t require shell modification
●●● ●●●● 2.2 User Operating System Interface 99a ●●●● 目 Terminal Eile Edit View Terminal Tabs Help fdo 0.00.00.00.00.00.00.000 0.00.2 00.20.00.00.400 0.00.00.00.00.00.00.000 extended device statistics device r/s w/s kr/s kw/s wait actv svc-t9w 0.00.00.00.00.00.00.000 do 0.60.038.40.00.00.08.200 sd1 0.00.00.00.00.00.00.000 (rootapbg-nmv64-vn)(11/pts)-(00: 53 15-Jun-2007)-(global) -(/var/tmp/system-contents/scripts) swap-sh total: 1.1G allocated 190M reserved= 1. 3G used, 1.6G available Crootapbg-nv64-vn)-(12/pts)-(00: 53 15-Jun-2007)-(global) -(/var/tmp/systen-contents/scripts)# uptime 12: 53am up 9 min(s), 3 users, load average: 33.29, 67.68, 36.81 Crootepbg-nv64-vn)-(13/pts)-(00: 53 15-Jun-2007)-(global) -(var/tmp/systen-contents/scripts)sw 4: 07pm up 17 day (s), 15: 24, 3 users, load average: 0.09,, 8.66 User login idle JCPU PCPU what root conso e 15Jun0718days /usr/bin/ssh-agent --/usr/bi root pts/3 15]un07 18 4 w root pts/ 15]un0718days (root@pbg-m64vm)-(14/pts)-(16:0702-Ju1-2007)-( global) -(/var/tmp/system-contents/scripts)s
14 2.2 User Operating System Interface
●●● ●●●● 2.2 User Operating System Interface 99a ●●●● GUI Provide a mouse-based window-and-menu system as an interface e Provides desktop metaphor Images or icons on the desktop represent programs, file, system function,…… Clicking a button on the mouse can invoke a program, select a file or directory or pull down a menu Developing history Invented at Xerox parc Apple Macintosh computer Windows o UNIX: CDE X-window KDE, GNOME-open source
15 2.2 User Operating System Interface ⚫ GUI ⚫ Provide a mouse-based window-and-menu system as an interface ⚫ Provides desktop metaphor ⚫ Images or icons on the desktop represent programs, file, system function,…… ⚫ Clicking a button on the mouse can invoke a program, select a file or directory or pull down a menu ⚫ Developing history ⚫ Invented at Xerox PARC ⚫ Apple Macintosh computer ⚫ Windows ⚫ UNIX: CDE, X-window, ⚫ KDE, GNOME—open source