Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3: Operating Systems

Similar presentations


Presentation on theme: "Chapter 3: Operating Systems"— Presentation transcript:

1 Chapter 3: Operating Systems
Computer Science: An Overview Twelfth Edition

2 Chapter 3: Operating Systems
The History of Operating Systems Operating System Architecture Coordinating the Machine’s Activities Handling Competition Among Processes Security

3 Functions of Operating Systems
Oversee operation of computer Store and retrieve files Schedule programs for execution Coordinate the execution of programs Resource management

4 Queue FIFO: First in First Out LIFO : Last in First Out

5 Evolution of Shared Computing
Batch processing Interactive processing Requires real-time processing Time-sharing/Multitasking Implemented by Multiprogramming Multiprocessor machines Load balancing

6 Medical devices, vehicle electronics, home appliances, cell phones, or other hand-held computers. The computer systems found in these devices are known as embedded systems.

7 Batch processing

8 Interactive processing

9 Types of Software Application software System software
Performs specific tasks for users System software Provides infrastructure for application software Consists of operating system and utility software utility software consists of software units that extend (or perhaps customize) the capabilities of the operating system.

10 Software classification

11 Kernel The kernel is a computer program that is the core of a computer's operating system, with complete control over everything in the system. It is the first program loaded on start-up. It handles the rest of start-up as well as input/output requests from software, translating them into data-processing instructions for the central processing unit. It handles memory and peripherals like keyboards, monitors, printers, speakers.

12 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 (virtual memory) Scheduler and dispatcher

13 The user interface acts as an intermediary between users and the operating system kernel

14 File Manager Directory (or Folder): A user-created bundle of files and other directories (subdirectories) Directory Path: A sequence of directories within directories

15 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

16 Virtual memory Paging:
The memory manager may create the illusion of additional memory space by rotating programs and data back and forth between main memory and mass storage.

17 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

18 The booting process

19 Processes Process: The activity of executing a program
Process State: Current status of the activity Program counter General purpose registers Related portion of main memory

20 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.

21 Time-sharing between process A and B

22 Process State As a process executes, it changes state
new: The process is being created running: Instructions are being executed waiting: The process is waiting for some event to occur (such as an I/O completion or reception of a signal)‏ ready: The process is waiting to be assigned to a processor terminated: The process has finished execution

23 HERE….

24 Process Control Block (PCB)‏
Information associated with each process Process state Program counter CPU registers CPU scheduling information Memory-management information Accounting information I/O status information

25 Preemption, Interrupt Time slices to execute processes

26 Thread: a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system

27 Handling Competition for Resources
Semaphore: A “control flag” Critical Region: A group of instructions that should be executed by only one process at a time Mutual exclusion: Requirement for proper implementation of a critical region

28 Deadlock Processes block each other from continuing
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 One process may have access to the computer’s printer but be waiting for access to the computer’s CD player, while another process has access to the CD player but is waiting for the printer.

29 A deadlock resulting from competition for nonshareable railroad intersections

30 Killing a process Holding data for output at a later but more convenient time is called spooling. Like in a printer. a file manager may allocate file access according to the needs of the processes, allowing several processes to have read access but allowing only one to have write access.

31 777 permissions of Linux for file access
0 – no permission 1 – execute 2 – write 3 – write and execute 4 – read 5 – read and execute 6 – read and write 7 – read, write, and execute

32 Multi-Core Operating Systems
Traditional time-sharing/multitasking systems give the illusion of executing many processes at once by switching rapidly between time slices faster than a human can perceive. Modern systems continue to multitask in this way, but in addition, the latest multi-core CPUs are genuinely capable of running two, four, or many more processes simultaneously.

33 Security Attacks from outside Problems Insecure passwords
Sniffing software (recording your activities) Counter measures Auditing software (record and analyze)

34 Security (continued) Attacks from within Problem: Unruly processes
Counter measures: Control process activities via privileged modes and privileged instructions Accessing to the memory of other processes.

35 Trojan Horses a Trojan horse is a malicious program that is disguised as legitimate software. Like the gift horse left outside the gates of Troy by the Greeks, Trojan Horses appear to be useful or interesting to an unsuspecting user, but are actually harmful


Download ppt "Chapter 3: Operating Systems"

Similar presentations


Ads by Google