The Operating System - Personal web pages for people of Metropolia

Download Report

Transcript The Operating System - Personal web pages for people of Metropolia

Software
Operating systems
Computers: Information Technology in Perspective
By Long and Long
Copyright 2002 Prentice Hall, Inc. J. Holvikivi 2013
Software Categories
Quit
System
Software
Application
Software
The Operating System
Quit
Visual
Studio
Operating
Systems
Network
connections
GUI
C++
Office
Inventory
CAD
Operating
System
Word
processing
Investment
System
Browsers
Computer
Games
Algorithms – basis of software
2.4
Quit
A
sequence of steps that directs the
execution of a task



A sheet of music
operating instructions for a washing machine
instructions for constructing model airplanes
 Algorithms



in computers
programs
the intelligence required to solve a problem or
to perform a task is encoded in the algorithm
to follow the directions of an algorithm is
"merely mechanical"
The Operating System
Quit
2.5





Coordinates all software activity within a
computer system: The master control program
that runs the computer.
The first program loaded when the computer is
turned on, its main part, the "kernel," resides
in memory at all times.
The operating system sets the standards for all
application programs that run in the computer.
The applications "talk to" the operating system
for all user interface and file management
operations.
Our interaction with the OS is through the
graphical user interface
Examples: DOS, Windows, Unix, Linux, Mac
OS, IBM mainframe OS/390 and the AS/400's
OS/400, iOS, Android
Unix
2.6
Quit
Bell laboratories, 1970s, universities
 Many versions (AIX, HP-Unix, Linux,
Solaris)



User interface: character based or GUI XWindow
Coded in C- language
Hierarchical file system
root
usr
bin dev - lpt
tmp
Directory structures: Windows and Linux
2.7
Quit
 D:\Documents
 Eiko




index.html
logo.gif
page2.html
Images



 Users/e/eiko

Public_html

index.html
logo.gif
page2.html
Images

Photo1.jpg
 Photo2.jpg
Friends



Photo1.jpg
Photo2.jpg

Friends

Myfriend.html

Myfriend.html
<img src="..\images\photo2.jpg">
<img src="../Images/Photo2.jpg">
Creating and sending
home pages
Server disk
Linux OS
shell.metropolia.fi
Local disk
Windows OS
C:\Documents
Home directory of user x
• public_html
index.html
picture1.jpg
logo2.gif
page2.html
index.html
FTP, SCP
picture1.jpg
logo2.gif
page2.html
•Other data
Workstation
Local use: editing
Remote use through internet:
visiting Web pages
Linux commands
2.9
Quit




ls -f
list all files including files starting with
a dot (.login .forward etc)
ls -l (or ll) list all files, types and access rights
ls *.txt
list files with extension txt
ls m*.*
list files starting with m
passwd change password
cd <dname> change to directory
Linux commands
Quit
2.10









rm <filename>
remove file
mkdir <dirname>
create/ make directory
rmdir <dirname>
remove/ delete directory
mv <name1> <name2> move or rename file
pwd (print working directory) show current dir
ps
list active processes
kill <name>
terminate process
fg
move to foreground process
exit
Linux access rights
2.11
Quit
 chmod
change access rights (+
more, - less)
 Groups: user, group, others, all;
 Rights: none, read, execute, write
 set access rights in Linux (Putty,
WinSCP), not through Windows file
management
Operating System Objectives
Quit
 Coordinates
all software activity within a
computer system: The master control
program that runs the computer.
 The first program loaded when the
computer is turned on, its main part, the
"kernel," resides in memory at all times.
 The operating system sets the standards
for all application programs that run in the
computer. The applications "talk to" the
operating system for all user interface
and file management operations.
Starting of an operating system
2.13
Quit
 The
start signal: all controllers, starting
registers and program counters are set in
start-state, initialized
 The program counter reads the predetermined address from memory (ROM
program, bootstrap) before starting its
first machine cycle
 The boot program knows where
operating system is located on disk:


- OS is loaded into memory (RAM)
- jump into beginning of operating system
Memory: RAM
Hard disk
Device drivers
Windows OS
MS Word
Load to memory
MsWord
Text file
Device drivers
and others
Text file
OS kernel
Data files
Save
Processor
Operating System Objectives
Quit
 Facilitate



communication:
user – computer
computer system components
computer - network
 Maximize
throughput
 Minimize processing time
 Optimize computer resources
 Organize files
 Provide security
 Monitor system/alert user
Operating System Functions
Quit
 1)
Control data (incl. programs) and its
access.
Each such item resides in the computer
system as a collection of records called
a file. OS takes care of manipulation of files
and keeps track on storage of files.
Execution of programs.
 2) Provide for efficient device access.
Includes routines needed to use the
peripheral devices attached to the machine.
To facilitate communication among computer
system components, and to maximize
throughput.
Operating System Functions
Quit
 3)
Manage resources and optimize
their use: memory area, peripheral devices,
programs.
 4) Control access to the machine (access
codes, passwords),
and to provide an envelope of security for
the computer system.
 5) Standardization of the human/ machine
interface (same OS, many machines).
Operating System Features
2.18
Quit
Multitasking
Kernel
Background
Foreground
Operating System Interfaces
2.19
Quit
Text-Based, Command-Driven Software
MS-DOS Syntax
Unix, Linux
Graphics-Based Software
Macintosh
Windows 9x/NT/2003/XP, 7, 8
Graphical User Interface (GUI), Icons
Operating system architecture
2.20
Quit
 Command

processor
monitors input devices (keyboard, mouse)
and interprets commands
 Scheduler

arranges for the execution of the program
 File


manager
management of bulk storage
users' access rights
 Resource
allocator
 Dispatcher

coordination of time-sharing, switching of jobs
Modes of processing
2.21
Quit
 Batch


processing
execution of jobs which are collected together
with their data in a single batch without
interaction with the user
job queue: jobs waiting before being
executed. FIFO (first-in-first-out) and priorities
 Interactive

processing
dialogue with the user, immediate response
 Real-time
processing: response to the
environment
 Multitasking systems

time-sharing
Time-sharing
2.22
Quit
programs waiting in memory
 dispatcher executes a jump to next
program's location (reload registers) &
starts timer circuit


- time slice for program execution 10 to 100
milliseconds
creates a virtual machine for each
process
 slower than real machine
 priorities: longer time slices or more time
slices
 time-sharing within batch processing (mix
of jobs, more even load on resources)

Platforms
2.23
Quit
Platform is defined by
the Processor and Operating System
 90%
use Wintel (Windows & Intel) on PC
 Mac OS
 IBM mainframe OS/390
 IBM AS/400's OS/400
 Unix, Solaris, Linux, Ubuntu
 Mobile platforms:
iOS, Android, WP8, Meego
Platform Problems
2.24
Quit
Long-term
commitment
Interoperability
Cross-platform
technologies
Multiplatform
environment