SlideShare a Scribd company logo
Understanding Operating Systems Fifth Edition Chapter 16 Linux Operating System
Learning Objectives The design goals for the Linux operating system The significance of 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 Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
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  Understanding Operating Systems, Fifth Edition
History (continued) 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 Understanding Operating Systems, Fifth Edition
Understanding Operating Systems, Fifth Edition
History (continued) Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Design Goals (continued) Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Memory Management (continued) 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 Understanding Operating Systems, Fifth Edition
Memory Management (continued) Virtual memory managed using multiple-level table hierarchy Four fields in virtual address  Understanding Operating Systems, Fifth Edition
Memory Management (continued) Understanding Operating Systems, Fifth Edition
Memory Management (continued) 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” Understanding Operating Systems, Fifth Edition
Memory Management (continued) Understanding Operating Systems, Fifth Edition
Processor Management Uses same parent-child process management design found in UNIX  “ Personality” concept Allow processes from other operating systems to be executed Understanding Operating Systems, Fifth Edition
Organization of Table of Processes 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 Understanding Operating Systems, Fifth Edition
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  Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Process Management (continued) Understanding Operating Systems, Fifth Edition
Process Management (continued) 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 Understanding Operating Systems, Fifth Edition
Process Management (continued) 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 Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Device Management (continued) Understanding Operating Systems, Fifth Edition
Device Management (continued) Device drivers Comprehensive collection in Linux Required driver not available Obtain from another source Install separately Manually write the driver Requires skilled programmer Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Device Drivers (continued) Notable feature Accept new device drivers on the fly System up and running No reboot necessary Understanding Operating Systems, Fifth Edition
Device Classes Three standard classes  Understanding Operating Systems, Fifth Edition
Device Classes (continued) 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 Understanding Operating Systems, Fifth Edition
Device Classes (continued) 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) Understanding Operating Systems, Fifth Edition
Device Classes (continued) 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 Understanding Operating Systems, Fifth Edition
Device Classes (continued) Open and release Allocate and deallocate the appropriate device Open operation example Verify device available and working Increase device usage counter by one (subsystem knows module cannot be unloaded until file appropriately closed) Initialize device so old data is removed and device ready to accept new data Identify minor number and update appropriate pointer (if necessary) Allocate appropriate data structure Understanding Operating Systems, Fifth Edition
Device Classes (continued) Open and release (continued) Release operation example Deallocate resources allocated with open function Shut down device Reduce usage counter by one (device released to another module) Understanding Operating Systems, Fifth Edition
File Management Data structures Filename conventions Directory listings Understanding Operating Systems, Fifth Edition
Data Structures Files organized in directories Connected in treelike structure Five file types Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Filename Conventions (continued) Understanding Operating Systems, Fifth Edition
Filename Conventions (continued) 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 Understanding Operating Systems, Fifth Edition
Filename Conventions (continued) 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 Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Directory Listings (continued) Understanding Operating Systems, Fifth Edition
Directory Listings (continued) Understanding Operating Systems, Fifth Edition
Directory Listings (continued) 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 Understanding Operating Systems, Fifth Edition
Directory Listings (continued) 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) Understanding Operating Systems, Fifth Edition
Directory Listings (continued) 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 Understanding Operating Systems, Fifth Edition
Directory Listings (continued) Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Command-Driven Interfaces (continued) Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
System Monitor System Monitor window  System well-being information Immediate history CPU, memory, network usage Other information Supported file systems  Currently running processes information Understanding Operating Systems, Fifth Edition
System Monitor (continued) Understanding Operating Systems, Fifth Edition
Service Settings Variety of services help manage system Linux distribution dependent  (see documentation) Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
System Logs (continued) Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition
Keyboard Shortcuts (continued) Understanding Operating Systems, Fifth Edition
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 Understanding Operating Systems, Fifth Edition

More Related Content

PPT
Understanding operating systems 5th ed ch02
PPT
Understanding operating systems 5th ed ch03
PPT
Understanding operating systems 5th ed ch06
PPT
Understanding operating systems 5th ed ch04
PPT
Understanding operating systems 5th ed ch08
PPT
Understanding operating systems 5th ed ch07
PPT
Understanding operating systems 5th ed ch13
PPT
Understanding operating systems 5th ed ch01
Understanding operating systems 5th ed ch02
Understanding operating systems 5th ed ch03
Understanding operating systems 5th ed ch06
Understanding operating systems 5th ed ch04
Understanding operating systems 5th ed ch08
Understanding operating systems 5th ed ch07
Understanding operating systems 5th ed ch13
Understanding operating systems 5th ed ch01

What's hot (19)

PPT
Understanding operating systems 5th ed ch05
PPT
Understanding operating systems 5th ed ch12
PPT
Understanding operating systems 5th ed ch15
PPT
Understanding operating systems 5th ed ch09
PPT
Understanding operating systems 5th ed ch14
PPT
Understanding operating systems 5th ed ch11
PPT
Understanding operating systems 5th ed ch10
PPT
PPT
Memory management early_systems
PPTX
Windows xp
PPTX
Operating system 11 system calls
PPT
Ch01 introducing operating systems
PPT
Structure of operating system
PPT
PDF
M.c.a. (sem ii) operating systems
PPTX
System calls
PPTX
services and system calls of operating system
PDF
Operating system concepts (notes)
Understanding operating systems 5th ed ch05
Understanding operating systems 5th ed ch12
Understanding operating systems 5th ed ch15
Understanding operating systems 5th ed ch09
Understanding operating systems 5th ed ch14
Understanding operating systems 5th ed ch11
Understanding operating systems 5th ed ch10
Memory management early_systems
Windows xp
Operating system 11 system calls
Ch01 introducing operating systems
Structure of operating system
M.c.a. (sem ii) operating systems
System calls
services and system calls of operating system
Operating system concepts (notes)
Ad

Similar to Understanding operating systems 5th ed ch16 (20)

PPTX
Understanding Operating Systems Chapter 1 Introducing Operating Systems
PPT
An Introduction to Operating Systems
PDF
Introduction to System Programming
PPT
Os concepts
PPT
Chapter 7A Peter Norton
PPT
operating systems and File Management.ppt
ODP
Operating Systems
PPTX
9781285096551_PPT_ch01.pptx
PPTX
11. operating-systems-part-1
PDF
Intro to operating_system
PDF
OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...
PPT
Chapter 1 Operating Systems Fundamentals
PDF
Introducing Operating System. Understanding Operating Systems
PDF
osunit1ppt-23011904470yuoij4-685c22ef.pdf
PPTX
OS UNIT 1 PPT.pptx
PPTX
introduction to operating systems and services.pptx
PPTX
Introduction to OS.pptx
PDF
lecture1 details of operating system abraham silberchatz
PDF
Operating system concepts
PPTX
Operating system by aman kr kushwaha
Understanding Operating Systems Chapter 1 Introducing Operating Systems
An Introduction to Operating Systems
Introduction to System Programming
Os concepts
Chapter 7A Peter Norton
operating systems and File Management.ppt
Operating Systems
9781285096551_PPT_ch01.pptx
11. operating-systems-part-1
Intro to operating_system
OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...
Chapter 1 Operating Systems Fundamentals
Introducing Operating System. Understanding Operating Systems
osunit1ppt-23011904470yuoij4-685c22ef.pdf
OS UNIT 1 PPT.pptx
introduction to operating systems and services.pptx
Introduction to OS.pptx
lecture1 details of operating system abraham silberchatz
Operating system concepts
Operating system by aman kr kushwaha
Ad

Recently uploaded (20)

PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Lesson notes of climatology university.
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Cell Types and Its function , kingdom of life
PPTX
Cell Structure & Organelles in detailed.
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Complications of Minimal Access Surgery at WLH
PPTX
master seminar digital applications in india
Module 4: Burden of Disease Tutorial Slides S2 2025
102 student loan defaulters named and shamed – Is someone you know on the list?
Renaissance Architecture: A Journey from Faith to Humanism
STATICS OF THE RIGID BODIES Hibbelers.pdf
Lesson notes of climatology university.
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Sports Quiz easy sports quiz sports quiz
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pharma ospi slides which help in ospi learning
Cell Types and Its function , kingdom of life
Cell Structure & Organelles in detailed.
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Microbial disease of the cardiovascular and lymphatic systems
human mycosis Human fungal infections are called human mycosis..pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Basic Mud Logging Guide for educational purpose
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Complications of Minimal Access Surgery at WLH
master seminar digital applications in india

Understanding operating systems 5th ed ch16

  • 1. Understanding Operating Systems Fifth Edition Chapter 16 Linux Operating System
  • 2. Learning Objectives The design goals for the Linux operating system The significance of 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 Understanding Operating Systems, Fifth Edition
  • 3. 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 Understanding Operating Systems, Fifth Edition
  • 4. 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 Understanding Operating Systems, Fifth Edition
  • 5. History (continued) 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 Understanding Operating Systems, Fifth Edition
  • 7. History (continued) Understanding Operating Systems, Fifth Edition
  • 8. 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 Understanding Operating Systems, Fifth Edition
  • 9. Design Goals (continued) Understanding Operating Systems, Fifth Edition
  • 10. 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 Understanding Operating Systems, Fifth Edition
  • 11. Memory Management (continued) 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 Understanding Operating Systems, Fifth Edition
  • 12. Memory Management (continued) Virtual memory managed using multiple-level table hierarchy Four fields in virtual address Understanding Operating Systems, Fifth Edition
  • 13. Memory Management (continued) Understanding Operating Systems, Fifth Edition
  • 14. Memory Management (continued) 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” Understanding Operating Systems, Fifth Edition
  • 15. Memory Management (continued) Understanding Operating Systems, Fifth Edition
  • 16. Processor Management Uses same parent-child process management design found in UNIX “ Personality” concept Allow processes from other operating systems to be executed Understanding Operating Systems, Fifth Edition
  • 17. Organization of Table of Processes 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 Understanding Operating Systems, Fifth Edition
  • 18. 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 Understanding Operating Systems, Fifth Edition
  • 19. 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 Understanding Operating Systems, Fifth Edition
  • 20. Process Management (continued) Understanding Operating Systems, Fifth Edition
  • 21. Process Management (continued) 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 Understanding Operating Systems, Fifth Edition
  • 22. Process Management (continued) 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 Understanding Operating Systems, Fifth Edition
  • 23. 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 Understanding Operating Systems, Fifth Edition
  • 24. Device Management (continued) Understanding Operating Systems, Fifth Edition
  • 25. Device Management (continued) Device drivers Comprehensive collection in Linux Required driver not available Obtain from another source Install separately Manually write the driver Requires skilled programmer Understanding Operating Systems, Fifth Edition
  • 26. 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 Understanding Operating Systems, Fifth Edition
  • 27. 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 Understanding Operating Systems, Fifth Edition
  • 28. Device Drivers (continued) Notable feature Accept new device drivers on the fly System up and running No reboot necessary Understanding Operating Systems, Fifth Edition
  • 29. Device Classes Three standard classes Understanding Operating Systems, Fifth Edition
  • 30. Device Classes (continued) 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 Understanding Operating Systems, Fifth Edition
  • 31. Device Classes (continued) 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) Understanding Operating Systems, Fifth Edition
  • 32. Device Classes (continued) 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 Understanding Operating Systems, Fifth Edition
  • 33. Device Classes (continued) Open and release Allocate and deallocate the appropriate device Open operation example Verify device available and working Increase device usage counter by one (subsystem knows module cannot be unloaded until file appropriately closed) Initialize device so old data is removed and device ready to accept new data Identify minor number and update appropriate pointer (if necessary) Allocate appropriate data structure Understanding Operating Systems, Fifth Edition
  • 34. Device Classes (continued) Open and release (continued) Release operation example Deallocate resources allocated with open function Shut down device Reduce usage counter by one (device released to another module) Understanding Operating Systems, Fifth Edition
  • 35. File Management Data structures Filename conventions Directory listings Understanding Operating Systems, Fifth Edition
  • 36. Data Structures Files organized in directories Connected in treelike structure Five file types Understanding Operating Systems, Fifth Edition
  • 37. 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 Understanding Operating Systems, Fifth Edition
  • 38. Filename Conventions (continued) Understanding Operating Systems, Fifth Edition
  • 39. Filename Conventions (continued) 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 Understanding Operating Systems, Fifth Edition
  • 40. Filename Conventions (continued) 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 Understanding Operating Systems, Fifth Edition
  • 41. 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 Understanding Operating Systems, Fifth Edition
  • 42. Directory Listings (continued) Understanding Operating Systems, Fifth Edition
  • 43. Directory Listings (continued) Understanding Operating Systems, Fifth Edition
  • 44. Directory Listings (continued) 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 Understanding Operating Systems, Fifth Edition
  • 45. Directory Listings (continued) 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) Understanding Operating Systems, Fifth Edition
  • 46. Directory Listings (continued) 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 Understanding Operating Systems, Fifth Edition
  • 47. Directory Listings (continued) Understanding Operating Systems, Fifth Edition
  • 48. 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 Understanding Operating Systems, Fifth Edition
  • 49. 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 Understanding Operating Systems, Fifth Edition
  • 50. Command-Driven Interfaces (continued) Understanding Operating Systems, Fifth Edition
  • 51. 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 Understanding Operating Systems, Fifth Edition
  • 52. System Monitor System Monitor window System well-being information Immediate history CPU, memory, network usage Other information Supported file systems Currently running processes information Understanding Operating Systems, Fifth Edition
  • 53. System Monitor (continued) Understanding Operating Systems, Fifth Edition
  • 54. Service Settings Variety of services help manage system Linux distribution dependent (see documentation) Understanding Operating Systems, Fifth Edition
  • 55. 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 Understanding Operating Systems, Fifth Edition
  • 56. System Logs (continued) Understanding Operating Systems, Fifth Edition
  • 57. 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 Understanding Operating Systems, Fifth Edition
  • 58. Keyboard Shortcuts (continued) Understanding Operating Systems, Fifth Edition
  • 59. 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 Understanding Operating Systems, Fifth Edition