What is an Operating System?
Last week we looked at virtual memory. We studied a diagram showing how virtual memory worked. It was a little complicated – dividing stored data into pages and managing moving the pages from RAM to the hard drive. Typically this is done using a computer program called a memory manager. The memory manager is part of a larger computer program which manages many general purpose tasks such as getting input from different devices and moving data from the various storage locations in the computer. This larger computer program is called an operating system.
An operating system acts as an interface between the user and the computer hardware. The operating system controls the execution of all other programs on the computer.
Popular Operating Systems
Some common operating systems that you may have interacted with are Windows, Linux, IOS and Android.
- Windows – used on Office computers and on servers and on desktops. Often used to perform accounting and clerical tasks in offices of all sizes.
- Linux and Unix – used on servers – computers which perform tasks for large numbers of other computers. A common use is to serve web pages to other computers.
- IOS – used on Apple telephones and tablets
- Android – developed by Google used by many other smartphone manufacturers such as Samsung.
- Lynxos the most popular Real Time Operating System. Used in embedded systems Typically more reliable and simpler than Linux/Unix and Windows. Used to control tools, appliances, increasingly, cars.
Characteristics of Operating Systems
This list of characteristics shows how operating may differ depending on how they are used.
- Multi-tasking – can two or more unrelated programs run on the computer at the same time? A Multi-tasking computer simulates same time operation by switching tasks so quickly that they appear to be executing simultaneously. Think of watching a youtube movie while, at the same time, retrieving your mail.
- Multi-User – can two or more people, sitting in front of a monitor and keyboard, access the same computer at the same time? A multi-user computer switches between user’s tasks so quickly that the users typically don’t see that they are sharing the computer’s resources. From the operating system’s point of view Multi-User is almost the same as Multi-Tasking.
- Distributed – is the operating system capable of running on many computers all executing the same task, with the operating system coordinating the resources of all the computers.
- Embedded – the operating system is integrated into a machine. Computers which control fuel mixtures in automobiles are using embedded operating systems.
- Open Source or Proprietary – Is the code for the operating system free and published for all to modify or distribute. Linux is the most popular example of an Open System operating system. Windows is the most popular example of a proprietary operating system with Microsoft retaining all rights to the code in Windows.
What is open source?
A BIOS and an Operating system are software products – computer code written to operate computers. Some software is proprietary – written and owned by a company, other software is open source. Propietary software is property, a concept we are all familiar with. Open source is a different matter:
Before you load the Operating System – the BIOS
You will probably never need to know much about the BIOS. What is important to know, is that there is a setting in the BIOS which determines what devices your computer uses to start up with. Your computer is capable of starting up by executing software which is resident on its hard drive, or on a flash drive, or on a CD. This makes your computer much more useful and flexible but it also has security implications which you should be aware of.
For example, say you have a windows computer which boots windows from the hard drive. You password protect your windows machine so that people may not login to your computer without knowing your password. It is possible to configure the bios to not start the computer from the hard drive but to start it using the CD player or a flash drive. If you do this, then the contents of the hard drive are available to you without knowing the windows password.
What is a file system?
In describing operating systems we have concentrated on how operating systems move data around from device to device. We have not discussed how that data is defined by the operating system. Data can reside on different devices, CD’s, DVD’s, flash drives, RAM, and Hard Drives. All of this data can be manipulated and moved from device to device while maintaining its meaning and integrity. This is accomplished using programs and standards which implement a file system. File systems are closely associated with Operating Systems, however an operating system often can work with different file systems. The vast majority of modern Windows operating systems work with a file system called NTFS. Many flash drives work with a different, older file system called W95. Windows can accommodate both file systems.
A file system provides a standard for defining a unit of data and a method to encode it, store it, and access it. A unit of data, as defined in a file system, is called a file. For example, under Windows (an Operating System) a file exists: “letter.doc”. Letter.doc is a word processing file, created by Microsoft Word, a word processing program. Letter.doc is a file and windows commands exist for copying letter.doc, renaming letter.doc, and deleting letter.doc. Windows (the OS) has only the most rudimentary commands for editing letter.doc, that is, changing a line of text in the document. Microsoft Word, the word processing program, has far more commands for editing. Operating systems do very little with files but move them around, back them up, and match them with programs which work on them in a more specialized fashion.
Characteristics of a file under most filing systems:
- Variable size
- Often a maximum size
- Has a name
- Often the name is structured e.g. xxxxx.yyy, where yyy is a suffix which corresponds to a file type.
- Has continuity – will exist after the computer is turned off and on.
- The file will have the same structure regardless of the media on which it is stored.
Operating system commands to manipulate files:
Typically operating systems provide commands to manipulate whole files. They don’t provide commands to manipulate the internals of the files. Operating systems provide commands to copy, delete, and rename files.
Files are contained in directories – directory and folder are synonyms. This is similar to chapters in a book. I, for example, have a directory called class – for all my school related work. Within the class directory, I have another directory called cisc181, for my work in this class. In the cisc181 directory I would put all my files which have to do with this class.
Different filing systems used with different Operating Systems
- NTFS – common windows filing system
- Fat and fat32 – older windows filing systems, sometimes used in cameras and memory sticks.
- Ext2 and ext3 – linux and unix filing systems
- Unix systems use UFS, ext2, ext3 and ZFS.
- HFS is used on MACS
Journaling file system
“Journaling” refers to a a filing system which keeps track of all changes to the files and has the ability to recover files before they were changed. HFS as used in MACS, is a journaling file system.
Using a file system
Files systems provide a method of organizing files. My PC has over 40,000 files on it. If they were simply stored as a gigantic blob, I would never be able to find anything. Typically files are stored in a hierarchical structure. Think of chapters in a book, then headings, then subheadings. In file systems these hierarchical units of organization are called directories or folders. So, on a windows machine, I might have a file called “bg.txt” which is stored on drive c, in a folder called bg, which contains a folder called documents, which contains a folder called cisc181, which contains the file bg.txt. I could refer to the file in Windows like this:
What happens to a file that is deleted?
File systems are generally written to be efficient, not secure. When you delete a file on most file systems, the system does not erase the data in the file. Erasing the data takes time. Instead, the area that the file occupies on the storage medium (usually the hard disk) is marked as available. The contents of the file remain until that space is needed, typically to store another file.
This has important security implications. A reasonably skilled person using commonly available software can often recover the contents of a deleted file. This can help convict people in court, win or lose civil court cases, or expose political scandals.
Often, computers used in conjunction with military contracts which have security requirements have software which erases the data in files after the files are deleted. In addition, software is available which will insure erasure of software on a disk drive which the user has deleted.
Maintaining the Operating System on Your Computer
Connecting your computer to the internet is the equivalent of moving your family into a bad neighborhood. You are exposing your computer to viruses and malware when you visit websites or download programs or media from the internet. In order to protect your computer and yourself, you need to keep your version of the operating system up to date. New viruses are released on the internet every day. Your operating system vendor works hard to counter these viruses. Most upgrade releases of operating system software includes patches to prevent new viruses from attacking your computer. Indeed, the primary reason for for most operating system patches is to repair vulnerabilities in the operating system.
In addition to remaining current with your operating system vendor’s patches, you need to install some sort of virus protection on your computer. Most anti-virus software actively protects your computer from viruses and malware, actively scanning your computer as you use it.