You are on page 1of 34

Operating Systems Introduction

Author: Brian Brown, 1995-2000. All rights reserved.


Previous | Home Page | Next

Overview This module introduces you to the subject of operating systems. It is an introductory course that will take you approximately 30-40 hours to complete (including the exercises) depending upon your level of prior knowledge.

What is an operating system? An operating system (OS) is a collection of system programs that together control the operation of a computer system.

What does an operating system do? An operating system controls the way in which the computer system functions. In order to do this, the operating system includes programs that

initialize the hardware of the computer system provide basic routines for device control provide for the management, scheduling and interaction of tasks maintain system integrity and handle errors

Where are operating systems found? There are many types of operating systems, the complexity of which varies depending upon what type of functions are provided, and what the system is being used for. Some systems are responsible for managing many users on a network. Other operating systems do not manage user programs at all. These are typically found in hardware devices like petrol pumps, airplanes, video recorders, washing machines and car engines.

What is a general-purpose operating system?

Windows NT Workstation is known as a general-purpose operating system. This is because it provides the ability to run a number of different programs, such as games, word processing, business applications and program development tools.

A simple operating system for a security control system An operating system for a security control system (such as a home alarm system) would consist of a number of programs. One of these programs would gain control of the computer system when it is powered on, and initialize the system.
The first task of this initialize program would be to reset (and probably test) the hardware sensors and alarms. Once the hardware initialization was complete, the operating system would enter a continual monitoring routine of all the input sensors. If the state of any input sensor changed, it would branch to an alarm generation routine.

What are Input and Output devices? Input and output devices are components that form part of the computer system. These devices are controlled by the operating system. Input devices provide input signals such as commands to the operating system. These commands received from input devices instruct the operating system to perform some task or control its behavior. Typical input devices are a keyboard, mouse, temperature sensor, air-flow valve or door switch. In the

previous example of our simple security control system, the input devices could be door switches, alarm keypad panel and smoke detector units. Output devices are instruments that receive commands or information from the operating system. Typical output devices are monitor screens, printers, speakers, alarm bells, fans, pumps, control valves, light bulbs and sirens.

Exercise 1 Classify each of the following devices as an input or output device

Exercise 2 For a simple home security system, make a list of possible input and output devices that you think might be required.
Input Devices Output Devices

Exercise 3
This is a Philips video recorder. Make a list of possible input and output devices that you think the operating system inside this video recorder might be required to manage. Input Devices Output Devices

What is a single-user operating system? We are all familiar with the concept of sitting down at a computer system and writing documents or performing some task such as writing a letter. In this instance there is one keyboard and one monitor that you interact with. Operating systems such as Windows 95, Windows NT Workstation and Windows 2000 professional are essentially single user operating systems. They provide you the capability to perform tasks on the computer system such as writing programs and documents, printing and accessing files. Consider a typical home computer. There is a single keyboard and mouse that accept input commands, and a single monitor to display information output. There may also be a printer for the printing of documents and images. In essence, a single-user operating system provides access to the computer system by a single user at a time. If another user needs access to the computer system, they must wait till the current user finishes what they are doing and leaves. Students in computer labs at colleges or University often experience this. You might also have experienced this at home, where you want to use the computer but someone else is currently using it. You have to wait for them to finish before you can use the computer system.

What is a multi-user operating system? A multi-user operating system lets more than one user access the computer system at one time. Access to the computer system is normally provided via a network, so that users access the computer remotely using a terminal or other computer.

In the early days of large multi-user computers, multiple terminals (keyboards and associated monitors) were provided. These terminals sent their commands to the main multi-user computer for processing, and the results were then displayed on the associated terminal monitor screen. Terminals were hard-wired directly to the multi-user computer system.

Today, these terminals are generally personal computers and use a network to send and receive information to the multi-user computer system. Examples of multi-user operating systems are UNIX, Linux (a UNIX clone) and mainframes such as the IBM AS400.

The operating system for a large multi-user computer system with many terminals is much more complex than a single-user operating system. It must manage and run all user requests, ensuring they do not interfere with each other. Devices that are serial in nature (devices which can only be used by one user at a time, like printers and disks) must be shared amongst all those requesting them (so that all the output documents are not jumbled up). If each user tried to send their document to the printer at the same time, the end result would be garbage. Instead, documents are sent to a queue, and each document is printed in its entirety before the next document to be printed is retrieved from the queue. When you wait inline at the cafeteria to be served you are in a queue. Imagine that all the people in the queue are documents waiting to be printed and the cashier at the end of the queue is the printer.

Operating system utilities The operating system consists of hundreds of thousands of lines of program code and stored on hard disk. Portions of the operating system are loaded into computer system memory (RAM) when needed. Utilities are provided for

Managing Files and Documents Development of Programs and Software Communicating between people and with other computer systems Managing user requirements for programs, storage space and priority

Operating System Interfaces In addition, the operating system provides each user with an interface that accepts, interprets and executes user commands or programs. This interface is commonly called a SHELL or command line interpreter (CLI). In some systems this might be a simple text mode line-by-line entry using keywords (such as MSDOS or UNIX), in other systems it might be highly graphical using windows and a pointing device such as a mouse (such as X-Windows).

Advantages and problems of multi-user operating systems The advantage of having a multi-user operating system is that normally the hardware is very expensive, and it lets a number of users share this expensive resource. This means the cost is divided amongst the users. It also makes better use of the resources. Since the resources are shared, they are more likely to be in use than sitting idle being unproductive. One problem with multi-user computer systems is that as more users access it, the performance becomes slower and slower. Another disadvantage is the cost of hardware, as a multi-user operating system requires a lot of disk space and memory. In addition, the actual software for multi-user operating systems tend to cost more than single-user operating systems.

What is a multi-tasking operating system? A multi-tasking operating system provides the ability to run more than one program at once. For example, a user could be running a word processing package, printing a document, copying files to the floppy disk and backing up selected files to a tape unit. Each of these tasks the user is doing appears to be running at the same time. A multi-tasking operating system has the advantage of letting the user run more than one task at once, so this leads to increased productivity. The disadvantage

is that more programs that are run by the user, the more memory that is required.

Revision Exercise 1 List FOUR things an operating system does.

List THREE home appliance devices in your home that probably have an operating system controlling their function.

List FOUR hardware devices on a typical home computer that an operating system has to initialize when it is turned on.

List THREE possible errors that might occur in a typical home computer that an operating system has to handle.

State THREE possible basic routines an operating system might provide for handling a hardware device.

Previous | Home Page | Next

Operating Systems Introduction


Author: Brian Brown, 1995-2000. All rights reserved.
Previous | Home Page | Next

What are the various parts of an Operating System? In this section we look at that part of the operating system that is responsible for running programs, called the real-time executive or kernel. An operating system for a large-scale computer that is used by many people at once is a very complex system. It contains many millions of lines of instructions (commands that the computer executes) written by programmers. To make operating systems easier to write, they are constructed as a series of modules (programs), each module responsible for one function. Typical modules in a larger multi-user operating system could be,

Kernel (also known as the executive) Process manager Scheduler File manager

What is a real-time executive? The core of all operating systems is called a REAL TIME EXECUTIVE (also known as the kernel). Some of the functions that it performs are

switching between programs hardware device control and programming memory management process management scheduling (deciding what programs to run) inter-process communication processing of exceptions and interrupts

Our simple security monitoring system would not have all of the above, as it would probably be a single task system, running only one program. As such, it would not need to perform scheduling of more than one program or allow communication to take place between programs (called inter-process communication). Memory management would be unnecessary, as the program would easily fit into the available memory of the computer. An operating system designed to handle a large number of people would need a real-time executive that performs all of the above. User programs are generally stored on disk, thus need to be loaded into memory before being executed. This presents the need for memory management, as the memory of the computer would need to be searched for a free area in which to load a persons program into. When the user was finished running the program, the memory consumed by it would need to be freed up and made available for another user when required. Process scheduling and management is also necessary, so that all programs would be executed and run fairly. There is no point if a program by a specific user runs to such an extent that it denies the running of any other programs, making every other user wait. In addition, some programs might need to be executed more frequently than others, for example, checking network communications or printing. Some programs may need to be temporarily halted, then restarted again later, so this introduces the need for inter-program communication.

What is a computer program? Programs are a series of instructions to the computer. When a software programmer (a person who writes programs to run on a computer system) develops a program, it is converted into a long list of instructions that is executed by the computer system. In operating systems we talk more of a process (part of a program that is in some stage of execution) than a program. This is because in modern operating systems, only a portion of a program is loaded at any one time. The rest of the program sits waiting on a disk unit till it is needed. This saves memory space. Processors execute computer programs. A processor is a chip in the computer that executes program instructions. Processors execute millions of instructions per second.

How do operating systems run more than one program at once? Some systems run only a single process at a time, other systems run multiple processes at once. Most computer systems are single processor based, and a processor can only execute one instruction at a time, so how is it possible for such a single processor system run multiple processes? The simple answer is that it doesnt. The processor of the computer runs one process for a short period of time, then is switched to the next process and so on. As the processor executes millions of instructions per second, this gives the appearance of many processes running at once.

What is co-operative and preemptive switching? In a computer system that supports more than one process at once, some mechanism must be used to switch from one task to another. There are two main methods used to perform this switching.

Co-operative switching means that a task that is currently running will voluntarily give up the processor at some time, allowing other processes to run. Preemptive switching means that a running task will be interrupted (forced to give up) and the processor given to another waiting process.

The problem with co-operative switching is one process could hang and thus deny execution of other processes, resulting in no work being done. An example of a co-operative system was Windows 3.1 Pre-emptive scheduling is better. It gives more response to all processes and helps prevent (or reduce the number of occurrences of) the dreaded machine lockup. Windows NT workstation is an example of such as operating system. Note: Only 32-bit programs in Windows 95 are pre-emptive switched. 16-bit programs are still co-operatively switched, which means it is still easy for a 16bit program to lock up a Windows 95 computer.

A multi-user operating system allows more than one user to share the same computer system at the same time. It does this by time-slicing the computer processor at regular intervals between the various programs run by each user. In this example, there are five people that share the processor hardware and main memory on a time basis. Consider a 486 Intel processor running at 50MHz. This processor is capable of about 6 million instructions per second. If we decided that we would share the hardware by letting each user run for 1/5th of a second, this would mean each user could execute about 1.2 million instructions each time they have the processor.

We start off by giving the first user (which we will call Bart) the processor hardware, and run Barts program for 1/5th of a second. When the time is up, we intervene, save Barts program state (program code and data) and then start running the second user program (for 1/5th of a second). This process continues till we eventually get back to user Bart. To continue running Bart's program, we restore the programs code and data and then run for 1/5th of a second.

What is dispatching? It will be noted that it takes time to save/restore the programs state and switch from one program to another (called dispatching). This action is performed by the kernel, and must execute quickly, because we want to spend most of our time running user programs, not switching between them.

What is system overhead? The amount of time that is spent in the system state (running the kernel and performing tasks like switching between user programs) is called the system overhead, and should typically be below 10%. Too much time spent performing system tasks in preference to running user programs will result in poor performance for user programs, which will appear to run very slowly.

What is required to switch from one program to another? This switching between user programs is done by part of the kernel. To switch from one program to another requires,

a regular timed interrupt event (provided by a clock) saving the interrupted programs state and data restoring the next programs state and data running that program till the next timed interrupt occurs

The timed event is usually about 1 to 10 milliseconds apart and generated by a real-time clock. To save and restore program states requires hardware support, a feature supported by Intel processors.

What is context switching? When the processor is switched from one process to another, the state (processor registers and associated data) must be saved, because at some later date the process will be restarted and continue as though it was never interrupted. Once this state has been saved, the next waiting process is activated. This involves loading the processor registers and memory with all the previously saved data and restarting it at the instruction that was to be executed when it was last interrupted. The process of switching from one process to another is called context switching. A time period that a process runs for before being context switched is called a time slice or quantum period.

What is scheduling? Deciding which process should run next is called scheduling, and can be done in a wide variety of ways. Co-operative schedulers are generally very simple, as the processes are arranged in a ROUND ROBIN queue. When a running process gives itself up, it goes to the end of the queue. The process at the top of the queue is then run, and all processes in the queue move up one place. This provides a measure of fairness, but does not prevent one process from monopolizing the system (failing to give itself up).

Pre-emptive scheduling uses a real-time clock that generates interrupts at regular intervals (say every 1/100th of a second). Each time an interrupt occurs, the processor is switched to another task. Systems employing this type of scheduling generally assign priorities to each process, so that some may be executed more frequently than others. First in First Out Scheduling A FIFO queue is a list of available processes awaiting execution by the processor. New processes arrive and are placed at the end of the queue. The process at the start of the queue is assigned the processor when it next becomes available, and all other processes move up one slot in the queue. Round Robin Scheduling One of the problems with the FIFO approach is that a process may in fact take a very long time to complete, and thus holds up other waiting processes in the queue. To prevent this from happening, we employ a pre-emptive scheduler that lets each process run for a little while. When the time-slice is up, the running process is interrupted and placed at the rear of the queue. The next process at the top of the queue is then started.

Other ways of scheduling processes It is common now in operating systems today for processes to be treated according to priority. This may involve a number a different queues and scheduling mechanisms, using priority based on previous process activity, how it has been executing for and how long it has been since it last was executed by the processor.

Revision Exercise 2 List FIVE functions that a real time executive does.

What is co-operative switching and how does it differ from pre-emptive switching?

What is dispatching?

What happens to the performance of running user programs when system overhead increases?

What is a time-slice?

What is scheduling?

What is one problem with First-In-First-Out queues when used to schedule processes.

Previous | Home Page | Next

Operating Systems Introduction


Author: Brian Brown, 1995-2000. All rights reserved.
Previous | Home Page | Next

What is a Process? In this section we look at how the operating system manages the various programs or tasks that need to be run. A process or task is a portion of a program in some stage of execution. A program can consist of several tasks, each working on their own or as a unit (perhaps periodically communicating with each other). Each process that runs in an operating system is assigned a process control block that holds information about the process, such as a unique process ID (a number used to identify the process), the saved state of the process, the process priority and where it is located in memory. The process priority is used to determine how often the process receives processor time. The operating system may run all processes with the same priority, or it may run some processes more often that others. Processes that have been waiting a long time for execution by the processor may have their priority increased so that they will be more likely to be executed in the future.

What about process states? A process in a computer system may be in one of a number of different possible states, such as

ready - if it can run when the processor becomes free running - it currently has the processor blocked - it cannot run when the processor becomes free When a running process is interrupted by the processor after completing its allotted time, its state is saved in its process control block, its process state changed to ready and its priority adjusted. When a running process accesses an input or output device, or for some reason cannot continue, it is interrupted by the processor, the process state and associated data is saved in the associated process control block. The process state is changed to blocked and the priority adjusted. When the scheduler decides the next task to run, it changes the process state of the selected process to running and loads the saved data associated with that process back into the processor. Typically, an operating system will provide a number of program function calls that can be used to control processes. These are similar to those shown below, block() wakeup() suspend() sleep() change_priority()

What is a process control block? A process control block or PCB is a data structure (a table) that holds information about a process. Every process or program that runs needs a PCB. When a user requests to run a particular program, the operating system constructs a process control block for that program. Typical information that is stored in a process control block is

the location in memory of where the process is the priority of the process a unique process identification number (called PID) the current process state (ready, running, blocked) associated data for the process

How do processes inter-communicate? Processes can intercommunicate by sending messages, data or code between them. A process can use OS calls like sendmessage() and getmessage() to exchange messages. Two processes might want to co-operate in performing a particular task. For example a process might want to print to document in response to a user request, so it starts another process to handle the printing and sends a message to it to start printing. Once the process handling the printing request finishes, it sends a message back to the original process, which reads the message and uses this to pop up a dialog box informing the user that the document has been printed. There are other ways in which processes can communicate with each other, such as using a shared memory space.

How do processes synchronize their activity? Sometimes a process may need to wait for some other process to finish before it can continue. In this instance, the two processes need to be synchronized together. There are a number of ways in which this can be done. A common method in operating systems is to use a variable called a semaphore that only one process can own at a time. There are two calls associated with a semaphore, one to lock it and one to unlock it. When a process attempts to lock a semaphore, it will be successful if the semaphore is free. If the semaphore is already locked, the process requesting the lock will be blocked and remain blocked till the process that has the semaphore unlocks it. When that happens, the process that was blocked will be unblocked and the semaphore can then be locked by it. System semaphores are used by the operating system to control system resources. A program can be assigned a resource by getting a semaphore (via a system call to the operating system). When the resource is no longer needed, the semaphore is returned to the operating system, which can then allocate it to another program.

How do processes protect critical data (Critical sections)? When two or more processes access shared data, often the data must be protected during access. Typically, a process that reads data from a shared queue cannot read it whilst the data is currently being written or its value being changed. Where a process is considered that it cannot be interrupted whilst performing a critical function such as updating data, it is prevented from being interrupted by the operating system till it has completed the update. During this time, the process is said to be in its critical section. Once the process has written the data, it can then be interrupted and other processes can also run. Problems occur only when both tasks attempt to read and write the data at the same time. The answer is simple, lock the data structure whilst accessing (semaphores or interrupts disabled). There is no need for data locking if both processes only read at same time. Critical sections of a process should be small so that they do not take long to execute and thus other processes can run.

What is a thread? A thread is a separate part of a process. A process can consist of several threads, each of which execute separately. For example, one thread could handle screen refresh and drawing, another thread printing, another thread the mouse and keyboard. This gives good response times for complex programs. Windows NT is an example of an operating system which supports multithreading.

What is a background and foreground process? Multi-tasking systems support foreground and background processes (tasks). A foreground task is one that the user interacts directly with using the keyboard and screen. A background task is one that runs in the background (it does not have access to the screen or keyboard). Background tasks are usually used for printing. Windows NT Workstation and Windows 95/98 assign a higher priority to foreground tasks.

Revision Exercise 3 What is a process?

Complete the following process state transition diagram.

What is a process control block?

List FOUR things a process control block holds.

What is a semaphore?

What is a critical section?

What is a thread?

Why does operating systems such as Windows NT and Windows 98 give a higher priority to the foreground task compared to that of background tasks.

Previous | Home Page | Next

Operating Systems Introduction


Author: Brian Brown, 1995-2000. All rights reserved.
Previous | Home Page | Next

How does an Operating System load itself? In this section we look at how the operating system loads when the computer is first turned on. The operating system may be loaded into the computers memory in two ways.

it is already present in ROM (so is permanent, immediately accessible and difficult to update) it is loaded from disk when the computer is turned on.

If the operating system is already present in ROM (for systems like industrial controllers, petrol pumps etc), it will gain control immediately the processor is powered on. This method is best suited for small appliances and hand held devices where the operating system is relatively simple and small.

For more complex systems, the operating system is usually stored on secondary media (such as disk), and is loaded into the computer memory (RAM) when the computer is powered on. Advantages of this type of system are that changes to the operating system are easier to make and implement.

What is the BOOTSTRAP PROCESS? The bootstrap process describes the task of initially loading the operating system from disk into RAM. A small routine stored in ROM, called the BOOTSTRAP LOADER or IPL (Initial Program Loader), reads a special load routine from the diskette.
In floppy based system, this routine is normally located on Track 00, sector 00 (or 01), and is called the boot sector. The code contained in the sector is transferred into RAM, then executed. It has the sole responsibility for loading the rest of the operating system into memory.

What are the different types of Operating Systems? Operating systems are divided into categories that define their characteristics. Modern systems may use combinations of those described below.
BATCH The earliest type, allowed only one program to run at a time. The program was entered into the computer, then run till completed. The data used by the program could not be modified whilst the program was running. Any errors in the program or data mean starting all over again. These allow the modification and

INTER-ACTIVE

entry of data whilst the program is running. Typical systems are airline reservations and languages such as BASIC. TIME-SHARING/MULTI-USER These share the computer system amongst more than one user, and employ pre-emptive scheduling techniques. MULTI-TASKING More than one process may be executed at once. The processor is switched rapidly between the processes. A user may run more than one process at a time. REAL-TIME Primarily used in process control, telecommunications, etc. The OS monitors various inputs which affect the execution of processes, changing the computers model of the environment, thus affecting the outputs, within a guaranteed time period (usually < 1 second). MULTI-PROCESSOR A computer that has more than one processor dedicated to running processes. EMBEDDED An embedded operating system means the operating system is selfcontained in the device and resident in ROM. Typical systems that use embedded operating systems are household appliances, car management systems, traffic control systems and energy management systems.

These are examples of embedded systems.

Embedded systems are also known as dedicated systems. This is because they only perform a specific task, and cannot run a wide variety of programs like a home computer (which we previously identified as a general purpose system). Windows NT workstation is an interactive, multitasking multiprocessor operating system. Windows 98 is an interactive, multitasking operating system. Linux is an interactive, multitasking, multiprocessor, multi-user operating system.

What is a shell? A shell is a program that handles user input and output. It provides routines for handling user input from a keyboard or mouse, as well as routines for displaying information on the terminal screen. A shell also provides a mechanism to interpret user commands and run additional programs that users request. In program called command.com was the shell in MS-DOS. In Windows 98 and NT workstation this shell is still present (it is called the command prompt and you run it by accessing the command prompt icon). The UNIX shell is called the bourne shell, and is a program called sh. There are other UNIX shell programs, notably the kourne shell and the c shell.

Revision Exercise 4 Briefly explain the bootstrap process.

Briefly explain how the batch operating system worked.

Briefly explain what an embedded operating system is.

How does an embedded operating system differ from a general purpose operating system?

Previous | Home Page | Next

Operating Systems Introduction


Author: Brian Brown, 1995-2000. All rights reserved.
Previous | Home Page | Next

ALL ABOUT FILE MANAGEMENT In this section we take a brief look at how the operating system deals with files.

What is a file? A file of a collection of data that normally is stored on a secondary storage device such as a hard disk or floppy diskette.

What are the typical operations performed on files? An operating system must provide a number of operations associated with files so that users can safely store and retrieve data. Typical operations are

Open Close Create Copy Rename List In addition, operations on single data elements within a file are supported by Read Write Seek

What are File Control Blocks? File control blocks (FCB), sometimes referred to as file descriptors, are data structures that hold information about a file. When an operating system needs to access a file, it creates an associated file control block to manage the file. The structure of the file control block differs between operating systems, but most file control blocks include the following parts Filename Location of file on secondary storage Length of file Date and time or creation or last access

What about how we name files? Each operating system uses a specific convention or practice for naming files. MS-DOS Uses eight character file names, a dot, then a three-character extension that denotes the type of file. Filenames are not case-sensitive. UNIX Filenames can be up to 254 characters long and are case-sensitive. Windows Filenames can be up to 255 characters long and are not casesensitive.

What are file types? File types refer to classifying the content of the file, such as a program, text file, executable program or data file. In Windows operating systems, the file type is derived from the filename extension. Typical file types and their extensions are
File Extension .bas .c .dll .doc .exe .txt File Type basic source program c source program system library Word document executable program text file

Windows associates applications (programs) with specific file types. For example, the default application that opens to process a file of type .txt is the Notepad editor.

How does an operating system keep track of files? The hard disk is comprised of a large number of sequentially numbered sectors. As files are created, free sectors are allocated to hold the file contents and marked as allocated. To keep track of the sectors and whether they are allocated or free, and to which file they belong, the operating system maintains a number of tables.

What is a root file system? When the operating system is first installed, it creates a root file system on the disk that specifies how many sectors are available and how they will be allocated. The root file system is a table of entries like a directory. In general, this is a fixed size, and once full, no more entries can be added. Each entry can be either a file or another directory table. The following table depicts this structure.

What does a root file system entry look like? This is highly operating system specific, but an entry might look like, Name of file Beginning cluster number Length of file in bytes Type of file Creation date and last modified right File permissions (an access control list)

What is a cluster? To make things a little simpler than managing a large number of sectors, the operating system groups sectors together into a minimum allocation unit called a cluster. When a request to create a file occurs, the operating system allocates a cluster at a time until the all the data is stored. This raises a question. How are all the clusters of a file linked together? The previous diagram also illustrates the linking of the file clusters in a chain, with the last cluster signifying that there are no more clusters allocated to the file. One of the problems of using clusters as a minimum storage allocation unit is the wastage of space. Consider a cluster allocate of two sectors, each sector storing 1024 bytes (or characters). This means a minimum storage allocation of 2048 bytes. If you stored a file containing the phrase Hello, then this would result in 2043 unused bytes in the cluster (most operating systems store the

length of the file, so there is no need to use an end of file marker, which would occupy an additional byte). You might consider that a smaller allocation size based on the size of a sector would be more efficient. However, it becomes more complex to manage smaller cluster sizes and they take up more space (the table becomes larger and it takes more time to go through all the entries).

How is free space managed? The operating system can maintain a table of cluster entries, and mark each cluster as either free or allocated. This was a technique used in the MS-DOS operating system. Other operating systems maintain a linked list of free clusters, each free cluster pointing to the next free cluster. As clusters are allocated, they are removed from the free cluster list. When a file is deleted, the clusters that were allocated to it are added back to the free cluster list.

What file systems are supported by Windows operating systems? The Windows operating system supports the following file systems.
FAT The MS-DOS operating system introduced the File Allocation Table system of keeping track of file entries and free clusters. Filenames where restricted to eight characters with an addition three characters signifying the file type. The FAT tables were stored at the beginning of the storage space. An updated version of the FAT system designed for Windows 98. It supports file compression and long filenames. Windows NT introduced the NT File System, designed to be more efficient at handling files than the FAT system. It spreads file tables throughout the disk, beginning at the center of the storage space. It supports file compression and long filenames.

FAT32

NTFS

What are access-control lists and file permissions? In multi-user operating systems, files may be accessed by multiple users. Permission rights associated with folders (directories) and files are used to protect or restrict access to files. In UNIX these rights are known as Read, Write and Execute. In Windows NT and Windows 2000 (using the NTFS filesystem), additional file permissions are available.

What is a symbolic link or shortcut? A symbol link is a filename that links to another file. Consider the case on a UNIX box where three different mail packages are available. The administrator only wants to reference the mail using the command mail, so the filename is made to point to (or reference) the desired mail package. When the administrator runs the command mail, the appropriate mail package that is referenced by the symbolic link runs. In Windows, a similar capability is known as a shortcut.

What is file-system integrity? File-system integrity refers to whether the file-system contains errors. Sometimes this is caused by a user turning off the computer system without first shutting the computer down properly. During the shutdown process, a flag can be written to the file-system. At startup, this flag can be detected, and if not present, means the computer system was not shut down correctly. UNIX provides the fsck program to check the file-system. The Windows operating systems provide Scandisk or Chkdsk (checkdisk).

What is fragmentation and what does defragging a drive do? When files are created and data written to the file, the operating system allocates space for the file from the free cluster list. Over a period of time, the clusters that are allocated to a file may no longer be sequential (contiguous or one after the after) but scattered over the disk.

Why is this a problem? An operating system reads data from secondary storage in contiguous clusters more efficiently and faster than from non-contiguous clusters. Windows operating systems such as Windows 95/98 provide a defragmentation utility that scans the file system for fragmented files and moves them to a contiguous space. This results in faster loading and accessing of files.

Revision Exercise 5 List FOUR operations that are associated with files.

What is a File Control Block?

What is a root file-system?

What is a cluster?

How does an operating system manage free space?

What is an access control list?

Previous | Home Page | Next

Operating Systems Introduction


Author: Brian Brown, 1995-2000. All rights reserved.
Previous | Home Page | Next

What are the hardware requirements of Windows operating systems? This section outlines the typical hardware requirements for the Windows operating systems. You should be aware that these are recommended figures, and in actual practice more memory and disk space is recommended if you intend to run applications and programs in addition to the base Windows operating system. System requirements for Windows 95 386DX or higher 4MB memory or higher [8MB recommended] 35-40MB disk space 3.5" floppy drive or CD-ROM VGA or higher resolution graphics card System requirements for Windows 98

486DX/66MHz or higher 16MB memory or higher 195MB disk space CD-ROM VGA or higher resolution graphics card System requirements for Windows NT Workstation 4.0 16 MB RAM Recommended 486/25MHz or higher processor 110 MB available hard-disk space VGA, Super VGA, or video graphics adapter CD-ROM drive. System requirements for Windows 2000 Professional Not known at time of printing. Software still in beta.

What are the general features of Windows operating systems? This section outlines some of the more general features found in the Windows 95/98 and Windows NT Workstation 4.0 operating systems. Ease of installation Graphical interface Plug and play support Add/Remove programs Networking Support

Easy installation Windows can be installed from floppy disk, CDROM, or via a network. Windows uses an installation wizard, a graphical program designed to make installation of the operating system simpler and friendlier. Previously, when installing MSDOS or Windows 3.1 operating systems, additional programs need to be run after installation to add support for devices like CD-ROM's or sound cards. The Windows wizard takes care of this, automatically searching the computer for hardware devices like printers, network cards, CD-ROM drives, sound cards and modems then installs the

software for these at installation time. This means Windows is easier to install and configure than previous operating systems. As the Windows installation wizard detects what the computer hardware is, it modifies the display screens accordingly. Using a set of easy to follow menus and dialog boxes, it guides the installer through the installation process. When the installation wizard is finished, it prompts the installer to reboot the computer. At this stage, the computer has been fully installed with the operating system and will be ready to use after the reboot. It takes approximately 20-30 minutes to install Windows from CD-ROM.

Graphical Interface Windows offers an improved user interface called the desktop. The desktop consists of a screen area, and a taskbar, which is by default at the bottom of the screen. The taskbar is used for starting programs, or switching between programs. As the user starts each program, the name of the program is displayed on the taskbar. Clicking on the name of the program on the taskbar will display the window associated with that program on the desktop.

The far right end of the task bar also displays the current time and other controls. The Start button on the taskbar displays a cascading menu of program choices. When a user clicks on the Start button, a pop up menu appears. This provides easy access to installed applications. The My Computer Icon on the desktop is a shortcut to viewing what is on your computer. Double-clicking an icon on the desktop displays the information within a window. The Recycle Bin Icon on the desktop is used to hold recently deleted files. When you delete a program or file, it is saved in the recycle bin just in case you deleted it by accident. This allows you to recover from mistakes when you delete something you should not have.

The Network Neighborhood Icon on the desktop is used to display the various resources like servers and applications available on the network (assuming the computer is network enabled).

Plug and Play Support Windows makes it much easier to add new hardware. It supports Plug and Play technology, which means new hardware can be added to the computer and Windows will automatically detect the new hardware and install software support for it when rebooted. Please note that adding new hardware first requires the computer to be turned off before the hardware is added.

Add/Remove Programs Adding and removing programs is also easier. Previously, the removal of programs was very difficult. Under Windows, a record is kept track of the files installed and used by programs. The use of installation wizards helps install and remove programs, so that when a program is removed, parts used by other programs are left intact.

Networking Support Windows supports a wide number of protocols and networks. This allows easy connection to both Microsoft and non-Microsoft networks. Internet Ready: Dial up networking and Internet Explorer Windows comes with Dial-up network support, making an Internet connection to an Internet service provider (ISP) an easy task via a setup wizard. In addition, under Windows, a user can configure the dial-up networking to support more than one ISP. Internet explorer is provided for users to browse the World Wide Web. Standard FTP and Telnet programs are provided.

Previous | Home Page | Next

You might also like