New 04-Program Execution and Operating Systems
New 04-Program Execution and Operating Systems
New 04-Program Execution and Operating Systems
Operating Systems
Lecture 4
Objectives
❑ Describe the fetch-decode-execute phases of a cycle in a
typical computer.
❑ Understand the role of the operating system in a
computer system
❑ List the components of an operating system
• A computer executes the program to create output data from input data.
• Decode
• Execute
1.5
Program Execution
1.6
Program Execution
Fetch
In the fetch phase, the control unit orders the system to copy the next instruction
in to the instruction register in the CPU
The address of the instruction to be copied is held in the program counter register
After copying, the program counter is incremented to refer to the next instruction.
Decode
When the instruction is in the instruction register, it is decoded by the control unit.
The result of this decode step is the binary code for some operation that the
system will perform
Program Execution
Execute
After the instruction is decoded, the control unit sends the task order to a
component in the CPU.
For example, the control unit can tell the system to load (read) a data item from
the memory, or the CPU can tell the ALU to add the contents of two input registers
and put the result in the output register.
Operating Systems
Operating Systems
A computer system
1.10
Operating Systems
Editing photographs
Scheduling appointments
Designing homes
Playing games
12
Operating Systems
Operating Systems
An operating system is an interface between the hardware of a computer and
the user (programs or humans).
Components of an operating
system
1.15
Operating Systems
Operating Systems
Multi-programming
Mono-programming
1.16
Operating Systems
Operating Systems
Monoprogramming belongs to the past, but it is worth mentioning
because it helps us to understand multiprogramming.
In monoprogramming, most of the memory capacity is dedicated to a
single program; only a small part is needed to hold the operating
system.
When the program finishes running, the program area is occupied by
another program.
Multiprogramming, more than one program is in memory at the same
time, and they are executed concurrently, with the CPU switching
rapidly between the programs.
Operating Systems
Operating Systems for Personal Computers and Servers
DOS: Disk Operating System
PC-DOS: Created originally for IBM microcomputers
MS-DOS: used with IBM-compatible computers
DOS traditionally used a command-line interface
Can enter DOS commands in Windows
18
Operating Systems
Operating Systems for Personal Computers and Servers
Windows: The predominate personal operating system developed by Microsoft
Corporation
Windows 1.0, Windows 3.x, Windows 95, Windows 98, Windows NT, Windows Me,
Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10.
Each release added new or improved functionalities to previous ones (networking,
graphics, interface, …)
19
Operating Systems
Operating Systems for Personal Computers and Servers
Mac OS: Proprietary operating system for computers made by Apple
Corporation
Based on the UNIX operating system; originally set the standard for
graphical user interfaces
Includes:
Safari Web browser
New features like Time Machine (For Backup and restore ), Stacks(for file
management), Quick Look (image viewer), Boot Camp, etc.
More responsive than previous versions
20
Operating Systems
Operating Systems for Personal Computers and Servers
UNIX: Operating system developed in the late 1960s for midrange servers
Multiuser, multitasking operating system
More expensive, requires a higher level of technical knowledge; tends to be
harder to install, maintain, and upgrade
“UNIX” initially referred to the original UNIX operating system, now refers to a
group of similar operating systems based on UNIX
21
Operating Systems
Operating Systems for Personal Computers and Servers
Linux: Version (flavor) of UNIX available without charge over the Internet
Increasingly being used with personal computers, servers, mainframes, and
supercomputers
Is open-source software: has been collaboratively modified by volunteer
programmers all over the world
Originally used a command line interface, most recent versions use a GUI
Strong support from mainstream companies, such as Sun, IBM, HP, and Novell
Much less expensive than Windows or Mac OS
22
Operating Systems
Operating Systems for Mobile Phones and Other Devices
Windows Mobile: Designed for mobile phones
Look and feel of desktop versions
Current version Windows X mobile.
Windows Embedded: Designed for consumer and industrial devices that are not
personal computers
Cash register, GPS devices, ATMs, medical devices and robots.
Windows Automotive and Microsoft Auto for cars
Ford Sync
Android: Linux based OS developed by Open Handset Alliance (including Google)
23
Operating Systems
Operating Systems for Mobile Phones and Other Devices
iPhone OS: Designed for Apple Mobile phones and mobile devices.
Embedded Linux: Used with mobile phones, GPS devices, and other mobile
devices
24
Operating Systems
Operating Systems for Mobile Phones and Other Devices
25
Operating Systems
Utility Programs
Search tools: Designed to search for files on the user’s hard drive
Windows includes search tools
Google, Yahoo desktop search
Diagnostic programs: Evaluate your system and make recommendations for
fixing any errors found
Disk management programs: Diagnose and repair problems related to your hard
drive
Uninstall utilities: Remove programs from your hard drive without leaving bits
and pieces behind
Important to properly uninstall programs, not just delete them
26
Operating Systems
Utility Programs
27
Operating Systems
Utility Programs
Backup and recovery utilities: Make the backup and restoration process
easier
Backup: Duplicate copy of data or other computer content
Good backup procedures are critical for businesses
Individuals should back up important documents,
e-mail, photos, home video, etc.
Store backup data on a CD or DVD, second hard drive, flash memory drive, or
upload to the Internet
Back up your entire computer once all programs have been installed, so
your system can be restored to that configuration.
28
Operating Systems
Utility Programs
Backup Utilities
29
Putting it all together
“The Big Picture”
Hardware Software
System Application
CPU Memory I/O
Software Software
Operating
ALU Storage Utilities
system
Control Unit
Windows
(F-D-E-S)
Unix
Linux
Summary and Discussion