Main components of a PC
Main components of a PC operating system
Operating systems are very important to computers! They look after many basic functions that allow people to use computers. There are quite a few operating systems about. Some you will have heard of and some you may not have. Widely used operating systems include Windows, DOS and Linux, for example. One of the first jobs a personal computer has when it is switched on is to get the operating system loaded up into RAM from the hard disk. The operating system can then start managing the computer, the applications and the data files.
Windows

The Windows operating system dominates the PC market. It has an interface made up of a window for each open application. You can open many applications at the same time although only one of them will ever be 'active'. In other words, you can only ever work on one of the applications at a time although you can easily switch between them to make a different one active. The Windows operating system also uses drop-down menus and pop-up menus. These allow many choices to be presented to users for selection but they take up little space on the screen until the menu is actually selected. Clicking on an icon (or small computer picture) is far quicker and often more intuitive than typing in instructions to tell the computer to do something and is another feature of Windows. Windows also comes with pointing devices such as mice, to allow quick and accurate selection compared to typing in selections. For the above reasons, we say that Windows has a WIMP interface (Windows, Icons, Menus and Pointers).
MS-DOS
Command line operating systems such as MS-DOS have been largely sidelined for standalone PCs, although there are still notable examples of this type of operating system in use. UNIX, which is widely used on multi-user and networked systems, is one such example. Command line interfaces require you to type in instructions rather than click on windows, icons and menus.
A GUI verses a command line interface
The reasons why GUIs dominate command line interfaces vary but the following points can be made.
It takes more time to learn a command line interface than a GUI because you must learn the syntax of instructions rather than clicking on an intuitive WIMP GUI.
-
- You can 'multitask' in a GUI i.e. run more than one application at (apparently) the same time but you can't in some operating systems that use a command line interface, such as DOS.
- Memory is managed more efficiently in a GUI compared to a command line interface.
Of course, you need more RAM to run a GUI than a command line interface - those windows, icons, menus and pointers and all those utility programs take a lot of programming! You've probably noticed how long Windows takes to load up when you boot-up a computer. DOS takes very little time to load up compared to Windows.
What do operating systems do?
Both the DOS and Windows operating systems (O/S) allow you to work on the computer without needing to know how the computer does what it does! To summarise what we have said before, an operating system
Decides where in RAM to put applications and data you use.
-
- Manages file management, both organising the storing and retrieving of files.
- Provides utilities for basic PC management such as de-fragmenting disks or formatting disks.
- Reports errors.
- Provides an interface so a user can access the PC.
- Provides the management of I/O, for example, sending a file to the printer.
- Schedules different jobs, so that the CPU and other PC resources are used efficiently.
What happens when you boot-up a computer?
Lots of things happen to a computer from the moment you turn the power on to the moment you start using it.

Description of the boot-up process
-
- When you power up a computer, a little program of instructions (known as the BIOS or Basic Input Output System and which is held in the ROM chip) starts running.
- The job of the BIOS is to check to see if the computer has the basic, error-free hardware needed to get the PC up and running. It runs what is known as a POST routine, or ‘Power On Self Test’. Specifically, this small program checks to see if there is a keyboard, a hard disk, a floppy disk and some memory (RAM). If it finds any of these absent or if it finds an error with any of them, then it displays an error message (and beeps)!
- Some of the BIOS is held in ROM. Some of it, however, is held in battery-backed RAM (known as CMOS) and you the user can configure it! Don't play with the BIOS settings on your computer unless you know what you are doing! You can create a lot of serious problems!
- Once the basic hardware check is complete, the BIOS then looks in some pre-set places for a special program called the ‘bootstrap program’. Often, the first place it looks in is in the first sector (known as the 'boot sector') of the hard drive and then if it can't find the bootstrap there, it looks in the first sector of any floppy disk in the floppy disk drive or possibly the CD drive. We said above, however, that you could configure certain settings in the battery-backed part of the BIOS. One thing the user can configure is the order that the BIOS looks at devices when it is looking for the bootstrap. Once again, I don't recommend you play with the BIOS, but your teacher may show you the BIOS if you ask nicely! So one thing the user might change is to get the computer to always look for the bootstrap program on the floppy disk first, or last, depending upon what the user wants and needs!
- When the BIOS has located the bootstrap program, wherever it is, it loads it into RAM and runs.
- The bootstrap program then takes over control of loading whatever operating system you are using. It first of all locates the operating system on the hard drive and then transfers it from the hard disk into RAM and runs it.
- Once your operating system has loaded, the computer automatically looks for ‘boot files’. These are special files that the user can play with to set up the computer in exactly the way that the user wants.
More about boot files
Once the operating system has been loaded, users will often want to customise their system. For example, they might want a virus-checking program to run automatically and for the computer to open Word. To customise a system, users can add their own commands to certain files known as ‘boot files’ (e.g. command.com and autoexec.bat in Windows). These files are looked at automatically after the operating system has been loaded. If present, the instructions in them are carried out. The user then uses the computer. Boot files allow a user to set up (or 'configure') their PC in exactly the way they want.
Managing files on a PC
Hard drives store:
-
- Applications
- Data files
- An operating system
To understand how a PC actually manages files and applications, you need to understand how the hard drive works, how information is stored on it and what the File Allocation Table (FAT) does.
How a hard drive works
A hard drive is made up of a set of magnetic disks. Each one is divided up into circular areas called TRACKS. The tracks are divided into SECTORS. Sectors can be grouped together into CLUSTERS. To read or write to the hard drive, the hard drive is first spun very quickly. A read-write head then moves in over the disk. When the head is above a track, it can read or write data to it. Actually, the head is going to be above several tracks at the same time so it can read and write data to several tracks when it is in one position. Since a hard drive is made up of a number of magnetic disks on top of each other, all the tracks together will form a cylinder. Note that there may be several thousand tracks on a disk. On a track, there may be e.g. 120 sectors (SCSI drive). Each sector has an address, made up of which track it is on and which sector on the track it is. Each sector, remember is a fixed size - it can only hold e.g. 512 bytes. So what happens if you want to save a file that is 1 Mbyte in size? You will need to use lots of sectors (or clusters). You will end up with bits of your file saved all over the hard disk! No problem. That's where the FAT comes in.

The File Allocation System (FAT)
The FAT is a database that keeps a log of every file on the hard drive. It is created by the operating system when you format the disk and it is stored on track zero of the disk itself. Your hard disk is divided into sectors, each one being able to store a fixed number of bytes. These sectors are grouped into clusters.
Each file is held in a linked list of clusters. The FAT holds the start address of the first cluster in the linked list. When you want a particular file, the operating system looks up the address of the first node in the FAT. It then follows this address and retrieves the first cluster as well as the address of the next node. It then follows that address to the next node, recombining the clusters into a file, until the end-of-file marker is reached (the null pointer).
More on the FAT
The FAT is used to keep track of the storage space on a storage device. Entries in this table can indicate bad clusters, free clusters, clusters in use by a file or the end of a file. The smallest unit of space that can be allocated to a file is not necessarily a sector. When DOS was first designed it was decided to allocate space on a disk in units called 'clusters'. The number of sectors in each cluster depends on the actual capacity (the 'format') of the disk in question. Clusters rather than sectors were used because the size of the table needed to keep track of cluster usage was smaller than the one that would be needed for sector usage. The single-sided 40 track disk formats have a cluster size of one sector but the double-sided 40 track formats use two sectors per cluster. Hard drives may have cluster sizes as high as eight sectors. What this means is that the smallest amount of disk space that can be allocated to a file when it is written to a disk is the size of the cluster. This size can be calculated by the number of sectors per cluster multiplied by 512 bytes per sector. When a very small file is saved onto a large capacity hard drive, the amount of disk space taken up by that file is 4096 bytes, even if the file is only 10 bytes long. This wastage is because of the way DOS keeps track of where it puts files onto disks. This is one reason why data compression is sometimes able to shrink files by a large amount.
Network operating systems
A Network Operating System (NOS) is an operating system that gives computers the ability to communicate with other computers on a network. NOS software often includes extra facilities to allow back-ups and improve security, for example. Some widely used NOS software includes Novell and UNIX.
Peer-to-peer network operating systems
A peer-to-peer network is a number (more than one) of computers that have been connected together so that their resources can be shared. The computers on this type of network have equal status (they are all 'peers') and can all be used as workstations; any of them, at the same time, could also manage the printing (act as a print server) or look after sharing files (act as a file server) or cache web pages or look after email. These kinds of networks are very simple compared to 'client-server' networks. Once you have connected all your computers together, you can configure the network and then away you go! The network is very simple. It will control the communication between workstations and allow you to control:
-
- The transfer of files from one machine to another.
- Printing.
- Using workstations on the Internet at the same time with only one modem
Client-server network operating systems
A client-server network is made up of computers and servers. The computers are known as ‘clients’. These are connected up to each other as before but at least one of the computers acts only as a resource manager. The computers on the network then make use of the resources available at any of the resource managers. The resource managers are more properly known as 'servers'. You can have a range of different kinds of servers on a typical client-server network. These might include a file server, a print server, a web server and an email server, for example.
Client-server networks are more complicated than peer-to-peer networks and need to have a Network Operating System (NOS). This is a piece of software that 'manages' a network. A Network Operating System typically:
-
- Controls communication between workstations themselves and between workstations and servers.
- Allows and manages file sharing.
- Allows and manages printing and other resources.
- Controls Internet access amongst stations.
- Manages user accounts.
- Manages security.
- Manages automated system back-ups.
- Manages and reports on the use of the system's resources, such as each user's hard disk allocation and how many prints they are allowed to do.
- Provides a number of different user interfaces. This allows different categories of user to access the network, for example, an interface to allow the network administrator to set up account and an interface to allow users to access applications.
File sharing
The NOS must stop two people writing to the same file at the same time! When someone opens a file, other users get locked out until the file is finished with. In addition, the NOS can give each user rights. These give users the right to read files or to change files or to add and delete files, for example.
Printing
When files are sent for printing on a network, a program known as the ‘spooler’ intercepts it. A spooler program is usually part of the NOS program although spooler programs will also come with dedicated print servers.
Security
Access to the resources on the network must be controlled. Information is valuable, time on the network is valuable, resources must be accounted for and privacy issues must be respected - when a user saves their files onto the server, they must not be accessible to anyone else! Network Operating Systems use a system of ‘accounts’ to help achieve this. Users are given a User ID along with a password. These must be used to gain access to the network.
Many things that have security implications can be controlled by the NOS. You can force the user to change their password after fixed amounts of time. You can allow access to only certain applications and equipment, from certain machines and at certain times of the day. The amount of disk space allocated to each user can be controlled so that one user doesn't hog a fixed resource such as disk space. Some of you may have had messages in the past whilst working on a school computer saying that you are getting close to using up your allocation of disk space so delete some old files or that your print credits are low and need to be topped up. These came from the NOS! In addition, everything that users do can be logged and reported!
Accounting
As has already been mentioned, the resources on a network are often of a fixed size. Examples include the size of the hard disk, the number of licences for an application, the cost of printing, the use of computer time and time spent on the Internet. Sometimes, you just want to try to be fair to everyone. Sometimes you might want to charge for certain services such as printing or Internet access or you might want to reserve applications for which you have limited licences. To help you do this, the NOS gives you tools to control the resources and reporting facilities to enable you to account for them and review or charge for them if necessary. A network manager can, of course, buy additional software to help her. For example, she may buy some print management software, as discussed earlier.