Presentation is loading. Please wait.

Presentation is loading. Please wait.

Understanding Operating Systems Sixth Edition Chapter 16 Linux Operating System.

Similar presentations


Presentation on theme: "Understanding Operating Systems Sixth Edition Chapter 16 Linux Operating System."— Presentation transcript:

1 Understanding Operating Systems Sixth Edition Chapter 16 Linux Operating System

2 Understanding Operating Systems, Sixth Edition2 Learning Objectives After completing this chapter, you should be able to describe: The design goals for the Linux operating system The flexibility offered by using files to manipulate devices The differences between command-driven and menu-driven interfaces The roles of the Memory, Device, File, Processor, and Network Managers Some strengths and weaknesses of Linux

3 Understanding Operating Systems, Sixth Edition3 Overview POSIX-compliant Portable –Versions for cell phones, supercomputers, and computing systems in between Source code: freely available –Configurable: run any device, meet any specification User interface –Powerful desktop GUIs attracts users Highly modular –Multiple modules load and unload on demand Technically robust operating system

4 Understanding Operating Systems, Sixth Edition4 History Developed by Linus Torvalds (1991) Original purpose –Maximize Intel 80386 microprocessor’s limited capabilities –Roots Minix: miniature UNIX with more functionality First version meant for small microcomputer –Expensive commercial computer features Flexibility and functionality –Brought UNIX features to small computer

5 Understanding Operating Systems, Sixth Edition5 History (cont'd.) Open-source program –Updates accepted from anyone User interface –Originally typed and cryptic commands –Today Command-driven interface (Terminal mode) Graphical user interface (GUI) Red Hat Linux provided initial primary support –World’s leading Linux distributor (until 2003) GNU General Public License

6 Understanding Operating Systems, Sixth Edition6 History (cont'd.)

7 Understanding Operating Systems, Sixth Edition7 History (cont'd.)

8 Understanding Operating Systems, Sixth Edition8 Design Goals Three goals –Modularity –Simplicity –Portability Numerous standard utilities –Eliminates need to write special code –Used in combination for specific tasks Numerous functions Conforms to IEEE POSIX specifications –Portable Operating System Interface for Computer Environments

9 Understanding Operating Systems, Sixth Edition9 Design Goals (cont'd.)

10 Understanding Operating Systems, Sixth Edition10 Memory Management Space allocation –Kernel: 1 GB high order memory –Executing processes: 3 GB memory Process execution –Segment fixed size –System calls change segment size Memory protection –Based on information type stored in address space region for process

11 Understanding Operating Systems, Sixth Edition11 Memory Management (cont'd.) Page loading –Least recently used algorithm (LRU) –Maintains a dynamically managed memory area and page cache (new and old pages inserted and deleted) System page tables –Tracks free and busy pages Virtual memory –Managed using multiple-level table hierarchy 64- and 32-bit architectures –Added flexibility with swap devices May deactivate without rebooting

12 Understanding Operating Systems, Sixth Edition12 Memory Management (cont'd.) Virtual memory managed using multiple-level table hierarchy –Four fields in virtual address

13 Understanding Operating Systems, Sixth Edition13 Memory Management (cont'd.)

14 Understanding Operating Systems, Sixth Edition14 Memory Management (cont'd.) Buddy algorithm –Grouping and splitting equal-sized page frames Give more contiguous space to job Page replacement algorithm –Clock page replacement policy expanded version –Uses eight-bit byte to track page’s activity Referred to as “age”

15 Understanding Operating Systems, Sixth Edition15 Memory Management (cont'd.)

16 Understanding Operating Systems, Sixth Edition16 Processor Management Uses same parent-child process management design found in UNIX “Personality” concept –Allow processes from other operating systems to be executed

17 Understanding Operating Systems, Sixth Edition17 Organization of Process Table Descriptor: references process Contains approximately 70 fields –Describes process attributes Information needed to manage process –Dynamically allocated by kernel Process execution time –Organized by doubly linked lists “Next run” field “Previously run” field –Scheduler manages and updates descriptors Macros

18 Understanding Operating Systems, Sixth Edition18 Process Synchronization Wait queues and semaphores –Synchronize two processes with each other Wait queue –Linked circular list of process descriptors –Problems solved Mutual exclusion and producers and consumers Semaphore structure –Three fields (semaphore counter, number of waiting processes, list of processes waiting for semaphore) Counter contains binary values Except if several units of one resource available

19 Understanding Operating Systems, Sixth Edition19 Process Management Linux scheduler –Scans processes list in READY state –Chooses process to execute Using predefined criteria Three scheduling types –Real-time processes (two) –Normal processes (one) Process scheduling policy determination –Combination of type and priority

20 Understanding Operating Systems, Sixth Edition20 Process Management (cont'd.)

21 Understanding Operating Systems, Sixth Edition21 Process Management (cont'd.) First type –Highest priority (SCHED_FIFO) First in, first out algorithm –Not preemptible –Runs to completion unless: Process goes into WAIT state Process relinquishes processor voluntarily –All FIFO processes complete Scheduler processes lower priority types

22 Understanding Operating Systems, Sixth Edition22 Process Management (cont'd.) Second type –Medium priority (SCHED_RR) Round robin algorithm with small time quantum –Time quantum expires Other higher priority processes (FIFO, RR ) selected and executed Before first process allowed to complete Third type –Low priority (SCHED_OTHER) –Executed if no higher priority processes in READY queue

23 Understanding Operating Systems, Sixth Edition23 Device Management Device independent –Improves portability Device drivers –Supervise data transmission Between main memory and peripheral unit Devices assigned –Name –Descriptors Further identify each device Stored in device directory

24 Understanding Operating Systems, Sixth Edition24 Device Management (cont'd.)

25 Understanding Operating Systems, Sixth Edition25 Device Management (cont'd.) Device drivers –Comprehensive collection in Linux Required driver not available –Obtain from another source Install separately –Manually write the driver Requires skilled programmer

26 Understanding Operating Systems, Sixth Edition26 Device Classifications Device identification –Minor device number Passed to device driver as an argument Accesses one of several identical physical devices –Major device number Index to array to access appropriate code Configuration table for each class –Entry point into driver –Only connection between system code and driver –Importance Allows quick creation of device drivers

27 Understanding Operating Systems, Sixth Edition27 Device Drivers Support for standard classes introduced by UNIX Allow new device classes supporting new technology Device classes not rigid –Create large, complex, multiple function drivers –Discouraged because: Users share code, demand simple drivers Modular code supports system scalability and extendibility goal –Encouraged: drivers maximizing system’s effective device usage

28 Understanding Operating Systems, Sixth Edition28 Device Drivers (cont'd.) Notable feature –Accept new device drivers on the fly System up and running No reboot necessary

29 Understanding Operating Systems, Sixth Edition29 Device Classes Three standard classes

30 Understanding Operating Systems, Sixth Edition30 Device Classes (cont'd.) Character (char) devices –Accessed as a stream of bytes Communications port, monitor, other byte-stream-fed device –Implement open, close, read, write system calls –Accessed by file system nodes Look like ordinary data area –Drivers treated as ordinary files Exception: drivers are data channels accessed sequentially

31 Understanding Operating Systems, Sixth Edition31 Device Classes (cont'd.) Block devices –Host a file system (hard disk) –Accessed by file system nodes in /dev directory Transfer in blocks of data –Similarity to char driver Appear as ordinary files –Dissimilarity to char driver Access file system in connection with device (not possible with char device)

32 Understanding Operating Systems, Sixth Edition32 Device Classes (cont'd.) Network interfaces –Function Send and receive information packets Directed by network subsystem –Network device functions Relate to packet transmission Not read and write calls Dissimilar from block and char System device handled by device driver –Under direction of Linux subsystem

33 Understanding Operating Systems, Sixth Edition33 File Management Data structures Filename conventions Directory listings

34 Understanding Operating Systems, Sixth Edition34 Data Structures Files organized in directories –Connected in treelike structure Five file types

35 Understanding Operating Systems, Sixth Edition35 Filename Conventions Case sensitive –Recognizes uppercase and lowercase letters Up to 255 characters long Contain alphabetic characters, underscores, numbers File suffixes: optional Can include space –Complications if running command-line programs Uses file hierarchy –First slash indicates an absolute path name

36 Understanding Operating Systems, Sixth Edition36 Filename Conventions (cont'd.)

37 Understanding Operating Systems, Sixth Edition37 Filename Conventions (cont'd.) Path name rules –Path name starting with slash (at root directory) –Path name One name or list of names separated by slashes –Last name on list Name of file requested Preceding names must be directory names –Two periods (..) in path name Move upward in hierarchy (closer to root) Only way to go up hierarchy Other path names go down tree

38 Understanding Operating Systems, Sixth Edition38 Filename Conventions (cont'd.) Data structures: Virtual File System (VFS) –Kernel Allows processes to access files in a consistent manner Maintains interface between file related system calls and file management code –Virtual file system layer Receives process-initiated system call to files Performs file operations Independent of file system format Redirects request to module managing file

39 Understanding Operating Systems, Sixth Edition39 Directory Listings Creation –ls or ls -l command –GUI interface Displays: –File or directory name –Size –Modification date and time Permissions column –Code: file’s type and access privileges –Order of letters indicates the specific access granted

40 Understanding Operating Systems, Sixth Edition40 Directory Listings (cont'd.)

41 Understanding Operating Systems, Sixth Edition41 Directory Listings (cont'd.) First column character: nature of folder entry –Dash (-) indicates a file –d indicates a directory file –l indicates a link –b indicates a block special file –c indicates a character special file Next three characters (rwx): file owner privileges –r indicates read access –w indicates write access –x indicates execute access

42 Understanding Operating Systems, Sixth Edition42 Directory Listings (cont'd.) Next three characters –Group access privileges Group: set of users, excluding owner, having something in common (project, class, department) System-wide group of users: “world” Last three characters –Access privileges granted to “others” Others: users at large (excluding owner and group member)

43 Understanding Operating Systems, Sixth Edition43 Directory Listings (cont'd.) Change file security –Owner (and only the owner) opens file properties to be protected File-Properties from the File menu –Click on Permissions tab –Choose the appropriate access For owner, group, others

44 Understanding Operating Systems, Sixth Edition44 User Interface Early Linux versions –Required typed commands Thorough knowledge of valid commands required Current versions –Include powerful and intuitive GUI desktops Novice user can use successfully –Navigate operating system –Can still use Terminal mode Type commands similar to those used for UNIX

45 Understanding Operating Systems, Sixth Edition45 Command-Driven Interfaces Typed command general syntax –command arguments filename Command: legal operating system command Arguments: required or optional Filename: filename –Relative or absolute path name Shell (bash shell) –Command interpreter –Interprets and executes command –Key to system program coordination and combination

46 Understanding Operating Systems, Sixth Edition46 Command-Driven Interfaces (cont'd.)

47 Understanding Operating Systems, Sixth Edition47 Graphical User Interfaces Multiple graphical user interfaces (often free) –Allowing choice for end users –Different GUIs used by different users on same system (certain environments) –Flexibility –Spurring Linux acceptance Sophisticated Windows-compatible word processors, spreadsheet, presentation applications (some at no cost) –Spurring Linux popularity

48 Understanding Operating Systems, Sixth Edition48 System Monitor System Monitor window –System well-being information –Immediate history CPU, memory, network usage Other information –Supported file systems –Currently running processes information

49 Understanding Operating Systems, Sixth Edition49 System Monitor (cont'd.)

50 Understanding Operating Systems, Sixth Edition50 Service Settings Variety of services help manage system –Linux distribution dependent (see documentation)

51 Understanding Operating Systems, Sixth Edition51 System Logs System logs –Provide detailed description of activity on system –Invaluable to administrators Tracking system malfunction Firewall failure Disabled device –Found in /var/log directory –System log viewer to see data

52 Understanding Operating Systems, Sixth Edition52 System Logs (cont'd.)

53 Understanding Operating Systems, Sixth Edition53 Keyboard Shortcuts Users easily switch from one task to another Keyboard shortcuts –Many identical to commonly used Windows operating systems’ shortcuts Ease operating system transition –Example: CTRL-V Quick way to issue PASTE command Linux, UNIX, and Windows

54 Understanding Operating Systems, Sixth Edition54 Summary Originally designed to gain more microcomputer chip power –Evolved into powerful, flexible operating system Runs supercomputers, cell phones, many devices Unparalleled popularity among programmers –Contribute standard code set enhancements Supports broad range of applications –Available for minimal cost and easy to install –Growing acceptance among non-programmers Large organizations –Commercial Linux products available


Download ppt "Understanding Operating Systems Sixth Edition Chapter 16 Linux Operating System."

Similar presentations


Ads by Google