Overview of Computer Science

advertisement
Overview of Computer Science
CSC 101 — Summer 2011
Operating Systems
P d ti it A
Productivity
Applications
li ti
Lecture 11 — July 20, 2011
Announcements
• Midterm Review Tomorrow
– Come with Questions
• Midterm Friday
– All short answer.
– You will have as much time as needed.
– All lectures up to today (1-11)
• Lab 4 tomorrow (Due Monday 7/25)
• Writing Assignment #4 due Tomorrow
2
Objectives
• System Software
• What are operating systems and what do they do?
– How operating
p
g systems
y
manage
g the computer
p
– The anatomy of an operating system
• Some different kinds of operating systems
• Unix-like operating systems (especially Linux)
• Basic productivity software: “office suites”
3
1
Layers of Abstraction
• We are still progressing from the “inside out” through the
abstract layers of digital technologies
Communications
Applications
Operating Systems
Programming
Hardware
Information
4
Software
• We’ve been talking about software applications,
software development and languages
• Two main categories
g
of software:
– Applications – end-user programs
• Word processing
• Spreadsheets
• Image editing
• Web browsers
• Email
• Calendar
• Web page authoring
• Music players
• Etc., etc., etc.
– System software – behind the scenes
• Compilers – used by software producers (at the ‘software factory’)
• Interpreters – to run client-side scripts (on your client)
• Operating systems – make the hardware work for you
5
Operating Systems
• So, you’ve got some computer hardware…
• How do you make it do what
you want it to do?
6
2
Operating Systems
• The operating system is a
layer between the end
user and the computer’s
hardware
END USER
• The OS hides details
– Takes care of the
complexities of making
the hardware do what the
user or applications want
APP. 1
APP. 2
OPERATING SYSTEM
HARDWARE
7
An Example
• What happens when we double-click a file?
– Operating system responds…
1.
2.
3.
4.
5.
6.
7.
8.
9.
Finds location of the click on the screen
If on an icon, determines file type (extension)
Looks up file type to find if an application is needed
Finds the application (executable file) on disk
Allocations a section of main memory for the application
Copies the application from disk to main memory
Finds the data file on disk
Copies the data file from disk to main memory
Starts execution of the application
8
Operating Systems Manage Tasks
• Operating systems manage execution of processes (tasks)
– Processes include
• Applications
• System-level functions
• The CPU only executes simple commands, one at a time
– But, we usually run lots of applications “simultaneously”
– Multiple tasks are “shuffled” so that they appear to be running
simultaneously
– The OS makes sure that the CPU splits its time appropriately
between the running tasks
9
3
Operating Systems
• The operating system (OS) is a collection of programs
that work together to run the computer
– Supervises execution of processes (programs or tasks)
• Start and stop processes
• Watch
W t h for
f crashed
h d processes
– Manages system resources
•
•
•
•
•
Main memory utilization
CPU time allocation
Auxiliary storage (disks, etc.)
Input/output peripherals
Networking
– Provides a user interface
– Provides login security, printing, and other useful services
10
Kernel and Shell
• The kernel provides the
functional parts of the OS
1.
2.
3.
4.
Supervisor
Device Drivers
Memory Manager
File Manager
• The shell provides the
user interface
–
An abstraction
11
11
Anatomy of an Operating System
• Functional components of a basic OS:
1.Supervisor
2.Input/Output control drivers
3 Memory Manager
3.Memory
4.File Manager
5.User Interface
12
4
1. Supervisor
• Oversees and controls execution of all processes
• Loads and executes applications
• Manages requests (system calls) initiated by
users and applications for things such as:
–
–
–
–
–
–
Printing
File I/O
Networking
Keyboard input
Display output
Etc.
13
2. I/O Control Drivers
• I/O control drivers provide the communication between
running applications and the I/O hardware subsystems
– Printers
– Disks
– Mouse and keyboard
– Screen
– Etc.
Etc
• Hides details of I/O devices from users and processes
– Applications can make logical I/O requests without knowing
the details of the physical commands required by the device
APPLICATION
I/O
CONTROL
DRIVER
PERIPHERAL
DEVICE
14
3. Memory Manager
• Remember that the CPU interacts directly only with
main memory (RAM)
• All actively running programs, and their data, must
reside in main memoryy
– The OS itself occupies some of main memory
– Each application and data file must have a separate space in
main memory – they cannot overlap
• The memory manager allocates segments of main
memory for each process and data file
• It also attempts to protect the system from accidental
memory overlaps
– Some operating systems do this better than others
15
5
OS: 3. Memory Manager
• An example of memory management when using
an application to create a data file
– Before the computer is turned on
• Volatile main memory is blank
• Applications and the OS are stored on auxiliary storage
RAM
OS
application
Hard Disk
Main Memory
16
3. Memory Manager
• An example of memory management when using
an application to create a data file:
17
3. Memory Manager
• An example of memory management when using
an application to create a data file:
18
6
4. File Manager
• Data is stored on disks in fragments
– These file fragments can be scattered in various places on disk,
organized by the “file allocation table” (FAT)
– Keeping track of all this information is a messy job
• But
u co
computers
pu e s aree really
e y good at do
doing
g thiss kind
d oof messy
essy job
• The file manager hides that detail
– We don’t need to worry about where all the file fragments are
– The file manager deals with the all the messy details of how
and where the file is physically stored on disk
• The file manager also provides a hierarchical file
structure of folders and subfolders for our use
– To get to a file, we only need to know the file name and which
folder (directory) it is in
19
4. File Manager
• File manager also provides a
hierarchical file structure
– Files are stored in “folders” (or “directories”)
– Folders can be
stored within
other folders
20
5. User Interface
• User interface is the medium for communication between
the user and the computer
– Text-based command line interpreters (CLIs)
• Examples:
p
DOS,, Unix ‘shell’
• Very powerful
• Very steep learning curve; very unforgiving
– Graphical user interfaces (GUIs)
• Examples: Windows, Macintosh,
Linux windowing systems
• Intuitive and user-friendly
• Slower and less efficient than CLIs
– Although not a problem with fast computers
• Capabilities limited to those anticipated
by GUI designers
21
7
Personal Computer Operating Systems
• Various operating systems are available for personal
computers (desktops, laptops, special-purpose workstations)
–
–
–
–
Windows (Microsoft)
Macintosh’s OS X (Apple)
Linux (open source – distributed development)
On the horizon: Chrome OS (Google)
• Hand-held devices
–
–
–
–
–
iPhone/iPad (iOS, derived from Apple’s OS X)
Blackberry (Blackberry OS)
Treo and other Palm-based phones (Palm OS)
Windows phones (Microsoft Windows Mobile OS)
Droid phones (Google’s Android OS – an open system based on
Linux)
Development of Unix
• Unix is a generic term for a very common operating
system for small-to-midsize multi-user computers
• Initially developed at AT&T Bell Labs in New Jersey
– First
Fi t version
i operational
ti l 1971
• Additional development at UC Berkeley (1970’s)
• Adopted by most manufacturers of minicomputers
in the 1980’s
– Each manufacturer made their own proprietary version of Unix
• Adapted to PCs by hobbyists in the 1980’s (Minix)
23
Linux
• 1991: Linus Torvalds (undergraduate student at Helsinki
Univ., Finland) decided to write a new OS and sent out
the following message:
H ll everybody
Hello
b d out
t th
there using
i
minix
i i –
I’m doing a (free) operating system (just a hobby, won’t be big and
professional like gnu) for 386(486) AT clones.
• Linus called it Linux
• Thousands of people around the world have joined in to
build a full-featured, professional, free operating system
– Coordination through the web (www.linux.org)
24
8
Linux
• Linux is free (or cheap)
• It is open source, meaning that the
source code is available to anyone
–
–
–
–
What’s the deal
with the
Penguin,
anyway?
Errors and problems can be solved quickly
New features can be added easily
Linux can be adapted to individual circumstances
Licensed using the GPL (General Public License)
• Linux is becoming more and more common as a
personal computer OS
– Some WFU students and faculty have it on their laptops
– Competition for Microsoft Windows
25
Linux
• Because it is not built by a single company, commercial
support was originally hard to find
– Installation and customization
– Maintenance and updates
p
– Application software
• Support now provided by many organizations
– Linux providers: Red Hat, Mandrake, SuSE, Knoppix, etc.
– Hardware manufacturers: IBM, Dell, HP, SGI, etc.
– World-wide user community: mail lists, support forums, etc.
• Many applications now available, including office
productivity tools
26
Linux
• Becoming more widely used as a desktop OS
– Cheaper to purchase
– Easier to support
• Familiar
F ili GUI
– Can change or
customize desktop
• Productivity software
becoming more available
– e.g. OpenOffice.org
• Competition for Microsoft Office
• Can use MS Office files directly
27
9
Linux
• Widely used on large Web servers
• As of 3/10, of 207,000,000 Web sites surveyed, ~50% are running Linux
– Apache is the Linux program that runs Web servers
http://news.netcraft.com/archives/web_server_survey.html
28
Linux
• Widely used in large computational clusters
– Example: www.deac.wfu.edu
• ~500 processors in one cluster
– Other large
g clusters ((many
y Linux)) listed at
www.top500.org
29
Other Operating Systems
• Most ‘mainframe’ computers have their own,
proprietary operating systems
– Highly customized and optimized to take best
advantage of their hardware
• Many of these manufacturers are shifting to
Linux
– Save time and money by not “reinventing” solutions
to problems that have already been solved
– IBM is leading the way to switching commercial
computers to Linux
30
10
Who Are These People?
31
Who Are These People?
Just a minor traffic violation, apparently…
32
Microsoft
• Founded in 1975 by Bill Gates and Paul Allen
– Both college dropouts
– Now very rich (together
worth >$70,000,000,000)
>$70 000 000 000)
• Paul Allen
– World’s 6th richest person
– Owns Seattle Seahawks and Portland Trailblazers
– Has a 414-foot yacht Octopus equipped with 2 helicopters
and a 60-foot submarine
– Financial backer of Space Ship One – the first private craft to
make it into space
33
11
Basic Office Applications
•
•
•
•
•
Word Processing
Spreadsheets
Presentations
Databases
Personal information
management
–
–
–
–
Email
Contacts
Calendar
ToDo lists
• Etc.
• Microsoft Office (~$500)
–
–
–
–
–
Word – word processing
Excel – spreadsheet
Access – database
PowerPoint – presentations
Outlook – personal information
• OpenOffice.org (free)
– Writer – word processing
– Calc – spreadsheet
– Base – database
– Impress – presentations
– Windows, Linux, Macintosh, etc.
• WordPerfect Office
• Lotus SmartSuite
• Etc.
34
Productivity Software
• Installed productivity apps have long been a major use of PCs
• Google has been expanding into areas formerly available only as installed apps
– Not just conventional Internet-based uses, such as
• Email (Gmail) & IM (Talk)
• Blogging, social networking (Orkut), and Web site creation
– But they’ve recently been adding more office productivity tools
• Word p
processor,, Spreadsheet,
p
, Presentations
• Calendar, Calculator, Drawing, Mapping, Photo and video tools
• Etc.
– All Web-based and free (ad-supported)
• Sometimes called “cloud computing”
– Opportunities for collaborative document creation
• But, must be online to use Web-based software
• Does this help explain why Google is getting in to the WiFi business?
• What is Microsoft’s response?
35
Productivity Software
• Is Google trying supplant or complement Office tools?
– Google has been hiring away high-level talent from Microsoft
– Google may be in a position to transform computing from local applications to
Internet applications
– Microsoft’s ‘.Net’ and ‘Live’ have tried to go there,
but aren
aren’tt having a lot of success
36
12
Productivity Software
• Google is also trying to get involved more in social
networking activities
–
–
–
–
orkut.com – like Facebook or MySpace
IM, blogging,
gg g chat rooms, etc.
Google Video
YouTube purchase:
• $1.65 Billion for
Chad Hurley and Steve Chen
• Company started in a garage in 2/05
– Originally featured videos of
one of the founders’ cats
• Gives Google another avenue for
putting ads in front of people
• But, what about copyrighted material?
37
Web 2.0
• The shift from the Web as a publications medium
to the Web as a platform for expression
– An architecture of participation
– Web-based applications
– User-generated content
• A 4-minute video about what it all might mean:
– http://www.youtube.com/watch?v=NLlGopyXT_g
– Makes reference to article “We Are The Web”
– We will read this article for WA#7
38
13
Download