Chapter 5, System Software
System Software - Operating Systems
- fundamentally different than application softare, which we studied in chapter 4
- The primary example is the operating system.
- Most PCs are controlled by Microsoft Windows operating system.
- Macintoshes are controlled by the Macintosh operating system developed internally by Apple.
- PCs may also run the Linux (most people pronounce it "LYNN-icks") operating system
- Servers, mainframes and supercomputers use operating sytems like Linux, UNIX, Solaris, and Windows Server.
- PDA's run special flavors of Windows (Mobile, CE), Palm OS, Blackberry OS, Symbian OS(smartphones)
- even cell phones, cameras, and computers embedded in other products (such as cars) have specialized operating systems
Operating system (O.S.) is the conductor of the computer orchestra
- controls which software programs get to use the CPU and when
- controls allocation of RAM
- controls transfer of data/instructions between disk/CD and RAM
- controls organization of files on disk/CD
- controls operations of all external devices
Support for multiple tasks and/or users
- OS for devices generally support one user and task at a time: phones, PDAs, etc
- OS for notebooks/desktops support one user and multiple tasks at a time (think Windows taskbar)
- OS for servers, mainframes, supercomputers must support multiple users and tasks at a time
- Between 1960 and 1980, most computers supported multiple users at a time! 'cause they were mainframes
- Support for multiple tasks and/or users is complex because all have to share the CPU
Booting a computer
name comes from old saying about pulling yourself up by your bootstraps (get started without anyone's help)
- initially RAM is empty
- boot program resides in non-volatile memory on motherboard, called
Basic Input Output System or BIOS.
- when power is turned on,
- boot program is loaded into RAM and is run (executed)
- boot program performs some device tests, sometimes you can see text on the black screen from this
- boot program directs computer to load the operating system kernel program from the hard drive (or other designated device) into RAM
- processor then switches from running the boot program to running the operating system program
- operating system completes the booting process and remains in RAM for as long as the power is on
- you interact with the operating system (e.g. Windows XP) through its user interface
Operating System User Interface
- interactive use of computer requires interface between user and O.S.
- You are most familiar with Microsoft Windows.
- Which version(s) of Windows have you used? How can you find out which version you have?
- Have you used a Macintosh? How is it the same as Windows? Different?
- Have you used Unix or Linux? How is it the same as Windows? Different?
- Have you used MS-DOS? How is it the same as Windows? Different?
- O.S user interfaces come in two basic flavors:
- command-line interface (CLI)
- graphical user interface (GUI)
- both flavors have advantages and disadvantages
CLI is textual interaction using typed commands
- examples are MS-DOS, "native" Unix or Linux
- basic interaction cycle
- O.S. issues a "prompt"
- user types command and presses Enter key
- O.S. carries out command and possibly gives feedback
- go back to step 1
- commands resemble assembly language instructions: command followed by operands
GUI presents computing environment as a "virtual world"
- For history and example screen images, see the
Wikipedia article "History of the Graphical User Interface"
- predominant "virtual world" is desktop
- pioneered by Xerox PARC in 1970s
- Apple founder Steve Jobs copied the Xerox idea for Macintosh, 1983
- Microsoft founder Bill Gates copied the Macintosh idea (poorly) for Windows 3.1, 1992
- Windows finally "caught up" to original 1983 Macintosh GUI with 1995's Windows 95
- For a sample of original Macintosh GUI, see the Mac in my office
- To view the famous Macintosh "1984" commercial, see
http://www.uriah.com/1984.html.
This commercial was produced by Ridley Scott ("Blade Runner") and shown only once, during the
1984 Super Bowl. It ha been considered by many to be the best commercial in TV history (TV Guide 1999, Advertising Age 1995).
For more information, see
http://en.wikipedia.org/wiki/1984_(advertisement)
OS Duty: Processor (CPU) management
- CPU can run only one program at a time
- Some computers have multi-core processors; this means more than one CPU on the processor chip
- Multi-core processor can run a different program on each CPU (core) simultaneously
- O.S. can switch what program the CPU is running; this allows multi-tasking
- This switching, called time slicing, can occur many times per second and is not visible to you
- multitasking example: You can play a CD, then start a file download, then switch to Word to type then save a document and print it, then switch to a new browser tab to do a Google search while the CD, download, save and print are all still in progress
- If multiple tasks are active, you may notice the system responds slowly. Such as when you login to a lab computer.
That's because the CPU can really only do one thing at a time, so the total time required is the sum of
the times required by all the tasks.
OS Duty: Memory management
- Allocate primary memory to programs as needed
- Deallocate primary memory as programs progress and complete
- If program is really big, can store some of it in virtual memory in a special place on the disk
- Control cache memory
- cache (pronounce "cash") is French word for hiding place to store provisions
- a good explanation is found at
http://www.webopedia.com/TERM/c/cache.html
- memory cache is very high speed memory built into the processor chip
- Cache is used to store contents of recently/frequently-used RAM locations -- faster access because no need to read from RAM which is external to CPU on the motherboard
- Related technique: disk cache is section of RAM used to store contents of recently/frequently-used disk locations -- faster access
because no need to read from hard drive
- Related technique: browser cache is used by web browsers to store recently/frequently used web pages on hard drive -- faster access
because no need to read from remote Web server
OS Duty: File management
- a file is a program or chunk of data stored under a given name in secondary storage (disk, CD, tape)
- a folder (a.k.a. directory) is a named collection of files and other folders
- Yes, I know you manage files yourself using Windows Explorer or by using Open and Save in your
software applications! Those software applications use O.S. services to carry out the Open and Save
operations.
- Windows uses file name extension (period followed by 1 to 3 letter
code) to associate the file with application that uses it.
- to view
file extensions, select My Computer from desktop or Start, then go to the Tools menu, select "Folder Options...",
then click the View tab and make sure the line "Hide extensions for known
file types" is unchecked.
- O.S. controls allocation of disk space to files when they are created and expanded
- O.S. controls deallocation of disk space when files are reduced or deleted
- O.S. allocates disk space in small (e.g. 1024 bytes) fixed size chunks, corresponding to disk track/sector intersection
- large files may thus be stored in pieces scattered across the disk; this is fragmentation
- fragmentation increases disk response time, defragmenting is process of reallocating to store all pieces of a file together
- in Windows, go to Start, then All Programs, then Accessories, then System
Tools, see if there is a defragmenting tool
OS Duty: Device (peripheral) management
- You can attach an assortment of I/O devices (scanner, joystick, camera, iPod) to your computer
- including some that were not yet invented when your computer or O.S. were developed
- How can O.S. communicate with these devices?
- O.S. communicates with peripheral devices through driver software
- driver manages data transfer between computer and peripheral
- driver, once installed, becomes part of O.S.
- many drivers are included with O.S., such as for keyboard, mouse, many disk drives, many printers
- driver software usually included when you purchase peripheral device, then you install both device and driver
- many drivers can be downloaded from device company's web site
- Plug and play devices are able to use drivers already included in the OS