Document Details

GracefulNoseFlute

Uploaded by GracefulNoseFlute

Faculty of Computer and Information

2009

J. Glenn Brookshear Dennis Brylow

Tags

operating systems computer science software structure computer architecture

Summary

This document is a chapter from a computer science textbook covering operating systems. It discusses various aspects of operating systems, including its history, architecture, and functions. It also covers different types of operating systems and components, such as the kernel and user interface.

Full Transcript

1 Computer Science An Overview 13th Edition Chapter 3 Operating System Operating Systems Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved ...

1 Computer Science An Overview 13th Edition Chapter 3 Operating System Operating Systems Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 2 Chapter 3: Operating Systems 3.1 The History of Operating Systems 3.2 Operating System Architecture 3.3 Coordinating the Machine’s Activities 3.4 Handling Competition Among Processes 3.5 Security Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 3 Examples of Operating Systems Windows UNIX Mac OS Solaris (Sun/Oracle machines) Linux Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 4 Smartphone Operating Systems Apple iOS Windows Phone BlackBerry OS Nokia Symbian OS Google Android Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 5 Functions of Operating Systems Oversee operation of computer Store and retrieve files Provide the user interface to request execution of programs Coordinate the execution of programs Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 6 Functions of Operating Systems Process Management: Manages the execution of processes (running programs). Memory Management: Allocates and tracks memory for processes. File System Management: Manages files, directories, and storage devices. Device Management: Controls hardware peripherals like printers, disks, and input devices. User Interface: Provides interaction with users via command line or graphical interface. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 7 3.1 History of Operating Systems Each program is called a “job” Early computers required significant setup time Each “job” required its own setup Operating Systems began as systems for simplifying setup and transitions between jobs Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 8 3.1 History of Operating Systems Batch processing (job queue) Interactive processing (real time) Time-sharing (one machine, many users) Multitasking (one user, many tasks) Multiprocessor machines (load balancing) Embedded Systems (specific devices) Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 9 Figure 3.1 Batch processing Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 10 Figure 3.2 Interactive processing Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 11 3.2 Operating System Architecture Application software – Performs specific tasks for users (productivity, games, software development) System software – Provides infrastructure for application software – Consists of operating system and utility software Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 12 Figure 3.3 Software classification Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 13 Operating System Components User Interface: Communicates with users – Text based (Shell) – Graphical user interface (GUI) Kernel: Performs basic required functions – File manager – Device drivers – Memory manager – Scheduler and dispatcher Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 14 Figure 3.4 The user interface acts as an intermediary between users and the operating system’s kernel Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 15 File Manager Directory (or Folder): A user-created bundle of files and other directories (subdirectories) Directory Path: A sequence of directories within directories Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 16 File Manager File System: A method for storing and organizing files on a storage device (e.g., HDD, SSD). File Allocation: OS decides where files will be stored (on disk). File Access: Determines how files are read or written (sequential, direct). Examples: – Windows: Uses NTFS (New Technology File System) to manage files, providing features like file permissions and journaling. – Linux: Uses ext4 (Fourth Extended File System), a widely used file system that also supports journaling and large file sizes. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 17 Memory Manager Allocates space in main memory May create the illusion that the machine has more memory than it actually does (virtual memory) by playing a “shell game” in which blocks of data (pages) are shifted back and forth between main memory and mass storage Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 18 Virtual Memory Definition: Virtual memory allows the system to use disk space as an extension of RAM. Swapping: OS moves data between RAM and disk storage to maintain a large address space. Page Fault: When data needed by a process is not in RAM, it causes a page fault, and the OS loads it from disk. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 19 Memory and File Management in Practice Memory Management: –Windows: Task Manager allows monitoring of processes and memory usage. –Linux: htop and free commands show detailed memory and process information. File Management: –Windows: File Explorer provides a GUI to manage files, allowing file operations like copy, move, delete, and more. –Linux: Terminal commands like ls, cp, mv, rm are used to manage files and directories. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 20 Getting it Started (Bootstrapping) Boot loader: Program in ROM (example of firmware) – Run by the CPU when power is turned on – Transfers operating system from mass storage to main memory – Executes jump to operating system Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 21 Figure 3.5 The booting process Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 22 Device Management Devices: Physical hardware like printers, disks, monitors, etc. Device Drivers: Software components that allow the OS to communicate with hardware. I/O Management: The OS coordinates data input and output between devices and the CPU. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 23 3.3 Coordinating the Machine’s Activities An operating system coordinates the execution of application software, utility software, and units within the operating system itself. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 24 The Concept of a Process Process: The activity of executing a program Process State: Current status of the activity – Program counter – General purpose registers – Related portion of main memory Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 25 Process Administration Scheduler: Adds new processes to the process table and removes completed processes from the process table Dispatcher: Controls the allocation of time slices to the processes in the process table – The end of a time slice is signaled by an interrupt. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 26 Figure 3.6 Multiprogramming between process A and process B Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 27 3.4 Handling Competition Among Processes Semaphore: A “control flag” Critical Region: A group of instructions that should be executed by only one process at a time Mutual exclusion: Requirement that only one process at a time be allowed to execute a Critical Region Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 28 Deadlock Processes block each other from continuing because each is waiting for a resource that is allocated to another Conditions required for deadlock –1. Competition for non-sharable resources –2. Resources requested on a partial basis –3. An allocated resource can not be forcibly retrieved Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 29 Figure 3.7 A deadlock resulting from competition for nonshareable railroad intersections Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 30 3.5 Security Attacks from outside – Problems ▪ Insecure passwords ▪ Sniffing software – Counter measures ▪ Auditing software Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 31 Security (continued) Attacks from within – Problem: A process that gains access to memory outside its designated area – Counter measures: Control process activities via privilege levels and privileged instructions Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 32 OS Updates and Maintenance Patch Management: Applying updates to fix bugs or security vulnerabilities. System Monitoring: Tools to track OS performance (e.g., Task Manager in Windows, top command in Linux). Backup and Restore: Ensuring data protection by creating system backups. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 33 Summary Key Functions: OS provides essential services like process, memory, file, and device management. Examples: Linux (open-source), Windows (commercial), macOS (Apple). Learning OS Concepts: Understanding how the OS interacts with hardware and software is crucial for both developers and users. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved 34 Copyright This work is protected by United States copyright laws and is provided solely for the use of instructions in teaching their courses and assessing student learning. dissemination or sale of any part of this work (including on the World Wide Web) will destroy the integrity of the work and is not permit- ted. The work and materials from it should never be made available to students except by instructors using the accompanying text in their classes. All recipients of this work are expected to abide by these restrictions and to honor the intended pedagogical purposes and the needs of other instructors who rely on these materials. Copyright © 2015, 2012, 2009 Pearson Education, Inc. All Rights Reserved

Use Quizgecko on...
Browser
Browser