0% found this document useful (0 votes)
5 views

05-chapter05-Operating System

Connecting to Computer Science 2nd edition OS
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

05-chapter05-Operating System

Connecting to Computer Science 2nd edition OS
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 58

Objectives

• Learn what an operating system is

• Become familiar with the different types of operating


systems

• Identify the major functions of an operating system

• Understand how operating systems manage


processes
Connecting with Computer Science 2
Objectives (continued)

• Understand how operating systems manage resources

• Understand how operating systems provide security

• Learn how to perform basic operating system file


management functions in Windows, UNIX, and DOS

Connecting with Computer Science 3


Why You Need to Know About...
Operating Systems
• Operating System(OS): mediates all activity within
computer

• System knowledge improves efficiency

• Practical skills easily acquired

– Demonstrate basic folder and file functions

Connecting with Computer Science 4


What Is an Operating System?
• OS: software control center
– Resident in main memory (RAM)

– Interfaces user, applications, hardware with CPU


• Supervises and facilitates program execution

• Connects hardware to CPU with device drivers

• Common brands: Microsoft Windows, UNIX, Linux,


Mac OS
Connecting with Computer Science 5
Connecting with Computer Science 6
What Is an Operating System?
(continued)
• OS has (2) main program regions

– Kernel: system core loaded at boot time by BIOS

– Modules: components provide user/device interface

• Platform: OS fitted to a particular CPU

• Cross-Platform application: runs on multiple platforms

Connecting with Computer Science 7


Connecting with Computer Science 8
What Is an Operating System?
(continued)
• Table 5-1: OS development in historical context

Connecting with Computer Science 9


Connecting with Computer Science 10
Connecting with Computer Science 11
Types of Operating Systems
• OS classification schemes based on features and use

– Single-tasking; e.g., DOS and Windows 3.x

– Multi-tasking; e.g., Windows, Mac OS, UNIX

– Network Operating Systems NOS; e.g., NetWare,


UNIX, Windows 2000 Server, and Windows Server
2003

Connecting with Computer Science 12


Types of Operating Systems
(continued)
• OS design parameters tailored to customer base
– Microsoft Windows and Mac OS appeal to home and
small business users
• User-friendly interfaces and multimedia capabilities
– UNIX often the OS of choice in the server environment
• Stability, multitasking, security, multiprocessing
• Every multipurpose device with CPU must have an OS
– Desktops, clients, servers, PDAs, cell phones, appliances

Connecting with Computer Science 13


Functions of an
Operating System
• All operating systems perform four basic functions:

– Provide a user interface

– Manage processes

– Manage resources

– Provide security

Connecting with Computer Science 14


Provide A User Interface
• User interface: program provides system access
• Two interface types:
– Command line interface (console operating system)
• Text input entered at command prompt
• Output displayed as characters and numbers
– Graphical User Interface (GUI)
• Input devices: keyboard, mouse, touch screen, audio
• Command OS via menu selections in open window
Connecting with Computer Science 15
Connecting with Computer Science 16
Provide A User Interface
(continued)
• Example interfaces

– GUI: Microsoft Windows and Mac OS

– Command-line (console window)

• Standard UNIX (can be fitted with GUI)

• DOS (disk operating system): MS console OS

– Windows backwardly compatible with DOS

Connecting with Computer Science 17


Manage Processes
• The OS loads, starts, supervises, stops processes
– Process is a running program
– Processes may start (spawn) other processes to support
them
• In Windows, Task Manager shows running processes
– Accessed by pressing Ctrl+Alt+Del keys
– Not available for single-tasking DOS

Connecting with Computer Science 18


Connecting with Computer Science 19
Connecting with Computer Science 20
Manage Processes (continued)
• In UNIX/Linux, running process information also
available
– type ps-aux at console prompt for running processes

• CPUs only run one process at a time


– Von Neumann machine supports serial execution
– Only one instruction from one single program per
clock cycle

Connecting with Computer Science 21


Manage Processes (continued)
• Time slicing: OS time management method
– Allocate multiple processes to a single CPU
– Illusion of simultaneous execution
– Attributable to the different speeds of devices
– CPU executes billions of instructions per second
– Memory, keyboard, monitor, and network adapter slower
by many orders of magnitude
– CPU multitasks while waiting

Connecting with Computer Science 22


Manage Processes (continued)
• Efficiencies generated with cost of system complexity

– OS needs to distinguish between ready/waiting process

– OS needs to service asynchronous I/O device request

– Interrupt handling: routine re-allocates processes to


CPU

Connecting with Computer Science 23


Manage Resources
• OS is a resource manager
– Configure I/O devices within environment
• Plug and Play (PnP) automates process (from 1995)
• Relieve applications of direct I/O interface

– Recognize and eliminate deadlock


• Circular wait for resources freezes system
• OS must remedy or system will need rebooting
Connecting with Computer Science 24
Manage Memory
• The OS is a resource manager

– Monitor free space in memory

– Load programs and data into memory location

– Keep track of instruction trace

– Reallocate memory as processes come and go

Connecting with Computer Science 25


Provide Security
• The OS protects memory and other resources
• Unintended violation
– Application writes into address space of another process
– OS prevention: place boundaries around processes
• Intended violation (security issue)
– Unauthorized access of programs or devices undesirable
– OS prevention
• System administrators set up password protected accounts
• Group policies automatically assigns rights/privileges

Connecting with Computer Science 26


Using An Operating System
• OS concepts enable adaptation to individual design

• Practical knowledge also essential

– Starting and running programs

– Managing system resources

• Skills focus: basic file management in various operating


systems
Connecting with Computer Science 27
Managing Disk Files
• Basic OS file management features
– Dynamic file naming
– Folder or directory creation and modification
– Formal folder structure needed
• System is treelike
• Single root level and one or more branches
• Files viewed as leaves, or nodes on the tree structure
• Windows Explorer: manage files through graphical
interface
Connecting with Computer Science 28
Connecting with Computer Science 29
Managing Disk Files (continued)
• UNIX/DOS command prompt: access directory
through the console window
• UNIX/DOS: command-line switches (parameters/flags)
– Example DOS command: DIR C:\*.* /P
• Causes OS to list all files located at the root of the C drive
• /P switch modifies DIR command with screen pause
– In DOS enter HELP <command> to get more details
– In UNIX or Linux, enter man <command> for manual
Connecting with Computer Science 30
Connecting with Computer Science 31
Connecting with Computer Science 32
Managing Disk Files (continued)
• Present (8) file and folder operations in XP, DOS,
UNIX
• Partitioning disks: dividing surface into specific areas
– Windows/DOS: use FDISK to partition drives
– UNIX: use fdisk
• Formatting disks
– Arrange disk surface into addressable areas
– Set up basic directory tree structure
– Copy OS onto back-up boot disk
Connecting with Computer Science 33
Connecting with Computer Science 34
Connecting with Computer Science 35
Managing Disk Files (continued)
• Creating folders (subdirectories)

– Treelike file structure available after partitioning and


formatting

– Main level called the root

• Create one or more folders at root

• Each folder lies within root folder, or within another


folder level
Connecting with Computer Science 36
Connecting with Computer Science 37
Connecting with Computer Science 38
Managing Disk Files (continued)
– Folders in another folder are child folders or
subdirectories
– Container folders are parents
– Structure has unlimited depth (5–10 recommended)
– Each OS enables user to create directories (folders)
• Folders named according to specific rules
• UNIX is case sensitive, DOS and Windows are not

Connecting with Computer Science 39


Managing Disk Files (continued)
• Listing the Contents of Drives and Folders

– XP lists drive/folder contents via GUI (Windows


Explorer)

– DOS/UNIX pass same information with text-based


commands

Connecting with Computer Science 40


Connecting with Computer Science 41
Connecting with Computer Science 42
Managing Disk Files (continued)
• Renaming Folders and Files

– Every OS provides procedures for renaming

Connecting with Computer Science 43


Connecting with Computer Science 44
Managing Disk Files (continued)
• Deleting Folders and Files
– Every OS allows for files to be deleted

– XP also allows recovery (Recycle Bin)

– Wildcard: symbol used to select directories


• Asterisk (*) and question mark (?) are wildcards

• Example: *.exe signifies all .exe files

Connecting with Computer Science 45


Connecting with Computer Science 46
Connecting with Computer Science 47
Managing Disk Files (continued)
• Copying Files and Folders

– Files can be copied into folders or stored at root

– Possible after partitioning,formatting, file creation

Connecting with Computer Science 48


Connecting with Computer Science 49
Connecting with Computer Science 50
Connecting with Computer Science 51
Managing Disk Files
(continued)

• Moving Files and Folders

– Similar to copying files

– Copy command followed by delete command

Connecting with Computer Science 52


Connecting with Computer Science 53
Connecting with Computer Science 54
One Last Thought
• OS knowledge essential for computer scientists

• OS concepts taught alongside practical skills

• Expand OS toolkit beyond basic file management

• Advanced study recommended

Connecting with Computer Science 55


Summary
• OS is the software control center of the computer

• OS consists of a kernel and other system programs

• OS loaded into RAM by program in BIOS chip

• OS may be single tasking or multitasking

• Time slicing: OS method for multitasking

Connecting with Computer Science 56


Summary (continued)
• Basic OS tasks: provide user interface, manage
processes, manage resources, provide security
• Two OS interfaces: GUI and console window
• OS supervises program in execution (process)
• OS interfaces hardware elements through drivers
• OS protects system from intended/unintended
violations

Connecting with Computer Science 57


Summary (continued)
• OS file management:

• Partitioning/Formatting disks

• Creating folders (subdirectories)

• Listing/Renaming folders and files

• Deleting/Copying/Moving folders and files

Connecting with Computer Science 58

You might also like