operating systems handbook part 1

77
BTEC National Diploma/Certificate In Computing (Networking) Operating Systems Unit 27 Course Handbook

Upload: oloole

Post on 20-May-2017

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Operating Systems Handbook PART 1

BTEC National Diploma/Certificate

InComputing (Networking)

Operating Systems

Unit 27

Course Handbook

Sanyaade O. Adekoya

Page 2: Operating Systems Handbook PART 1

SECTION ONE

What is an operating system?What are input and output devices?Where are operating systems found?What is a general purpose operating system?What is a program?Dedicated operating systemsA simple operating system for a security systemWhat are input output devicesExercises 1, 2, 3What is a single-user operating system?What is a multi-user operating system?Operating system utilitiesOperating system interfacesAdvantages and problems of multi-user operating systemsWhat is a multi-tasking operating system?What is software and application software?What are the general categories of application software?Revision Exercise 1

SECTION TWO

What are the various parts of an operating system?What is a real-time executive?What is a computer program?How does an operating system run more than one program at once?What is cooperative and preemptive scheduling?What is dispatching?What is system overhead?What is required to switch from one program to another?What is context switching?What is scheduling?Other methods of schedulingRevision Exercise 2

SECTION THREE

What is a process?What about process states?What is a process control block?How do processes intercommunicate?How do processes syncronize their activity?How do processes protect critical data?What is a thread?What is a background and foreground task?Revision Exercise 3

2

Page 3: Operating Systems Handbook PART 1

SECTION FOUR

How does an operating system load?What is the bootstrap process?What are the different types of operating systems?What is a shell?Revision Exercise 4

SECTION FIVE FILE MANAGEMENT

What is a file?What typical operations are performed on files?What are file control blocks?What about how we name files?What are file types?How does an operating system keep track of files?What is a root file system?What does a root file system entry look like?What is a cluster?How is free space managed?What file systems are supported by Windows operating systems?What are access control lists and file permissions?What is a symbolic link or shortcut?What is file-system integrity?What is fragmentation and what does defragging a drive do?Revision Exercise 5

SECTION SIX SOFTWARE TOOLS

EditorsThe program translation sequenceAssemblersHigh level languagesInterpretersCompilersLinkersLoaders and locatorsCross referenceDisassembersDebuggers and monitorsCross assemblersRevision Exercise 6

SECTION SEVEN Basic Features of Graphical Interfaces

The mouseThe mouse cursorSelecting items with a mouseWindow fundamentalsWindow properties

3

Page 4: Operating Systems Handbook PART 1

SECTION EIGHT Windows Objects and Components

Text BoxesRadio ButtonsCheck BoxesDialog BoxesList BoxesDrop Down List BoxesTab ControlsToolbars

SECTION NINE

Hardware requirementsGeneral Features of WindowsEasy InstallationGraphical InterfacePlug and PlayAdd/Remove ProgramsNetworking

4

Page 5: Operating Systems Handbook PART 1

SECTION ONE : Part 1

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

Learning OutcomesAt the end of this section you should be able to

define what an operating system is list four functions performed by an operating system briefly explain the difference between a general purpose operating system and

a dedicated operating system classify software according to either business, operating system, utility,

education or entertainment categories identify from a list which items are input or output devices explain the difference between a single-user and a multi-user operating system classify common operating systems as either single-user or multi-user

 

What is an operating system?  An operating system (OS) is a collection of system programs that together control the operation of a computer system. Typical operating systems are Windows 98 and Linux.

An operating system generally only runs on a specific hardware platform. For instance, Windows 98 only runs on computer systems based on Intel pentium processors.

You can learn more about Windows 98 at the Microsoft Web Site.

 

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

 

5

Page 6: Operating Systems Handbook PART 1

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. These are often referred to as dedicated operating systems.

 

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.

 

What is a program?A program is a set of instructions that performs a task. When we talk about programming a computer or writing a computer program, we mean writing a set of instructions that the computer can execute. Developers (people who write programs) need to use special software to write programs, often called compilers.

 

Dedicated Operating SystemsAn operating system designed for a single purpose is often called a dedicated operating system. It performs a specific purpose, such as controlling the environment in a building, controlling a petrol pump, or opening and closing an automatic door. Dedicated operating systems cannot be used to run other types of programs such as games or business software.

 

A simple operating system for a security control systemAn 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.

6

Page 7: Operating Systems Handbook PART 1

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 1Classify each of the following devices as an input or output device

       

 

7

Page 8: Operating Systems Handbook PART 1

Exercise 2For 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            

8

Page 9: Operating Systems Handbook PART 1

SECTION ONE : Part 2

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

9

Page 10: Operating Systems Handbook PART 1

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 utilitiesThe operating system consists of hundreds of thousands of lines of program instructions and these are stored on hard disk of the computer. Portions of the operating system are loaded into computer system memory (RAM) when needed. To manage the computer system, users, printers, files and write programs, the operating system is generally provided with a number of utility programs. The utilities are used 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 InterfacesIn 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

10

Page 11: Operating Systems Handbook PART 1

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 systemsThe 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.

 

What is software and what is application software?Software is just another name for program. We often use the term to refer to a group of programs. For example, you might get asked the question "what sort of software do you have?". In this case, the person is asking you what types of software do you have, and how many different software programs do you have. I guess you could think of someone asking a snake collector the question "What sort of snakes do you have?". For the snake collector, they obviously have many different types and sometimes several of the same species. Software is similar. So you might respond to such a question by answering that you have some word processing software such as Microsoft Word and some games such as Quake and Sim City.

Application software excludes the operating system and those programs that are part of the operating system. In general, you buy application software for your computer. An example might be a word processor or a reference atlas.

 

11

Page 12: Operating Systems Handbook PART 1

What are general categories of application software?In general, software is divided into a number of general categories.

Business Business software allows users to perform tasks related to running a business, such as paying accounts, keeping track of goods and items for sale, inventory software and writing reports.

Examples of business software are Microsoft Works and Lotus Notes.

Education Education software is designed to teach or educate users. These include encylodedias, reference books and instructional programs.

Examples of education software are Encylopedia Britannica and Microsoft Magic School Bus.

Entertainment/Games Entertainment software is designed for you to have fun with! Its purpose is to keep you entertained! This includes games software.

Examples of entertainment software are Microsoft Age of Empires and Sim City 2000.

Utility Utility software is designed for you to perform routine tasks associated with the storage and manipulation of your information. This includes software such as schedulers, clocks, media players and communication tools.

Examples of utility software are McAfee Virus Scan and Arcada backup software.

 

Revision Exercise 1List FOUR things an operating system does.

    

12

Page 13: Operating Systems Handbook PART 1

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.

   

PART TWO : Section 1

13

Page 14: Operating Systems Handbook PART 1

Learning OutcomesAt the end of this section you should be able to

list four typical parts (modules) of an operating system state three functions performed by a real-time executive explain the difference between pre-emptive and co-operative switching discuss the relationship between system performance and system overhead identify the essential operations that need to be performed in order to switch

from one program to another define the terms context switching, system overhead, time-slice, quantum

period and scheduling distinguish between first-in first-out and round robin scheduling

 

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 real-time executive) Process manager Scheduler File manager

 

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

switching between programs hardware device control and programming memory management process management scheduling 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

14

Page 15: Operating Systems Handbook PART 1

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.

 

What is a processor?  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 doesn’t. The processor of the computer runs one process for a short period of time, then is switched

15

Page 16: Operating Systems Handbook PART 1

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 16-bit 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

16

Page 17: Operating Systems Handbook PART 1

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.

 

SECTION TWO : Part 2

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

17

Page 18: Operating Systems Handbook PART 1

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 SchedulingA 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 SchedulingOne 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 processesIt 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.

18

Page 19: Operating Systems Handbook PART 1

 

Revision Exercise 2List 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?

19

Page 20: Operating Systems Handbook PART 1

    

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

    

Identify the following operating systems as either single user or multi-user, and as pre-emptive or co-operative

Operating System Single or multi-user Pre-emptive or co-operative Windows 98    Windows XP    Linux    

SECTION THREE

20

Page 21: Operating Systems Handbook PART 1

Learning OutcomesAt the end of this section you will be able to

explain what a process is and how an operating system manages each process identfy the relationships between the three process states list four items associated with a process control block define the terms thread, process, critical section and semaphore illustrate how access to a shared resource can be controlled using a semaphore discuss the problems associated with critical sections explain the difference between a foreground and a background task

 

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

21

Page 22: Operating Systems Handbook PART 1

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.

 

22

Page 23: Operating Systems Handbook PART 1

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 multi-threading.

 

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

23

Page 24: Operating Systems Handbook PART 1

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 3What 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?

  

24

Page 25: Operating Systems Handbook PART 1

 

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.

   

SECTION FOUR

25

Page 26: Operating Systems Handbook PART 1

Learning outcomesAt the end of this section you should be able to

describe how an operating system is intially loaded given a set of characteristics, determine the type of operating system as batch,

real-time, ime-sharing, interactive or embedded state an example of a shell

 

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.

26

Page 27: Operating Systems Handbook PART 1

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.

INTER-ACTIVE These allow the modification and 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,

27

Page 28: Operating Systems Handbook PART 1

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 self-contained 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.

28

Page 29: Operating Systems Handbook PART 1

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 4Briefly 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?

   

29

Page 30: Operating Systems Handbook PART 1

SECTION FIVE

Learning OutcomesAt the end of this section you will be able to

define the terms file, cluster, inode, symbolic link describe a typical structure for the root file system list four typical entries for a root file entry explain how free space might be managed list the file systems supported by Windows describe what access or file control permissions are and why they might be

needed explain how the file space may become fragmented, what effect this might

have on performance, and how the problem might be corrected

 

ALL ABOUT FILE MANAGEMENTIn 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 CloseCreateCopyRenameList

In addition, operations on single data elements within a file are supported by

ReadWriteSeek

30

Page 31: Operating Systems Handbook PART 1

 

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

FilenameLocation of file on secondary storageLength of fileDate 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 case-sensitive.

 

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 File Type.bas basic source program.c c source program.dll system library.doc Word document.exe executable program.txt 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.

31

Page 32: Operating Systems Handbook PART 1

 

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 fileBeginning cluster numberLength of file in bytesType of fileCreation date and last modified rightFile permissions (an access control list)

 

32

Page 33: Operating Systems Handbook PART 1

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.

FAT32 An updated version of the FAT system designed for Windows 98. It supports file compression and long filenames.

33

Page 34: Operating Systems Handbook PART 1

NTFS 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.

 

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 file-system only as permissions are not supported with FAT), additional file permissions are available.

In UNIX, three groups of permissions apply to every file. The first group of permissions defines those of the owner of the file, and are a combination of the read, write and execute permissions. The second group of permissions defines those permissions for a group of users. The third group of permissions defines the permissions for everyone else except the owner and group members.

 

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).

34

Page 35: Operating Systems Handbook PART 1

 

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 5List FOUR operations that are associated with files.

    

What is a File Control Block?

   

What is a root file-system?

   

35

Page 36: Operating Systems Handbook PART 1

What is a cluster?

   

How does an operating system manage free space?

   

What is an access control list?

   

36

Page 37: Operating Systems Handbook PART 1

SECTION SIX

Learning OutcomesAt the end of this section you will be able to

describe the basic differences between line based and screen based editors explain the program translation sequence using a suitable diagram list four features provided by an assembler compare the operation of a compiler and an interpreter explain the operation of a linker describe the difference between a locator and a loader detail a scenario where a cross assembler would be required

 

SOFTWARE TOOLSThis section introduces you to some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the operating system (or another) can run.

 

EDITORSEditors are programs used to create documents. They provide facilities for

Loading/Editing/Saving of source documents Change/Replace text strings, characters or words Find/Search for text strings, characters or words Move/Copy/Delete blocks of text

Editors consist of two basic types, line based and screen based.

Line Based EditorsThe line based editor presents a single line for editing. Each line may be called up in turn. The left and right cursor keys may be used to edit the line of text. Standard facilities exist to perform search/find/replace/move items of text. These types of editors are cheap, provide a basic set of functions, and are reasonably small in terms of code size. A limited number of commands are offered that people can quickly learn. Examples of line-based editors are edlin and vi.

Screen Based EditorsThese provide a range of enhanced features, and editing is performed using the whole screen (multiple lines are shown at a time). The cursor may be moved in any of the four directions. Provision is made for scrolling the text when the cursor exceeds the boundary of the display window. Screen based editors are normally written for specific types of computers, and thus tend to be more costly, but provide a greater range of facilities, and can be more readily customized for particular applications (such as standard mail/form generation).

37

Page 38: Operating Systems Handbook PART 1

The screen editors may be command driven, where all functions to be performed are entered as commands on a single command line, or may be key generated, where pressing certain keys perform the desired function. Command driven editors tend to be the easiest and quickest to learn.

By displaying more than one line at a time, screen editors facilitate the speedy modifications required for source documents. Examples of screen-based editors are Notepad, WordPad, and Word 2000.

 

THE PROGRAM TRANSLATION SEQUENCEIn developing a software program to accomplish a particular task, the program developer chooses an appropriate language, develops the algorithm (a sequence of steps, which when carried out in the order prescribed, achieve the desired result), implements this algorithm in the chosen language (coding), then tests and debugs the final result. There is also a probable maintenance phase.

When you write a program in a source language such as Pascal or C, the program statements (in the source text file) needs to be converted into the binary bit-patterns which make sense to the target processor (the processor on which the software will be run). This process of conversion is called translation.

 

ASSEMBLERSAssemblers are programs that generate machine code instructions from a source code program written in assembly language. The features provided by an assembler are,

allows the programmer to use mnemonics when writing source code programs. variables are represented by symbolic names, not as memory locations symbolic code is easier to read and follow error checking is provided changes can be quickly and easily incorporated with a re-assembly programming aids are included for relocation and expression evaluation.

What is an assembler mnemonic?A mnemonic is an abbreviation for a machine code statement. During the translation phase, each mnemonic is translated to an equivalent machine code instruction.

MOV AX, 0ffh

38

Page 39: Operating Systems Handbook PART 1

is translated to the binary bit patterns

10111000 (this means MOV AX)11111111 (this is ff hexadecimal)00000000 (this is 0)

What are assembler pseudo-ops?Assemblers also provide keywords called pseudo-ops. These keywords provide directions (hence they are also called assembler directives) to the assembler. Pseudo-ops do not generate machine instructions. The following pseudo-op

DB 'ab'

allocates and initializes a byte of storage for each character of the string, thus two bytes will be allocated, one initialized to the character 'a' whilst the other byte would be initialized to the character 'b'.

 

What type of code does an assembler generate?The assembler does not normally generate executable code. An assembler produces an object code file that must be further processed (linked) in order to generate a file that can be executed directly.

An example assembly language program

; H means hexadecimal valuesORG 0100H ;This program starts at address 0100

hexSTATUS: DFB 23H ;This byte is identified as STATUS, and is

;initialized to a value of 23 hexCODE: LDAA STATUS ;The label called CODE is identified as a

;machine code instruction which loads the

;A accumulator with the contents of the

;memory location associated with the label

;STATUS, ie, the value 23JMP CODE ;Jump to the address associated with

CODE

 

WHAT IS A HIGH LEVEL LANGUAGE?In a HLL, one English type statement represents a sequence of machine code statements. Examples of a high level language are Pascal, Basic and C. High level languages are useful in developing complex software, as they support complex data structures, and increase programmer productivity (the number of lines of code generated per hour). Unlike assembly language, it also means that the programmer does not need to learn the instruction set of each computer being worked with.

39

Page 40: Operating Systems Handbook PART 1

All HLL statements must be converted to machine code in order for a processor to run them. There are two ways in which high level language statements are converted into machine code, either at runtime (interpreted) or before runtime (compiled).

 

WHAT IS AN INTERPRETER?The source code program is run through a program called an interpreter. Each line of the program is sent to the interpreter that converts it into equivalent machine code instructions. These machine code instructions are then executed. The next source line is then fetched from memory, converted and executed. This process is repeated till the entire program has been executed.

Examples of interpreted languages are BASIC (Beginners All Purpose Symbolic Instruction Code) and Java.

An example BASIC program

10 REM Program by ..................20 REM Initialize variables30 Time = 640 Speed = 50050 Distance = Time * Speed60 PRINT Distance70 END

 

WHAT DOES A COMPILER DO?Compilers accept source programs written in a high level language and produce object code programs that are then linked with standard libraries to produce an executable file. Compilers generate code that is reasonably fast, but is target specific (it only runs on a particular computer system).

The source program is written using an editor. Most compiled languages do not use line numbers.The example on the right is a C program.

 

#include <stdio.h>main {

printf("Hello world\n');return 1;

}

Once the program has been written using the appropriate source statements, it is then passed to a compiler that converts the entire program into object code. The object code cannot be run on the computer system, so the object code file is then sent to a linker that combines it with libraries (other object code) to create an executable program. Because the entire program is converted to machine code, it runs very quickly.

 

40

Page 41: Operating Systems Handbook PART 1

WHAT DOES A LINKER DO?The BASIC interpreter already has its own libraries for Input and Output (I/O), so BASIC programs don't need linking. The source program is converted directly into executable code.

Compiled languages (as well as assembled) need both linking and loading. The output of compilers and assemblers are stored in an intermediate format called object code. This is stored as a file on disk. The object code must be combined with other object code files or libraries (special object code files) before execution.

The linker combines the programs object code with the runtime object code files (for handling files, screen output, the keyboard etc) into an executable format.

The types of files that exist at each phase of the program translation sequence are,

myprog.c source code programmyprog.obj object code produced by compilermyprog.exe executable file produced by linker

 

LOADERSIt is normally the responsibility of the Operating System to load and execute files. The part of the operating system that performs this function is called a loader.

The absolute loaderThere are two types of loaders, relocating and absolute. The absolute loader is the simplest and quickest of the two. The loader loads the file into memory at the location specified by the beginning portion (header) of the file, then passes control to the program. If the memory space specified by the header is currently in use, execution cannot proceed, and the user must wait until the requested memory becomes free.

The relocating loaderThe relocating loader will load the program anywhere in memory, altering the various addresses as required to ensure correct referencing. The decision as to where in memory the program is placed is done by the Operating System, not the programs header file. This is obviously more efficient, but introduces a slight overhead in terms of a small delay whilst all the relative offsets are calculated. The relocating loader can only relocate code that has been produced by a linker capable of producing relative code.

A loader is unnecessary for interpreted languages, as the executable code is built up into the memory of the computer.

 

WHAT IS A LOCATOR?Program locators convert the output of the linker (the executable file) into an absolute

41

Page 42: Operating Systems Handbook PART 1

load format file. This type of file will eventually reside in specific memory locations, and is used to embed software into EPROM chips.

 

WHAT DOES A CROSS REFERENCE UTILITY DO?These allow the programmer to generate a table that lists all symbols, labels, names, modules etc. Each occurrence is listed, and generally the source program is given line numbers to facilitate this process.

The cref utility should detect data variables and assign symbols to them, presenting a variety of formats (by name, module etc). The cref table is useful in debugging, as the programmer can ascertain in which modules a particular variable is referenced.

 

WHAT IS A DISASSEMBLER?Disassemblers convert machine code instructions into mnemonic opcodes and operands, facilitating debugging at the machine code level. The more sophisticated disassemblers provide for

generation of symbols and labels cross reference tools disassembly of memory or disk files output of disassembly to disk file relocation information

 

WHAT ARE DEBUGGERS AND MONITORS?A monitor is a small program that allows machine code access. A monitor provides,

manipulation of memory manipulation of processor registers simple trace, single step, go commands breakpoints maybe a disassembler and inline assembler disk/tape i/o

Debuggers provide much the same facilities as monitors, but generally provide a wider range of features,

provision for HLL source debugging split screens, windowing reference by symbols, module names and labels radix changing dynamic tracing of hardware interrupts Operating System calls and stack tracing

 

42

Page 43: Operating Systems Handbook PART 1

WHAT IS A CROSS ASSEMBLER?Cross assemblers allow a programmer to develop machine code programs on one computer system for another system (target). In this way, a programmer can develop a machine code program for a Macintosh computer system using an IBM-PC. The cross-assembler running on the PC generates the machine code instructions necessary for the Macintosh.

 

Revision Exercise 6List FOUR features of a line based editor.

    

What does an assembler do?

   

What does a linker do?

   

How does an interpreter differ from a compiler?

   

What is a cross-assembler?

   

43

Page 44: Operating Systems Handbook PART 1

SECTION SEVEN

Learning OutcomesAt the end of this section you will be able to

identify common mouse cursors select and drag items using the mouse explain the difference between tiling and cascading windows given a screenshot, identify the key elements of a window switch between applications using the task bar or the ALT-Tab key

 

Basic Features of Graphical Interfaces Graphical systems use windows to display information and thus allow more than one window to be displayed at any time. Each window is associated with a running program. User input is derived from a keyboard and mouse.

 

The mouseThe mouse, invented in 1963 at the Stanford Research Institute by Douglas Engelbart, has done much to enhance the use of the personal computer. Engelbart's prototype, made of wood, with metal disks for rollers that detected the motion of the mouse, was further developed by Xerox at it's Palo Alto Research Center in the early 1970's under the direction of Jack S Hawley.

Most mice have two or more buttons, which users depress to select items from a menu or click on graphical objects on the computer screen, thus sending commands to the computer.

The mouse is held in the hand and moved across a flat surface. As the mouse is moved, its movement is detected and translated into both X and Y movements, which updates the indicated position of the mouse pointer on the computer screen accordingly.

 

The mouse cursorThe position of the mouse is shown on the screen as the mouse cursor and is denoted by a number of symbols.

Standard mouse pointer

44

Page 45: Operating Systems Handbook PART 1

Indicates computer is busy

 

Selecting items with the Mouse

Single ClickA single mouse click refers to moving the mouse pointer over the desired item and quickly pressing the left mouse button once.

Double ClickA double mouse click refers to moving the mouse pointer over the desired item and quickly pressing the left mouse button twice in rapid succession.

DragA drag or move operation is performed by moving the mouse pointer over the desired item and holding the left mouse button down. The mouse is then used to move to drag the object or window to the new position, then the left mouse button is released.

 

Window FundamentalsIn a graphical operating system, information is represented in graphical ways. Little symbols or pictures (called icons) are used to display programs or information. Information is displayed inside windows, each of which has similar properties.

It is possible to have more than one window on the screen at one time, and windows may be cascaded (on top of one another) or tiled (all displayed at once and all visible).

In this picture, the windows have been cascaded. This makes each window appear on top of each other, one after the other.

The front most window is considered to be the active window, ie, the window to which the users commands will be sent.

In Windows95 or WindowsNT, the titlebar of the window is shown in the default color Blue.

45

Page 46: Operating Systems Handbook PART 1

In this picture, the images have been tiled.

This makes all windows visible at the same time, but resizes the dimensions of each window so that they all fit on the available screen space at once.

Tip: To cascade or tile all windows on the desktop area, right mouse click on an empty portion of the taskbar and select Cascade Windows or Tile Windows from the menu.

 

Window PropertiesEach window has the same properties and behaves the same way. This provides a consistent interface to the user, as all commands are the same for each window and the operations that the user performs on each window are identical.

In the diagram below, we see the basic window as presented by Windows 95 or Windows NT. Each property is listed on the diagram, and below is an explanation for each of the window components.

46

Page 47: Operating Systems Handbook PART 1

The Title BarThis normally displays the name of the program associated with the window. If the background color of the title bar is blue, the window is active and any user commands will be processed by that window. You can also toggle between a maximized window size and the windows normal size by double clicking in the title bar area.

The Control MenuClicking on the Control Menu pops up a small Window of selectable options, which include the operations of Restore, Move, Size, Maximize, Minimize and Close the Window.

The Horizontal and Vertical Scroll BarsWhen the amount of information displayed in the window exceeds the viewing space of the window, scroll bars are automatically to the side and bottom of the window. This allows the user to scroll the contents of the window in order to view the remaining information. Arrows are used to indicate the direction of scrolling on the scroll bar, and an indicator bar represents the relative position of the viewing area compared to the total size of the information.

Clicking on the arrows associated with the scroll bar move the viewing window up or down one line, or across or back one character position. You can also click on the small indicator bar within the scroll bar and drag it with the mouse to quickly scroll the windows contents.

The Minimize Maximize Close Window ButtonsThese buttons are located on the top right corner of each window. Clicking on them once performs the desired action associated with the button.

The minimize button reduces the window and places it on the taskbar at the bottom of the window.

The maximize button expands the window to fill the entire desktop screen area.

The close button closes the window.

Tip: To minimize all windows on the desktop area, right mouse click on an empty portion of the taskbar and select Minimize all Windows from the menu.

 

The Menu Bar The menu bar presents a number of options that the program associated with the Window supports.

Clicking on an option on the menu bar will popup a submenu of choices that you can select from.

47

Page 48: Operating Systems Handbook PART 1

 

The Windows BordersThe windows borders show the dimensions of the window. Any window can be resized, either made smaller or larger, by dragging the window border appropriately.

To make the window taller or shorter:Move the mouse pointer to either the top or bottom window border, and when it changes to a resize arrow , then hold the left mouse button down and drag the window border to its new position, then let release the left mouse button.

To make the window narrower or widerMove the mouse pointer to either the left or right window border, and when it

changes to a resize arrow , then hold the left mouse button down and drag the window border to its new position, then let release the left mouse button.

 

Moving a WindowA window can be repositioned on the desktop screen display area by moving the mouse cursor into the title bar area, then holding the left mouse button down and dragging the window to the new position, then releasing the left mouse button.

 

Switching between WindowsWhen you have multiple windows displayed on the desktop screen area, you can switch between windows by clicking on the programs icon on the taskbar or pressing ALT-TAB keys on the keyboard. When you press ALT-TAB, it will pop up a window of the available programs. Hold the ALT key down, and pressing the tab key will move the selection to the next window in the list. When the desired window is highlighted, release the ALT key and that window will become active.

Clicking on the applications icon on the taskbar can also do switching to another application. The following picture shows the Windows taskbar, located at the bottom of the screen.

This picture shows the ALT-TAB pop up window, which list the available programs the user can switch to.

48

Page 49: Operating Systems Handbook PART 1

SECTION EIGHT

Learning OutcomesAt the end of this section you will be able to

given a screen capture, identify radio buttons, text boxes, check buttons, dialog boxes, list boxes and drop down list boxes

use toolbars and tab controls to select items or perform tasks

 

Window objects and componentsThis section discusses window options such as buttons and dialog boxes.

 

49

Page 50: Operating Systems Handbook PART 1

Text BoxesText boxes allow you to enter text information. To enter text, first click inside the text area using the mouse, and the cursor will change to a vertical flashing bar | showing you that text can now be entered.

In this image, a text box allows the user to specify a file to find on the computer. The name of the text box entry field is called Named:

 

Radio ButtonsRadio buttons allow users to select one of a number of options from a selection. In the following image, a choice between Tiled and Centered is offered. A radio button is enabled when there is a black dot in its center. A radio button is disabled when it is empty. To enable a radio button, simply click once on it. To disable a radio button that is enabled, simply click once on it. It works like a toggle switch.

 

Check BoxesCheck boxes allow users to select one or more options from a selection. In the following image, the options Show window contents while dragging, Show icons using all possible colors and Stretch desktop wallpaper to fit the screen are all enabled.

A check box is enabled when it has a tick in it, when a check box is empty, that option is not selected. To enable a check box, simply click once on it. To disable a check box that is enabled, simply click once on it. It works like a toggle switch.

50

Page 51: Operating Systems Handbook PART 1

Dialog BoxesDialog boxes allow you to make choices and enter data. They combine text boxes with radio buttons and check boxes.

To close a dialog box, press the ESC key.

List BoxesList boxes present a number of choices. You select one by double-clicking on the item you want. Often the list of choices is in a scrollable window box.

In this example, the Help dialog box of Windows lists a number of help topics that the user can double-click on to reveal the help associated with that item.

Drop Down List BoxesTo minimize the amount of screen space, list boxes can sometimes be arranged as a drop down list box. This displays a single item, but when the list box is clicked on, the range of items pops up in a secondary window.

51

Page 52: Operating Systems Handbook PART 1

A drop down list box is shown below. In this example, it is part of the Dialog box associated with the Display Properties.

Notice the symbol at the end of the box. Clicking on this symbol reveals the list of options.

 

Tab ControlsTab controls allow a number of different dialog boxes associated with a device to be presented as a single combined control. For instance, if we looked at the screen display in Windows, there are so many things that can be changed, like screen saver, wall-paper, size and resolution, video display driver and so on.

Putting all of these on a single dialog box is cumbersome and there is just not enough screen real estate. So, a number of dialog boxes are used, but they are combined using the tab control. It looks like multiple sections, and each tab has a heading. Clicking on the tab item reveals the dialog box associated with that tab.

52

Page 53: Operating Systems Handbook PART 1

In this example, the tab control for the Windows desktop properties is displayed. Note there are FOUR distinct dialog boxes; the current choice is Screen Saver.

 

ToolbarsToolbars appear on a number of windows and application programs. An example is the My Computer window.

The toolbar is displayed underneath the Menu Bar Options of the window. An expanded view looks like

The toolbar consists of a number of icons (little pictures), each representing a command. As the mouse cursor is moved along each icon, a text description will pop up revealing the available control that is underneath the mouse cursor.

Toolbars provide shortcuts to regularly used operations like cut and paste, close, and Help.

53

Page 54: Operating Systems Handbook PART 1

SECTION NINE

Learning OutcomesAt the end of this section you will be able to

list the system requirements for Windows 95, Windows NT and Windows 2000 Professional

state the general features of Windows operating systems

 

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 higher4MB memory or higher [8MB recommended]35-40MB disk space3.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

54

Page 55: Operating Systems Handbook PART 1

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

133MHz Pentium compatible processor 64MB RAM 2GB Hard disk with 650MB available free space Single or dual processor systems

  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 installationGraphical interfacePlug and play supportAdd/Remove programsNetworking 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.

55

Page 56: Operating Systems Handbook PART 1

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 SupportWindows 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 ProgramsAdding 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 SupportWindows supports a wide number of protocols and networks. This allows easy connection to both Microsoft and non-Microsoft networks.

56

Page 57: Operating Systems Handbook PART 1

Internet Ready: Dial up networking and Internet ExplorerWindows 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.

57