Operating Systems - Computer Studies Form 1 Notes

Share via Whatsapp


Definition.

  • An Operating system is a set of programs that is used to manage the basic hardware resources of a computer.
  • This is the main program that controls the execution of user applications, and enables the user to access the hardware & software resources of the computer.
  • When the computer is switched on, the OS programs run & check to ensure that all parts of the computer are functioning properly.


Operating System’s Platform.

  • In a data processing environment, the user sees a computer as a group of application programs that enable him/her to accomplish specific tasks.
  • However, application programs do not use the hardware devices directly. They send messages through the operating system which has the capability to give instructions to the hardware to perform a particular task.
  • The user communicates his/her intentions to the OS through the use of a special instruction set known as Commands.
  • As in this diagram, the OS is a layer of software on top of the bare hardware, and is used to manage all parts of computer hardware & also act as an interface between the user & the computer.
  • The OS monitors & controls computer operations so that the user can do useful work on the computer, and it also enables Application programs use the hardware in a proper, orderly and efficient way.
  • An OS consists of a special program called a Supervisor (Kernel/ Executive), which is stored in ROM of the Main Memory. The Supervisor/Kernel contains the most necessary commands and procedures & controls the running of all other programs, each performing a particular service.
    NB. The programs that make up the Operating system are too large to fit in main memory at one time. These programs are usually installed on a direct access backing storage device, such as the hard disk.
  • When the Supervisor needs a particular program, it is read from the disk & loaded into the RAM memory, where it can be executed.


Reasons why an Operating system is needed in a computer (why operating systems were developed).

  1. Modern computer systems are so complex & fast such that they need internal control.
  2. To ensure that the full system software facilities are readily available.
  3. Due to the complexity of systems, jobs need to be controlled in what they are allowed to do for security.
  4. To increase the throughput, i.e., to increase the amount of data that can be processed through the system in a given period of time.
  5. Improve communication between the user & the computer.
  6. To make complex tasks very simple for the user to carry out.
  7. It helps the computer to correct any problem that might occur. 
    - When an error occurs that can cause the computer to stop functioning, a diagnostic message is displayed.
    - The meaning of the message is then checked in the computer 
    operations manual.
  8. Reduces job setup time.
    - When one job is running, other programs can be read onto the job queue. The Input/Output devices can also be made ready without delay.
  9. Most computers allow many programs to be run & also many users to use the system at the same time.


Devices/Resources Under the Control of an Operating System.

  • A computer is composed of a set of software-controlled resources that enable movement, storage and processing of data & information.
  • As a resource manager, the OS manages the following basic resources/ devices: -
    1. Processor.
    2. Main memory (RAM).
    3. Secondary storage devices.
    4. Input/Output devices and their Ports.
    5. Communication devices and their Ports.
    6. Files.


Functions of an Operating System.

- The OS creates a working environment in which the user can run programs. The general functions of the operating system are:

  1. Processor management.
    - The processor is a scarce resource. It executes tasks called processes.
    - A Multi-tasking computer system can run several applications simultaneously. At times, several tasks may require processing, hence creating competition. However, the CPU can only execute one program at any one time.
    - Therefore, access to the CPU must be carefully controlled & monitored. The OS must decide, which program will be allowed into the system, and for how long.
    - To do this, the OS arranges the tasks according to priority and has the ability to stop a particular task to allow the processor to service another task.
  2. Memory allocation & loading of programs.
    - Programs must be loaded into memory before they can be executed, and moved out of memory when they are no longer required. Therefore, before processing starts, the OS ensures that the programs are transferred into the available memory location in the Main memory from the backing store, e.g. a disk.
    - At any one given time, a number of tasks may require the memory so that they can be accessed & processed by the computer. The computer memory is a scarce resource, and therefore, the OS must determine which task will remain in memory awaiting for execution and which one will be sent back to secondary storage to wait.
    - The OS keeps track of what parts of memory are in use and by which program, and what parts are free.
    - The OS also handles the data files used by the programs that are being executed by the CPU.
    - In addition, the OS ensures that storage space is provided for data generated by programs & during data transfer operations such as, disk copying or printing.
  3. Input/Output devices & ports management.
    - Every computer has many Input & Output (I/O) devices. The OS controls the input from & output to the various devices. It also tries to monitor the state of each I/O device and signals any faults detected.
    - During the course of their execution, programs will request the use of an Input or Output device. In a multi-user system, conflicts are likely to occur when one program requests a device that is being used by another program. Therefore, the OS will control allocation of I/O devices and attempt to resolve any conflicts that arise.
    - Because most input/output devices are slower than the processor, the OS has to control the flow of data from the time of input to the time the user receives it as information. It ensures that the right data reaches the processor at the right time.
    - The OS also defines the various input/output ports found on the computer, e.g., printer port.
  4. Management of secondary storage devices.
    - The OS manages the storage & retrieval of data on secondary storage devices. It also utilizes the free space on hard disks to enhance the performance of the computer by temporarily holding tasks on it that were in RAM ready for processing but have to wait for sometime.
  5. Management of communication devices & ports.
    - Communication refers to how the various devices and programs in & out of the computer system send & receive messages from one another and from the processor.
    - The OS controls the communication process between the various tasks & the computer.
    - To achieve external communication, an external device is usually connected to a communication port using cables or wireless communication media.
  6. File management.
    - The OS is concerned with the logical organization of the information (the File System) and provides a means through which files can be sorted, retrieved & shared.
    - It also provides a means of protecting data files & programs against unauthorized access and corruption.
  7. Job scheduling.
    - The OS arranges & loads programs in order to provide a continuous sequence of processing & also provide the appropriate responses to events.
    - The processor can handle only one task at a time. Therefore, in a situation where more than one application program is occupying the main storage, the OS has to determine which task will be processed first and ensures that the one that is currently being processed is closely monitored to avoid wasting time in the processor.
    - The jobs are allocated priorities so as to ensure that there is continuous processing until all the jobs within the memory are executed. This ensures that the CPU does not remain idle at any given instance.
    - Some of the job scheduling functions include:
    • Controlling the loading & running of programs.
    • Communicating directly with users and/or the operator.
    • Dealing with user commands to organize files and run programs.

    NB:Job is a group of tasks taken as a unit of work for a computer, e.g., one or more computer programs, files, & instructions, to the operating system.
  8. Job sequencing.
    - The OS keeps a list of jobs/tasks currently being run and monitors them as they move in & out of the processor. It also arranges them in a particular order to make it easy for the processor to execute them and to know how & when to fetch instructions & data for each task.
  9. Resource control and allocation.
    - The OS controls the selection & operation of hardware devices used for input, output and storage.
    - The OS determines which task uses a particular resource and at what time. To do this, it gives each resource a unique identification number called an Interrupt number so that, when two tasks request to use a resource at the same time, the one with higher priority interrupt is granted control.
    - This prevents an undesirable situation called deadlock that occurs when a particular task holds a needed resource & refuses to release it for use by other tasks.
  10. Error reporting & correction routines.
    - The OS has many ways of reporting to the user of any errors that occur during program execution. It does this by monitoring the status of the computer system & performing error checks on both hardware and software.
    - When the user makes an error, the OS through the Kernel determines the cause of the error, and prints diagnostic messages on the screen suggesting appropriate routines of how the error can be corrected.
    - In case of a fatal error that cannot be corrected, the program will be suspended permanently. E.g., the user program will prematurely terminate when it encounters an illegal operation, such as, dividing a no. by 0 or if it attempts to read a data file that had not been opened.
  11. Interrupt handling.
    - An Interrupt is a break from the normal sequential processing of instructions in a program.
    - Each hardware device communicates to the processor using a special number called the Interrupt Request number (IRQ). Therefore, when an interrupt occurs, control is passed to the Kernel, which determines the cause of the interrupt. The processor stops executing the current program to wait for the corrective response of the user. Control is returned to the program that was interrupted once corrective action has been taken.

    Some causes of Interrupt.
    1. An Interrupt caused by Power failure.
      - The Kernel saves vital information using the dying power supply so that it can be restarted when power is returned.
    2. Arithmetic or logic errors.
      - When the ALU detects that an error has occurred, (e.g., the output may be requested to a non-existent device) it generates a signal that causes an interrupt. Control is transferred to the Kernel, which indicates the appropriate error correction routines.
    3. Hardware malfunction, e.g. parity errors.
      - The I/O control for each device & its associated hardware normally takes care of parity checking. If a parity error is detected, the Kernel is notified by an interrupt.
      - Device driver - a software that the OS uses to control a specific piece of hardware.
  12. Interfaces the user to the system’s hardware.
    - The OS provides quick means of communication between the computer user & its programs.
    - The user requests the services of the OS by use of commands & the OS communicates the messages regarding the processing to the user through, either the screen or printer. Thus, a form of ‘conversation’ is established between the OS & the computer user.
  13. Logging & accounting.
    - The OS keeps records (internal logs) on how the computer’s resources, e.g., CPU time, memory usage, & the peripherals are being used. It also keeps a complete record of all that happens during processing (usually in the form of a printed log).
  14. The OS protects hardware, software & data from improper use. They ensure that application programs use the hardware in an efficient way.

Examples of operating systems:

  • DOS (Disk Operating System).
  • Windows operating system.
  • MacOS (Macintosh)
  • Unix.
  • Linux.


Characteristics of an Operating System.

An OS should have the following characteristics:

  1. Reliable.
    - The OS should be at least as reliable as the hardware on which it runs. If a software or hardware error occurs, the system should be able to detect the error and either try to correct the problem or try to minimize the damage to the users of the system from the error.
  2. Protected.
    - A user doesn’t want other users to interfere with him. Therefore, the system should protect users from being affected both by errors of other users and by malicious attempts at tampering.
  3. Efficient.
    - The OS is usually a complex program that uses a large part of the hardware resources for its own functions. The resources consumed by the OS are not available for users.
    - Therefore, the system itself should be very efficient, & should manage user’s resources to minimize their idle time.
  4. Convenient.
    - Systems should be designed keeping users in mind.
    - Therefore, an OS should be flexible & convenient to use. In addition, in order to allow the sharing of resources, the OS must be in complete control of the allocation of the computer resources.
  5. Predictable.
    - User demands on the system are generally unpredictable. At the same time, users prefer to get service that does not vary widely over extended periods of time. An estimate as to when the user will get his input should be given.


Classification of Operating Systems.

- The OS determines determine the type of processing that a computer system is able to perform, since it controls the allocation & use of the computer resources.

- Operating systems can be classified according to:

  1. Number of tasks that the system can perform concurrently.
    • Single-tasking (program) operating system.
    • Multi-tasking operating system.
  2. Number of users the system can support at the same time.
    • Single-user operating systems.
    • Multi-user operating systems.
  3. Human Computer interface (i.e., how the user & the computer interact).
    • Command line.
    • Menu driven interface.
    • Graphical user interface (GUI).

Classification According to Tasks Handled Concurrently.

Single-tasking OS.

  • Single-tasking OS allows only one user-program in the main memory to be processed at a particular time.
  • This means that, the user can only run one interactive program at a time. The user must then exit from the program before loading & running another program.

Example of a single user OS;

  • MS-DOS.

Multi-tasking (Multiprogramming) OS.

  • A Multi-tasking OS allows a single CPU to execute/process more than one program, all of which are in memory, at the same time.
  • Each program is allocated a time-slice. In this case, the programs take turns at short intervals of processing time. The CPU switches its attention between programs as it receives requests for processing, executing statements from one program, and then from another.
  • The programs to be run are loaded into the memory and the CPU begins execution of the first one. When the request is satisfied, the second program is brought into memory and execution starts on the second program, and so on.
    Note. In multi-programming, the computer is able to work on several programs at the same time.
  • It works on the programs on sequence, one after the other, and that at any given instant it executes instructions from one program only. However, the computer works so quickly that it appears to be executing the programs simultaneously.

Classification According to Number of Users.

Single-user OS.

  • A single-user OS is designed to be used by only one person. It allow only one user/person to operate the machine at a time in an interactive, conversational mode, and runs only one user program at a time, e.g. MS-DOS.

Multi-user (or multi access) OS.

  • A multi-user OS allows more than one user ( many people) to interactively use/access the computer at the same time.

    Examples;
    • UNIX,
    • Novell Netware,
    • Ms-Windows 2000,
    • Ms-Windows NT,
    • Linux, etc

Classification According to Human Computer Interface (HCI).

  • The term Human Computer Interface (HCI) refers to the method of interaction between the computer & the user, and determines how easily the user can operate the computer.
  • The HCI enables communication to & from between the user and the computer.

User-friendliness.

  • HCI is expected to be “user-friendly”, i.e., it should be one that the end-user finds helpful, and easy to learn & use.

Features/characteristics of a user-friendly HCI.

  1. It should be relatively easy for the user to try to start using the system.
  2. The system should be self-contained, so that the user is not forced into accessing manuals.
  3. The amount of effort & the information required for the user to get the system complete required tasks should be minimal.
  4. The system should be robust & reliable, i.e., the user should be protected from unexpected system actions, including system failures.
  5. The system should be able to adjust to different levels of expertise between users & also as users grow in competence.
  6. The user should be made to feel in control of what is going on.
  7. The system should behave in a logical & consistent manner, enabling the user to reason about what is going on and apply what has been learned.

Types of User interfaces.

- There are different types of Human Computer Interfaces: -

  1. Command driven interface.
  2. Menu driven interface.
  3. Graphical User Interface (GUI).

Command driven interface.

  • This is an interaction between the user & the computer that requires the use of commands
  • The user types a command at the prompt found on a command line. The computer then reads instructions from the command line and executes them.

    Example;

    To copy a file called Fruits.Dat from Hard disk C to Floppy disk A using MS-DOS; type C:\ >COPY Fruits.Dat A:\ (press the Enter key for the command to be executed).
  • Commands enable the user to quickly instruct the computer what to do.
  • Command-driven software is more flexible, but it is more difficult to learn. The user must know what commands are available, what they do & how they should be typed. For this reason, commands are most popular with experienced technical persons, such as computer Operators, Programmers or in situations where the end-user continually works with the same program and has therefore mastered the commands.
  • To make commands more user-friendly, the following points need to be observed: -
    1. The command words used should be descriptive VERBS that clearly convey the intended action, e.g., PRINT, COPY, RENAME, DELETE, etc.
    2. Unique abbreviations should be provided for more experienced users, e.g., PRI, COP, REN, DEL, CHKDSK, etc.
    3. Multiple items on a single command line should ALWAYS be separated by blank spaces
      E.g., PRINT can be used in the following ways: -
      • PRINT Report1 prints the named document on the default printer.
      • PRINT Report1 Report2 Report3 prints the three documents on the default printer.

Examples of Command line interfaces:

  • MS-DOS,
  • Early versions of PC-DOS, OS/2, and UNIX.

Disadvantages of using command driven interfaces

  • They are more difficult to learn.
  • The user must know the command to type.
  • It is less user-friendly.
  • It is not easy to use, i.e., one is required to master the command format/syntax.

Menu driven interface.

  • This type of interface provides the user with a list of program commands displayed on the screen to choose from & a simple means of selecting between them.
  • To activate a choice in the menu, one can use the Enter key, or move the cursor until it is positioned at the desired choice & then press the activation key so that the system can start acting upon the information given.
  • This interface is suitable for beginners and infrequent users who may have difficulties in remembering commands.

    There are 2 types of menus: -
    • Pull-down menus are special types of menu used mostly in Windows.
    • Pop-up menus & Pop-down menus. These menus are made to appear above or below an item on the screen in order to elicit/obtain a choice from a user.
  • Later versions of DOS have a menu driven interface called the DOS Shell or DOS Editor.

Advantages of Menu driven interfaces

  • Menus provide many options to select from.
  • The user is presented with a choice and therefore, does not need to master any commands.
  • They are easier to use.

Graphical User Interface (GUI).

  • This is an interaction between the user & computer that involves issuing of commands to the computer by activating certain small graphic images displayed on the screen called Icons.
  • To issue a command, the icons can be selected using a pointing device like a Mouse.
  • GUI is mostly found on Workstations or PCs fitted with graphic adapters able to support highresolution graphics.

Examples of GUI based OS;

  • Presentation manager of OS/2,
  • Ms-Windows,
  • Linux,
  • Apple Macintosh.

Features of a graphical user interface. 

  • Programs are represented graphically by use of Icons.
  • Commands are selected and issued using pointing devices, e.g., Mouse, trackball.
  • There is use of pull-down menus.
  • Programs open by displaying windows.

Advantages of using GUI based OS

  • They are user friendly.
  • Easy to learn & use.


Factors to Consider when Choosing an Operating System.

- The following factors should be considered when choosing an operating system for a computer;

  1. Hardware configuration of the computer, e.g., RAM memory size, hard disk capacity, type of processor, etc.
  2. Basic design of the computer, - i.e., is it an IBM or IBM compatible, or an Apple computer?
  3. Hardware compatibility.
  4. User needs (requirements), i.e., the applications intended for the computer.
  5. User friendliness or Human computer interface, i.e., is it Command line based, Menu-driven or a Graphical user interface?
  6. Availability in the market, e.g. Microsoft Windows based OS are very common.
  7. Portability.
  8. Cost how expensive the OS is.
  9. Reliability, i.e., can it run without crashing or hanging (stop responding to commands).
  10. The method of communication with the computer, e.g. the number of peripherals.
  11. The method of operating the computer. 


File Management

  • Medium of storage employed by most microcomputers is often disk. Data that is stored on disks are often held in a file. The latter is often referred to as a group of related records. The records may hold data about customers, employees of the organization and names of students in a school and the like depending on the organizations.
  • Therefore, the file as a group of program instructions is actually a computer program. When files are stored on such storage media, then the term “file” refers to anything stored on the medium, be it a program or data file.

File and Directories

  • The work of the Operating System is to keep or maintain a directory of the address of the files on disk. Each file on the storage media is assigned a name called filename (one word). The directory is a list of filenames and the disk addresses at which the file may be found. When the user refers to a particular filename, it causes the operating system to consult its directory of filenames, locate the address of the required file and make it ready for use.
  • Let us have a look at a directory listing of files of a system disk using Ms DOS.
  • All of the files in this directory are programs. A system disk is so called because it contains the directory system.

    We shall list directory for system drive A:
    Volume in drive A: has no label.
    Directory of A:
    COMMAND COM 18107 13-12-97 13.00PM
    SYS COM 7407 13-12-97 13.00PM
    DIRECTORY COM 1307 13-12-9713.00PM 
    FIND EXE 1278 13-12-97 13.00PM
    4 FILE(S) 142890 BYTES FREE
  • What the list shows:
    1. the name of the file e.g. COMMAND
    2. Filename extension e.g. COM
    3. The number of bytes contained in this file
    4. Date and time on which it was printed into the directory.
    5. The total figure at the bottom of this directory listing show the number of bytes remaining for storing other files.
  • MS-DOS has certain rules for formation of filenames for example;
  • A filename must not exceed 8 characters in length and in some cases requires filename extensions, which is 3- character in addition to the filename. In the above example, COM and EXE are extensions. Although not visible, there is usually a full stop between the filename and the extension e.g. Diskcopy.COM is the complete name for the above file. The user has to type in the computer name of the file including the period in order to effectively use some file maintenance utilities like copying or deleting. Filename extensions usually indicate the type of file for example “COM” and “EXE” above will refer to program files.

 

Directory Hierarchy

  • Files stored on a disk can always be organized into subdirectories. Directory hierarchy refers to a “tree” like structure formed by directory – subdirectories – files.

    For example, we could have a directory called KENYA with subdirectories of towns NAIROBI, MOMBASA, NAKURU and files of Estates within each town, e.g. Hurlinghum, Nyali and Milimani. The figure below shows the directory hierarchy.
    dos directory
  • To be able to specify which file to open, the user has to specify to the operating system the data path or path to that file. For example, to open a filename Milimani, the following path must be specified: Kenya\Nakuru\Milimani.
  • A path is often defined as a logical, sequential list of directories and subdirectories leading to a filename. The names of directories and subdirectories are separated from each other by determinates which could be a backslash(\) or a hyphen (-) or a slash (/) depending on the Ms-Dos version in use.
  • The directory names have extension DIR wheras the files have TXT. The directory named Kenya under which the subdirectories Nakuru, Mombasa and Nairobi are stored is called root directory.

Volume Labels and Directories

  • A labels is a name given to a disk to enable you identify the contents from those of other disks when it’s off-line in that if it’s not mounted on a drive.
  • Since the use could have multiple disk drives on-line (mounted) at one time, the operating system must have a way of determining when disks are actually mounted on the driver. To do this, we use volume labels or volume directory, which simply a name assigned to each disk used in the computer installation. The difference between volume labels identifies a storage medium as physical unit while the latter two identify data stored on disk. Suppose we gave a volume label country to the hierarchy above, the complete name for reaching Milimani file will be: COUNTRY\KENYA\NAKURU\MILIMANI
  • The operating system will ensure that disk on a volume label Country is located first if it is the one mounted, before it searches for the actual file in the specific directories.


Tab Control

  • Computers and their operating systems can perform a great number of different tasks, not just one job as say a stand-alone word processor or a calculator. Therefore, the user of the system must be prepared to tell the operating system what particular task to perform at the moment.
  • When the computer system is complete, usually the application program is what the user communicates with the program when a particular task is desired.
  • When the application program finishes, it is no longer a part of the system.
  • The user therefore must communicate with the operating systems to tell it what to do next. He or she does this through the use of what we call OS’s Tab Control Language or TCL. TCL consists of a number of operating system commands also called system commands that control the operating system.
  • How does one know that the application program has finished its work and it is no longer loaded by the operating system? The operating system will display that by displaying its prompt; it could be a character or two that will signal the user it awaits further system commands.
  • The MS-DOS Operating System, uses the prompt C:\> or C>. The “C” in the prompt indicates the disk drive in which the operating system will look for any files referred to by the next TCL instructions. The disk drive attached to the system are usually identified by letters of the alphabet through a system with four drives could have drive identifiers A: through D. Any reference to a drive must include the colon in the drive identifier. The drive identifier displayed by the dos prompt is known as a logged drive, the default drive or the active drive.


MS-DOS Commands

  • Using system commands is quite easy. It is a matter of knowing the right commands key, key it in and press enter key for the command to be accepted. System commands help us to manage our files and directories for example; we can copy a file from one disk to another, delete files or change names. We can also manage our disks for example to format a disk, label a disk or copy disks.

The Syntax of a Dos Command

  • A Dos command usually has a command name (i.e the system command the user intends to use) and an argument which is information required by the command.
  • An argument used with a Dos command will indicate the disk drive on the file to be used by the command
    Example: COPY ANN 1 TO ANN 2
  • The command has a command name COPY. The arguments are ANN 1 and ANN 2. This command copies a file known as ANN 1. The new copy is named ANN 2.
    N/B: ANN 1 and ANN 2 are arguments and are separated from each other by a blank space. They are also separated from the command name by a blank space.

Running a Program

  • It is important to note that a Dos Command represents a program. A command name is just like a file name of any other program. To be able to run a program using Dos, first the operating has to be loaded. Loading the operating system is simply switching on the computer, it will open a program loaded in ROM to check if the operating system is loaded in drive A or any other and load, other wise it will load from the hard disk.
  • To run a program with filename extension COM, BAT, TXT, simply enter its filename without the extension for example to a Basic Program simply enter BASIC. Its filename is BASIC.COM.
  • When you want to execute a program that is not stored on a disk in the logged drive, the first thing would be to change the logged drive to the disk containing the program. For example, suppose you wanted to run a program with the filename MILO.EXE which is on the disk in drive B:, and the logged drive is A:, to specify the drive on which Dos should look for the program, proceed with the filename with the drive identified with no blank in between the colon and the filename. B:MILO

 

 



File Management Commands

Changing the Logged Drive

  • To change the logged drive from the active one, simply enter the letter of the alphabet for the new drive at the prompt of the active drive followed by the colons and then press Enter key.
    For example, if the active drive is C:\>, simply type A: at the prompt and press Enter.
    C:\> A:\>
    A:\> or A:\>

Determining the Contents of a Diskette

  • To determine the contents of your disk, Dos provides a program command DIR (Directory) that will display the files stored in your disk with the exception of the hidden files.
  • The files are usually listed one per line with their filenames, filename extension, size and the date and time they were last saved.
  • If you have many files than can be displayed on the screen, then Dos passes them so fast over the screen that you cannot be able to read or identify a particular program. There are two solutions to that program:
    1. /P (Pause) Switch
      - To see the files with all the relevant information i.e. filename, filename extension, size and date and time, then /P switch does the work. The files will be shown one screen at a time and tests the user to see the files with instructions to “press any key to continue…” The format is DIR/P <ENTER>
    2. /W (Wide) Switch
      - This command will display filenames and their extension only for the entire directory at once. They will be displayed in rows five files wide. The format is DIR/W <enter>.

To see only a particular file on Disk

- Simply use the filename of that file as the argument, thus: DIR B:FILENAME.TXT
- In this case, Dos will display the particular information about that file or tell you that it is not on disk.

To see Directory files with similar extensions.

  • If your files have the following extensions; BAS for Basic Programming files, DBS for Database files, to see their directory of all the Basic programming files, enter: DIR*.BAS or DIR/P.BAS or DIR/W*.BAS
  • The asterisk is called a wild card. What it means is that you “substitute the position with any characters.” For instance in the command DIR*.BAS will list all the files with the .BAS extension.
  • Directory of files with similar names and different extensions
  • Suppose your filenames are the same but have different extensions, all that you need to do is: DIR Same.*
  • All files called “Same” will be displayed.
  • Suppose you decided to identify your files as Same 1, Same 2 and so on, and therefore you wanted to only display a filename Same but with specific extension DBF, you would enter:
    DIR Same*.DBF
  • To see all same files you would enter:
    DIR Same*.*
  • The asterisk wildcard is a many character wild card. It fills out a filename or extension from its position to the end of the name in the above EXE file, the asterisk is the fifth, sixth, seventh and eighth character if they exist in the filename beginning with SAME.
  • Another wild card used in the Dos command if? It is usually called a one character wild card. When it appears in a command, you can substitute it with one character e.g. DIR ?AME*.DBF, will substitute ? with any character as long as the next line i.e AME is part of that filename. So if it is a command, like DIR SAME*??? Would be the same as DIRD SAME*.* when the three questions marks in the former stand fir three character.

Changing Directories

  • Let us go back to the example we gave with root directory KENYA. Suppose you wanted to make Hurlinghum your current directory, you simply need to enter to command:
    CD C:\NAIROBI\HURLINGHAM. <ENTER>
  • If you are already in C: as the logical drive, you do not need to enter it again, simply type: CD. If you wanted to move up one level of the directory i.e. to Nairobi, type:
    CD.. <ENTER>
  • Suppose you were to go straight to the root directory i.e. KENYA, all you need to type in at the prompt is:
    CD\ <ENTER>
  • If you want to see the subdirectory of a current directory, type DIR. <ENTER>.
    For example if you have made Nakuru your current directory, to see subdirectory like Milimani simply enter the latter command!

Making Directories

  • Suppose you wanted to make a subdirectory of your current directory Nakuru, what you need to do is enter that command MD (Make Directory) and the name you intend to call the subdirectory, thus: MD LANGA <ENTER>
  • If towards creating the directory named LANGA you want to work in it, simply use the CD command to place yourself in it, thus: CD LANGA <ENTER>

Removing Directories

  • To remove a directory, first ensure that the directory to be removed is empty.
  • You can empty a directory by using DEL command after making back-up copies of the same.
  • To effect the command to remove a directory like NYALI, ensure you place yourself in MOMBASA directory first, thus:
    CD MOMBASA <ENTER>
    RD NYALI <ENTER>

Copying a File

  • It is often necessary to make a copy of a file. All important files should always be copied so as to guard yourself against the loss of data. Data loss often occurs if you accidentally erase a file, Power goes off before you save your files, store data under an incorrect name, do physical damages to a diskette.
  • When you copy a file to protect against loss of data we say you are backing up a file. The copy command requires 2 parameters/arguments to accomplish the task. It is a resident command.
    1. The first argument is the name of the file to be copied.
    2. The second argument is the filename for the copy. If the file is not on the logged drive, then drive identification must be included.

Copying from the same Drive

  • Thus: Copy SAME1.DBF ZAME2.DBF
  • The above command will copy file named SAME1 on the same drive and give it a new name ZAME2.DBF. it is important to note that if you are copying within the same drive, then the new file must have a different name.

Copying from one Drive to another

  • To copy a file from one drive to another giving it the same name. Enter: COPY SAME1.DBF B:
  • New file name is not necessary on the target drive (B:) since it is the same as that of the source drive.

Copying a range of Files.

  • To copy a range of files, we employ wildcards for example: Copy same*.*B will copy all files on the logged drive that start with same onto the diskette in drive b: irrespective of filename extension.
  • To copy the entire contents of drive A: to B, we can use the following command: COPY A:*.*B:
    N/B: Ensure that the destination diskette is formatted before the operation is started since this command COPY doesn’t copy formatting information as does DISKCOPY command (4.7.4).

Renaming Files

  • For the sake of clarity, the user can rename an old file with a new name. The command is RENAME or simply REN. The format of this resident DOS command is:
  • At the prompt of the logged drive containing the disk with the old filename type: RENAME OLDNAME.TXT NEWNAME.TXT
  • This DOS internal command will not allow you to change a file name to one already existing in the diskette.
  • Notice the single space left between the arguments themselves and between Dos command and the argument oldname.
  • The use of wildcard is important here as they could help rename a wide range of files, for instance: RENAME SAME*.DBF SAME*.WPF
  • This will change all the filename extensions of all the SAME files to Word Processing Files (WPF). To rename a file on a different drive, you would do this: RENAME B: SAME.DBF ZAME.DBF to rename a file in B:

Deleting Files

  • Two Dos commands available for deleting files are DEL and ERASE. The format is: DEL ZAME.DBF <ENTER>
  • This will delete only a file named ZAME. To delete the entire directory of ZAME (that is plus the subdirectories), enter: DEL *.* <ENTER>
  • That is if you are placed inside the directory ZAME.

To Display the Contents of a File

  • To be able to simply display the contents of a file on the monitor. The command type is provided. The format is: TYPE Filename.EXT
  • Indicate the filename that is plus extension if you intend to display the contents on the screen. NB: You can press CTRL + S to stop the contents on the screen from passing too fast for you.

To Print the Contents of a File

  • If you need a hard copy of the contents of a file, then enter the format below: TYPE Filename.EXT>PRN
    N/B: You could also use the command PRESS CTRL + P which will sent everything on the CRT to the printer. To stop printing pre CTRL + P again.


Disk Management Commands

- Under Disk Management commands, we will examine the following commands:

  • Formatting a Floppy Disk
  • Inserting a Floppy Disk
  • Copying disks
  • Adding Dos to a formatted disk

Formatting a Diskette

  • Formatting is a process of preparing new diskettes for data storage. The system command is FOMART.
  • What formatting does: it organizes the disk so Dos can store data, keep track of them and retrieve them from disk. It also ensures that there are no defective areas on the new disk. If at all the defective areas are found, FORMAT will mark them so Dos does not store data in them.
  • Formatting usually takes two ways: A disk can be formatted to include Dos or not. Disks that include the operating system or Dos are called system disks or boot disk or command disk and can be used to start the computer (or load the operating system). Disks that do not have the operating system stored in them have more room to store data than the former.

Procedure:

  1. To Format a non system or data disk
    - Simply enter FORMAT followed by a drive identification if the new disk is not to be in the logged drive i.e. FORMAT or FORMAT B:
    - This command will prompt Dos to load format program and display the following message:
    INSERT NEW DISKETTE FOR DRIVE A: and strike any key when ready. In the file case or INSERT NEW DISKETTE FOR DRIVE B: and strike any key when ready in the second case.
    - Simply put the new diskette in the indicated drive and press any key. Dos will display:
    Formatting …
    After a few minutes, Dos repeats
    Formatting……Format Complete
    362496 bytes total disk space
    362496 bytes available on disk
    Format another (Y/N)
    To which you will answer “Y” or “N” press Y if you want to format another otherwise press N key from the keyboard.
  2. Formatting a disk so that it includes the systems.
    - Simply follow the above procedures with addition of letter S for system thus: FORMAT /S or FORMAT/S B:
    - The messages displayed are the same as the ones above with addition of the ones indicating that system transferred and how much space it required.
    - A disk with the system includes some hidden files the names of which do not appear when you look at the contents of the disk, and a file called COOMAND.COM. These files form the resident portion of Dos.

 

Adding Dos to a Formatted Diskette

- Adding Dos to a formatted diskette is a two-step process:

  1. With the target diskette in B: and a system disk in the logged driver, copy the hidden files to the diskette with the SYS command: SYS B:
    - SYS is a non-resident program (or transmit) i.e. it is not kept in RAM. It generates the following messages: SYETEM TRANSFERRED
  2. After the above process, copy COMMAND.COM from your system disk t the disk you are modifying by entering COPY COMMAND.COM B:
    NB: you can add Dos to any diskette as long as there is enough space to store the three files. If a disk already has hidden files and you try to use SYS command to place them on the disk anyway, you will get an error message indicting that there is no room on the disk for the system. The only way to replace the hidden files once installed is only by formatting the disk again.

Labeling a Disk

  • A volume name is used to identify disks just as you identify them by writing identification information on a label placed on the disk envelope. The volume name however, is recorded on the disk itself and can be checked by the operating system to ensure that the correct disk has been installed in the disk drive.
    Volume label (11 characters; ENTER for None)? MYDISKETTE
    362496 bytes total disk space
    362496 bytes used by the system
    321536 bytes available on disk
    Format another (Y/N)
    A>
    NB: Always have some formatted disks with you because some application programs will not give the leeway to format a disk while working on it.

Copying Disks

  • There is a utility called Diskcopy that is often provided for in most versions of Ms-Dos and Pc-Dos. What this utility does is that it copies the entire contents of the source disk to the destination disk. It also transfers the operating system and formats the destination document as well.
  • What this utility does not do is to check for errors in the destination disk and mark them so that data is not stored in by the Dos. While using the diskcopy command, care must always be taken to clearly identify which disk contains data (i.e. the source disk) and which disk is empty (i.e. the destination disk). If this is not done, then it is possible to wipe out everything on the source disk because you inadvertently copied the contents of a blank disk to the data disk you intended to reproduce.

Procedure:

  • The format for DISKCOPY includes two parameters:
    1. Source Drive and
    2. Destination Drive.
  • To be able to execute the command, enter the following: DISKCOPY A:B:
  • This command will copy the contents of the entire drive A: to the one in drive B:.
    NB: Everything on the disk in B:, the destination drive, will be destroyed by the operation. After the command, Dos will prompt you to insert the disks.
  • You can as well specify DISKCOPY B:A: if you intend to copy from drive B: to drive A:.
  • This method is often effective for disks that are full, otherwise we would use the command: COPY A:*.*B:
  • To copy all the files in drive A: with any extension to a disk in drive B. this command as opposed to diskcopy, will always check for faulty areas on the destination drive and mark them so that no data is kept in them.


Windows Operating Systems.

  • Windows operating system was developed as a Graphical User Interface (GUI) for PCs running on MS-DOS.
  • It provides a friendly interface that allows the users to enter commands by pointing and clicking at objects that appear on the screen using a pointing device, e.g., a Mouse or a trackball. These graphical capabilities make a program easier to use.
  • Microsoft Windows takes its name from the on-screen “Window” that it uses to display information.
    • A Window is a rectangular portion/ area of the screen that Windows sets aside for a specific task.
    • A Window is a rectangular area on a display screen in which text and graphical images may be displayed.

Examples of Windows Operating Systems:

  • Microsoft Windows 95, 98, 2000 Professional, 2003, NT, Millennium (Me), XP, and Vista.
  • Linux,
  • UNIX,
  • MacOS.
  • OS/2.

Common Features of Windows Operating Systems:-

  1. They all have similar user-interfaces. For example;
    • Windows.
    • Pointing device a device such as a mouse or trackball, that enables the user to select objects on the display screen.
    • Pointer a symbol (arrow) that appears on the display screen, and can be used to select objects & commands.
    • Icons small graphical pictures that represent commands, files, or applications. By moving the pointer to the icon and pressing a mouse button, one can execute a command or convert the icon into a window.
    • Buttons items used to initiate a process in an application.
    • Menus they provide choices that let the user execute commands by selecting them.
    • Desktop this is the area on the display screen where icons are grouped.
  2. It is user-friendly. Windows is menu driven, hence easy to operate, because the options used in particular applications are usually displayed on the screen in form of Icons.
  3. All Windows operating system support multiple users & have the ability to Multi-task, i.e., they allow one to run more than one program at the same time, each in its own window.
  4. It is easy to exchange information between Windows applications, i.e., it is easy to transfer or copy information from one program to another.
  5. All Windows applications share a common set of commands. For example, Open, SavePrint, etc & therefore, you don’t need to learn a different set of commands for each application.
  6. Ability to handle long file names, e.g., Windows 95 and later versions accept file names of up to 255 characters including spaces.
  7. Most Windows operating systems have Plug and play (PnP) features. They automatically accept a new hardware once it is connected to the computer.

Advantages of Windows Operating Systems.

  1. It is easy to open programs, find documents, and switch between programs.
  2. Windows provide facilities such as the Windows Explorer, which enable one to browse through & manage you files, folders, and drives easily.
  3. Windows can support long file names, making it easier to find and organize files.
  4. Windows has improved Video, CD & sound capabilities, and can fully support MS-DOSbased games.
  5. Windows makes it easier to install new hardware devices onto the system. It is able to recognize and sets up a certain Plug-and-Play hardware whose card has been inserted in the computer automatically.
  6. Windows allows true Multitasking, i.e. it allows the user to run more than one (several) program at the same time, each in its own window.
  7. Windows is user-friendly, i.e., it is menu driven, hence easy to operate, because the options used in particular programs are usually displayed on the screen in form icons.
  8. Windows supports a wide choice of networks & transmission protocols. It also has facilities for sharing files & devices.
  9. Windows has facilities that allow people to work with all types of electronic communications, e.g., it allows people to send text messages, transfer files, and also hold digital live face-to-face conversations with family friends & business associates around the world.
  10. Windows includes My Briefcase, a file synchronization tool & a utility for transferring files over a direct cable link or dial-up networking.
  11. All Windows applications share a common set of commands. E.g., Open, Save, Print, etc & therefore, there is no need to learn a different set of commands for each application.
  12. Windows allows movement of text or items from one program to another. i.e., it is easy to exchange information between Windows applications.
  13. Windows has facilities that enable the computer to save power resources by putting the computer on standby or hibernation.
  14. Windows includes a Help system that makes your computer easier to use. It helps you find answers to your questions easily, or get up-to date technical support from the WWW.

Differences between Ms-Windows & Disk Operating System.

Ms-Windows MS-DOS
1. There are icons
2. Uses both the Mouse & Keyboard as Input devices.
3. There is use of Menus.
4. User-friendly.
5. Windows fully supports networking.
6. Requires a computer with high memory size.
7. Windows can support DOS, i.e. it is possible 
to run DOS-based programs in Windows.
8. Uses Multi-coloured screen.
9. It is a Multi-user OS.
10. It is a multi-tasking OS, i.e. can support 
more than 1 program at a time.
11. Comes in different versions.
12. Uses folders for storage of files.
1. No Icons
2. Only the Keyboard is used as Input device.
3. It is command-based.
4. Not user-friendly.
5. DOS cannot support networking.
6. Uses less memory compared to Windows.
7. DOS cannot support Windows, i.e. it is not 
possible to run Window-based programs in MS-DOS.
8. Uses monochrome (1 coloured) screen.
9. It is a single-user OS.
10. It is a single-tasking OS, i.e. can only support 
one program at a time.
11. MS-DOS is an operating system by itself.
12. Uses Directories to organize files.
Join our whatsapp group for latest updates

Download Operating Systems - Computer Studies Form 1 Notes.


Tap Here to Download for 50/-




Why download?

  • ✔ To read offline at any time.
  • ✔ To Print at your convenience
  • ✔ Share Easily with Friends / Students


Get on WhatsApp Download as PDF
.
Subscribe now

access all the content at an affordable rate
or
Buy any individual paper or notes as a pdf via MPESA
and get it sent to you via WhatsApp

 

What does our community say about us?

Join our community on:

  • easyelimu app
  • Telegram
  • facebook page
  • twitter page
  • Pinterest