Computer Programming Slide 2
Computer Programming Slide 2
Lecture 2
2
Computer Architecture
4
Software Classifications
● Application software
– Easy-to-use programs designed to perform specific tasks
● System software
– Programs that manages resource(CPU, input/output/storage)
and support the execution and development of other programs
– Mediates between application software and computer hardware
– Three major types
• Operating systems
• Translation systems
• Utility programs
5
System Software
● System software coordinates the various parts of the
computer system and mediates between application
software and computer hardware.
6
Operating System
● Operating System is a software, which makes a
computer to actually work. It is the software that enables
all the programs we use.
● The Operating System organizes and controls the
hardware.
● Operating System acts as an interface between the
application programs and the machine hardware.
● Examples:
– Windows
– Linux
– Unix and
– Mac OS
– etc.,
7
OS: Major Functions
● Allocation and Assignment
– The Operating System allocates resources to the application
tasks in the execution queue.
– It provides locations in primary memory for data and programs
and controls the input and output devices such as printers and
telecommunication links.
● Scheduling
– Thousands of pieces of work can be going on in a computer at
the same time.
– The Operating System decides when to schedule the tasks that
have been submitted and when to coordinate the scheduling in
various areas of the computer so that different parts of different
tasks can be worked on at the same time.
– The Operating System must schedule these tasks according to
organizational priorities. For example, on-line order processing
may have priority over a task to generate mailing lists and labels. 8
OS: Major Functions
● Monitoring
– computer system activities
– tracking status of tasks
– performs error control
– provides system security
9
Capabilities of OS
● Multiprogramming (Multitasking)
– A method of executing multiple programs concurrently using the
same computer;
– Two or more programs are active at the same time, but they do
not use the same computer resources simultaneously;
– Example: CPU executing one program while input/output needs
of other programs are serviced
– Switching among programs occurs rapidly giving the impression
that all programs are executing simultaneously.
TRADITIONAL
MULTIPROGRAMMING
SINGLE-PROGRAM SYSTEM
ENVIRONMENT (WINDOWS)
(DOS)
PROGRAM 1
OPERATING
PROGRAM 1 PROGRAM 2
OPERATING
SYSTEM
SYSTEM
PROGRAM 3
UNUSED MEMORY
UNUSED MEMORY
10
Capabilities of OS
● Multiprocessing
– Two or more parallel processors in system;
– Program can be divided to be processed by multiple CPUs;
– Can process large programs more rapidly (e.g., supercomputing).
● Virtual storage
– primary memory appears to the user to be larger than it really is;
– technique for handling programs efficiently;
– dividing programs into small fixed-portions (pages) or
variable-length portions (segments) with only a small portion
stored in primary memory at one time;
– CPU is utilized more fully;
– large size and number of programs can be executed.
11
Capabilities of OS
● Time sharing
– share of computer resources by many users simultaneously by
spending a fixed amount of CPU time (e.g. time slice of 2
milliseconds) on each user before moving to the next user;
– as CPU operates in nanoseconds, much work can be
accomplished within 2 milliseconds.
12
Application Software
■ Application software makes computer popular and easy to
use
■ Common application software:
– Microsoft Word, Word Perfect
– PowerPoint
– Netscape, Internet Explorer, Chrome
– PhotoShop, Photo-Paint
– Quick Time
– Dreamweaver
13
Computer Software Relationships
User
Application Programs
Interface
User
Operating System
Interface
Computer Hardware
14
Computer Viruses
15
Computer Viruses
16
Viruses and Virus Protection
● A virus program
– Infects programs, documents, databases
and more …
– It is man-made
– It can hide and reproduce
– It can lay dormant (inactive) and then
activate
18
How do you know if you have a virus?
● Unexpected pop-up windows
– Unexpected onscreen ads are a typical sign of a virus infection.
Not only are they annoying, other malware may lurk inside poised
to wreck further havoc. Never click on a suspicious pop-up –
even if it says ‘a virus was detected’. This is an example of
rogueware, which asks you to pay for a program to remove a fake
virus but may in fact allow even more malware to be downloaded.
19
How do you know if you have a virus?
● Suspicious hard drive activity
– An excessively active hard disk where it makes continual noise or
constantly spins – even though you’re not using your computer
nor have any programs running – can be a sign your PC is
infected with a virus.
● Missing files
– Some malware cause problems by deleting files and programs or
moving them around. Some may encrypt your files so you aren’t
able to open them.
20
How do you know if you have a virus?
● Crashes and error messages
– If programs start opening and closing automatically, your system
freezes or shuts down for no reason, or you see odd error
messages, then you may have a virus infection.
● Email is hijacked
– If friends start receiving emails or instant messages from your
social networks asking them to click on an attachment or link, it’s
likely that a virus is attempting to spread to other computers via
your accounts. If so, change your passwords immediately.
21
How do you know if you have a virus?
● Browser woes
– Your web browser becoming sluggish, your home page changing
or being redirected to unusual websites are all warning signs of a
computer virus infection.
● Security attacks
– Some viruses are designed to disable your computer’s protection.
So, if you can’t open or install an anti-virus program or your
firewall, your computer may be infected.
22
Virus Protection
▪The software package distributed with new PCs
always includes an antiviral program.
23
Purposes of Computers
24
Characteristics of Computers
Data Information
Computer
Knowledge
25
Information Processing System
● Data is a collection of independent and unorganized or
raw facts.
26
● e. g.
-2 4 0 -3 10 (data)
|| sort
\/
v
-3 -2 0 4 10 (information)
27
Processing data produces
information, and processing
information produces
knowledge.
28