New 04-Program Execution and Operating Systems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Program Execution and

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

❑ List the common operating systems for personal


computers and servers.
❑ List the common operating systems for mobile phones

❑ Revisit the layers of a computing system 1.2


 Please refer to your text book
 Chapter 5 Computer Organization
 Chapter 7 Operating Systems
Program Execution
Program Execution
• Today, general-purpose computers use a set of instructions called a
program to process data.

• A computer executes the program to create output data from input data.

• Both the program and the data are stored in memory.

• The CPU uses repeating machine cycles to execute instructions in the


program, one by one, from beginning to end.

• A simplified cycle can consist of thee phases:


• Fetch

• Decode

• Execute
1.5
Program Execution

The steps of a cycle

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

 A computer is a system composed of two major components:


 Hardware: is the physical equipment.
 Software: is the collection of programs that allows the hardware to do its
job. Computer software is divided into two broad categories.
 System Software is the operating system and utility programs that
control a computer system and allow you to use your computer. The
operating system controls the access to hardware by users. It enables
the boot process, launches applications, transfers files, controls
hardware configuration, manages hard drive, and protects from
unauthorized use
 Application Software are programs that use the computer hardware to
solve users’ problems. Programs that allow a user to perform specific
tasks on a computer such as word processing, playing a game,
preparing taxes, browsing the Web, and so forth
1.11
Operating Systems

 Application software: Performs specific tasks or applications

 Creating letters, budgets, etc.

 Managing inventory and customer databases

 Editing photographs

 Scheduling appointments

 Viewing Web pages

 Sending and receiving e-mail

 Recording / playing CDs/DVDs

 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).

 An operating system is a program (or a set of programs) that facilitates the


execution of other programs.

 An operating system acts as a general manager supervising the activity of


each component in the computer system. As a general manager, the operating
system checks the hardware and software resources are used efficiently, and
when there is a conflict in using a resource, the operating system mediates to
solve it.
Operating Systems
Operating Systems
 To sum up an operating system is an interface between the hardware of a
computer and the user (programs or human) that facilitates the execution of
other programs and the access to hardware and software resources.
Operating Systems
Operating Systems

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.

 BlackBerry Operating System: Designed for BlackBerry devices

 Palm OS and Palm WebOS: Designed for Palm devices

 Symbian OS: Designed for use with smart phones(ex. NOKIA)

 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

 Clean up utilities: Delete temporary files


 File compression programs: Reduce the size of files so they take up less storage space on a
storage medium or can be transmitted faster over the Internet
 Both zip and unzip files
 WinZip (Windows users) and Stuffit (Mac users)

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”

Layers of a computing system


31
Computer
System

Hardware Software

System Application
CPU Memory I/O
Software Software

Operating
ALU Storage Utilities
system

Registers Non-Storage MacOs

Control Unit
Windows
(F-D-E-S)

Unix

Linux
Summary and Discussion

You might also like