0% found this document useful (0 votes)
6 views32 pages

Lecture Note2operating - System - I - For - HND1

The document outlines the curriculum for an Operating Systems course, covering key concepts, functions, components, and classifications of operating systems. It includes definitions, importance, and examples of various operating systems, as well as their functions related to resource management, security, and error handling. Additionally, it discusses the philosophy of operating systems, characteristics, features, and design techniques, providing a comprehensive overview for students.

Uploaded by

Daniel Abiodun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views32 pages

Lecture Note2operating - System - I - For - HND1

The document outlines the curriculum for an Operating Systems course, covering key concepts, functions, components, and classifications of operating systems. It includes definitions, importance, and examples of various operating systems, as well as their functions related to resource management, security, and error handling. Additionally, it discusses the philosophy of operating systems, characteristics, features, and design techniques, providing a comprehensive overview for students.

Uploaded by

Daniel Abiodun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Operating

System 1
For

(NBTE CURRICULLUM)

Table of Content

Chapter 1 -Concept of Operating System 3-6


1.1 Define operating systems.
1.2 Importance of operating systems using real-life examples e.g. DOS, Windows, UNIX, etc.
1.3 Classify operating systems into closed shop and open shop.
1.4 List some examples of closed- shop and open shop operating systems
1.5 Apply the operating systems in 1.4 above to micro and main frame computers
1.6 Define, batch, Real-time, Time-sharing and net working operating systems

1 ,
1.7 List some examples of Batch, real-time, Time sharing and net working operating systems 1.8
Self Assessment Exercises
Chapter 2 -Function and philosophy of operating systems 7-12
2.1 State the functions of operating systems in relation to memory management, processor
management, device management and interrupt handling and information management. 2.2
Characteristics of operating systems: concurrency, sharing, long-term storage and non-
determinacy.
2.3 State the features of operating systems: efficiency, reliability, maintainability and size.
2.4 Carry out operating systems design techniques: top-down, bottom up.
2.5 Self Assessment Exercises
Chapter 3 -Components Of An Operating System 13-22
3.1 Define operating system files –IO.SYS, COMMAND.COM, CONFIG.SYS.
3.2 Describe the functions of the basic commands: i.e. FORMAT, DIR, CHKDSK, TYPE,
BACKUP, MODE, SYS, AUTOEXEC, DISCOMP, FDISK, etc.
3.3 Self Assessment Exercises
Chapter 4 -General Concept of Operating System 23-26
4.1 Define Systems Programming.
4.2 Define application programming
4.3 Differentiate between a systems program and an application program.
4.4 Identify areas involved in systems programming e.g. compilers, assemblers, operating
systems, device drivers, interrupt handlers.
4.5 Self Assessment Exercises
Chapter 5 -Understanding The Use Of Utilities And Libraries 27-29
5.1 Definition of Utilities.
5.2 Utilities.
5.3 Library.
5.5 Relationship between Utilities to Libraries.
5.6 How Libraries and Utility programs
Chapter 6 -Input / Output Devices Handlers 30-32
6.1 I/O processing 6.2
interrupts, Masking.
6.3 Traps.
6.4 Differences between traps and interrupts
6.5 CPU States.
6.6 Self Assessment Exercises

2 ,
Chapter 1 Concept Of Operating System

1.0 Introduction
The term “Operating System” is becoming a popular term in our world. The entirety of this
material is to delve more into the introductory aspects of what operating is. An operating system
(OS) is the program that, after being initially loaded into the computer by a boot program,
manages all of the other application programs in a computer. The application programs make use
of the operating system by making requests for services through a defined application program
interface (API).

At the end of this chapter, students should be able to


 Define operating systems,
 Explain the importance of operating systems using real-life examples e.g. DOS, Windows,
UNIX, etc.,
 Objectives of OS,
 Functions of Operating System,
 What are the functions of Operating System,
 Classify operating systems into closed shop and open shop,
 List some examples of closed- shop and open shop operating systems,
 Apply the operating systems in 1.4 above to micro and main frame computers,
 Define, types of operating systems, and give example of the actual operating system.
 List some examples of Batch, real-time, Time sharing and net working operating systems

1.1 Definition Of Operating Systems:


An Operating System (OS) is system software that manages computer hardware, software
resources, and provides various services for computer programs. It acts as an intermediary
between users and the computer hardware, facilitating the execution of applications and
providing a platform for other software to run.

1.2 Importance of Operating Systems:

3 ,
1. DOS (Disk Operating System): DOS was crucial for early personal computers, providing
a command-line interface for users to interact with the system.
2. Windows: Microsoft Windows is widely used for its user-friendly graphical interface and
support for a vast array of applications.
3. UNIX: UNIX is known for its stability, multiuser capabilities, and networking features,
making it popular in server environments.

1.3 Objectives of OS
The primary goals of an operating system are as follows:
1. Convenience – An operating system improves the use of a machine. Operating systems
enable users to get started on the things they wish to complete quickly without having to cope
with the stress of first configuring the system.
2. Efficiency – An operating system enables the efficient use of resources. This is due to less
time spent configuring the system.
3. Ability to evolve – An operating system should be designed in such a way that it allows for
the effective development, testing, and introduction of new features without interfering with
service.
4. Management of system resources – It guarantees that resources are shared fairly among
various processes and users.

1.4 What are the Functions of Operating System?


1. Security – For security, modern operating systems employ a firewall. A firewall is a type
of security system that monitors all computer activity and blocks it if it detects a threat.
2. Job Accounting – Operating system keeps track of all the functions of a computer
system. Hence, it makes a record of all the activities taking place on the system. It has an
account of all the information about the memory, resources, errors, etc. Therefore, this
information can be used as and when required.
3. Control over system performance – The operating system will collect consumption
statistics for various resources and monitor performance indicators such as reaction time,
which is the time between requesting a service and receiving a response from the system.
4. Error detecting aids – While a computer system is running, a variety of errors might
occur. Error detection guarantees that data is delivered reliably across susceptible

4 ,
networks. The operating system continuously monitors the system to locate or recognize
problems and protects the system from them.
5. Coordination between other software and users – The operating system (OS) allows
hardware components to be coordinated and directs and allocates assemblers, interpreters,
compilers, and other software to different users of the computer system.
6. Booting process – The process of starting or restarting a computer is referred to as
Booting. Cold booting occurs when a computer is totally turned off and then turned back
on. Warm booting occurs when the computer is restarted. The operating system (OS) is in
charge of booting the computer.

1.5 Classification of Operating Systems by Closed Shop and Open Shop:


1. Closed Shop: Also known as proprietary or vendor-specific, these operating systems are
designed to work only with specific hardware. Users are limited to the hardware and software
provided by a single vendor.
2. Open Shop: Also known as open systems, these operating systems are designed to work
with a variety of hardware components. They are more flexible, allowing users to choose
different hardware components.

1.6 Examples of Closed-Shop and Open-Shop Operating Systems:


Closed-Shop Examples: iOS (Apple devices), macOS (Mac computers).
Open-Shop Examples: Windows (Microsoft), Linux (various distributions).

1.7 Application to Micro and Mainframe Computers:


1.Smart Phones: open-shop operating systems like iOS (Apple devices), Android are
employed.
2.Micro Computers: Open-shop operating systems like Windows &Linux are often used.
3.Mainframe Computers: Closed-shop operating systems like IBM's z/OS are used.
4.Super Computers: Closed-shop operating systems like specific derivative of Linux OS are
commonly employed.

1.8 Definition Of types of Operating Systems and Examples:


1. Batch Operating System: Processes data in batches without direct user interaction. E,g.
IBM OS/360, Linux Batch System

5 ,
2. Real-time Operating System: Responds to events or data inputs instantly, critical for
applications like embedded systems and control systems. E,g QNX, VxWorks
3. Time-sharing Operating System: Time sharing operating system allows multiple users
to share the computer resources simultaneously, providing each user with a small time
slice without each user knowing of other users. Unix, Linux (when used in a multi-user
environment).
4. Networking Operating System: Manages network resources and provides services to
connected computers. E.g. Novell NetWare, Microsoft Windows Server.
5. Distributed Operating System: This type of operating system is one in which several
computer systems connected through a single communication channel E.g. Solaris in
SUN, Mach/OS, UNIX, IBMRS/100
6. Single-User Operating System: The type of operating system that allows a single user
at a time for the use processor. E.g. MS-Dos
7. Multi-Users Operating System: The Multi-Users Operating System allows many users
at the same time to interact with the processor. E.g., Unix, Linux (when used in a
multiuser environment).

1.9 Self Assessment Exercises


1. Define operating systems,
2. Explain the importance of operating systems using real-life examples e.g. DOS,
Windows, UNIX, etc.,
3. Classify operating systems into closed shop and open shop,
4. List some examples of closed- shop and open shop operating systems,
5. Apply the operating systems in the above to micro and main frame computers,
6. Define, batch, Realtime, Time-sharing and net working operating systems, and 7. List
some examples of Batch, real-time, Time sharing and net working operating systems.
8. What is the major distinguishing features between batch and real time operating system?

Chapter 2 Function And Philosophy Of Operating Systems

2.0 Introduction

6 ,
The guiding principles of an operating system is based on how data should be handled, detection
and handling of errors, with how the devices are communicated with the computer are termed
“The philosophy of computer operating system”. In computer world, to allocate resources
(software and hardware) of the computer system and manage them efficiently is one of its
cardinal philosophies. Another philosophy has to do with how it controls execution of user
programs and operation of I/O devices.
At the end of this chapter, students should be able to;
 State the functions of operating systems in relation to memory management, processor
management, device management and interrupt handling and information management,
 State the characteristics of operating systems: concurrency, sharing, long-term storage and
non-determinacy,
 State the features of operating systems: efficiency, reliability, maintainability and size. and 
Carry out operating systems design techniques: top-down, bottom up.

2.1 Function of Operating Systems:


1. Resource Management:
a) Processor Management: Allocates the CPU to different processes, ensuring efficient
utilization.
b) Memory Management: Manages the system's memory, including RAM and virtual
memory, to optimize performance.
c) File System Management: Controls file creation, deletion, and organization, ensuring
data integrity and accessibility.
2. Device Management:
a) I/O Management: Coordinates input and output operations of devices like keyboards,
printers, and disks.

b) Device Drivers: Provides a standardized interface for different hardware components,


allowing the OS to communicate with diverse devices.
3. User Interface:
Command-Line Interface (CLI) or Graphical User Interface (GUI): Allows users to interact
with the computer system by presenting the interface either CLI or the GUI to every user.
4. Security and Protection:

7 ,
a) Authentication and Authorization: Controls user access to resources and ensures data
security.
b) Firewalls and Antivirus: Protects the system from external threats.
5. Error Detection and Handling:
Logging and Reporting: Records system events for troubleshooting and maintenance.
6. Networking:
a) Communication Protocols: Facilitates communication between devices on a network.
b) Network Resource Sharing: Manages shared resources in a networked environment.
7. Job Scheduling:
a) Task Scheduling: Allocates system resources to different tasks or processes.
b) Priority Management: Determines the order in which tasks are executed.

2.2 Philosophy of Operating Systems:


(a) Abstraction:
a) Hardware Abstraction: Hides the complexity of hardware from application software,
providing a consistent interface.
b) User Abstraction: Provides a user-friendly interface, shielding users from low-level
details.
(b) Efficiency:
a) Resource Optimization: Maximizes the use of hardware resources to enhance system
performance.
b) Time Efficiency: Minimizes response time and maximizes throughput.
3. Reliability:
a) Fault Tolerance: Incorporates mechanisms to handle errors and failures gracefully.
b) System Stability: Ensures consistent and predictable behavior under varying workloads.
4. Flexibility:
a) Portability: Allows software to run on different hardware platforms.
b) Compatibility: Supports a wide range of applications and hardware configurations.
5. Security:
a) Access Control: Manages user access and permissions.
b) Data Protection: Implements measures to safeguard data integrity and confidentiality.
6. Scalability:

8 ,
a) System Scalability: Supports the addition of hardware resources as the system load
increases.
b) Application Scalability: Accommodates the growth of software applications.
7. User Empowerment:
a) Ease of Use: Provides a user-friendly environment, regardless of the user's technical
expertise.
b) Customization: Allows users to tailor settings and configurations to their preferences.
8. Adaptability:
a) Support for Diverse Applications: Accommodates various types of software
applications, from simple utilities to complex databases and multimedia tools.

2.3 Characteristics of Operating Systems:


(1) Concurrency:
Definition: The ability of the operating system to execute multiple tasks or processes
simultaneously.
Characteristics:
a) Parallelism: Managing the execution of multiple tasks in parallel.
b) Synchronization: Ensuring coordination and consistency between concurrently
executing processes.
c) Deadlock and Race Condition Handling: Preventing or resolving situations where
processes are unable to proceed.
(2) Sharing:
Definition: Allowing multiple users or processes to access resources concurrently.

Characteristics:
a) Resource Allocation: Fairly distributing resources like CPU time, memory, and devices.
b) Isolation: Ensuring that one user's actions do not interfere with another user's work.
c) Access Control: Managing permissions to prevent unauthorized access.
(3) Long-Term Storage:
Definition: Managing persistent data storage on non-volatile media (e.g., hard drives, SSDs).
Characteristics:
a) File System: Organizing and maintaining files on storage devices.

9 ,
b) Data Integrity: Ensuring the accuracy and consistency of stored data.
c) Backup and Recovery: Implementing mechanisms for data backup and restoration.
(4) Non-Determinacy:
Definition: The inability to predict the exact timing or order of events in a system.
Characteristics:
a) Interrupt Handling: Dealing with unpredictable external events that require immediate
attention.
b) Asynchronous Operations: Supporting operations that do not follow a predetermined
sequence.
c) Real-Time Constraints: Meeting timing requirements for critical tasks in real-time
systems.

2.4 Features of Operating Systems:


1. Efficiency:
Features:
a) Optimized Resource Utilization: Efficiently using CPU, memory, and other resources.
b) Fast Response Time: Minimizing delays in task execution.
c) Load Balancing: Distributing tasks evenly across system resources.
2. Reliability:
Features:
a) Fault Tolerance: Ability to continue operating in the presence of hardware or software
failures.
b) Error Handling: Identifying and recovering from errors gracefully.
c) System Stability: Consistent and predictable behavior under varying conditions.
3. Maintainability:
Features:
a) Modularity: Designing the system in a modular fashion for easy updates and
modifications.
b) Debugging Tools: Providing tools to identify and fix issues efficiently.
c) Documentation: Clear documentation to facilitate system understanding and
maintenance.
4. Size:

1 ,
0
Features:
a) Footprint: Minimizing the amount of system resources (memory, storage) required.
b) Scalability: Adapting to varying workloads and system growth.
c) Code Optimizations: Efficiently written code to reduce size and improve performance.

2.5 Operating Systems Design Techniques:


There are two types of system design techniques employed in Operating System design; these are
top-down design and bottom-up design.
(1) Top-Down Design:
Approach:
a) Start with High-Level Design: Identify the overall structure and major components of
the system.
b) Decompose into Subsystems: Break down the high-level components into more detailed
subsystems.
c) Continue Decomposition: Repeat the process until reaching a level where components
are small enough to be easily implemented.
Advantages:
i. Systematic Approach: Provides a clear understanding of the overall structure before
diving into details.
ii. Early Identification of Key Components: Helps in identifying critical elements early in
the design process.

Challenges:
i. Detailed Design Dependency: May encounter difficulties when trying to fit detailed designs
into the overall structure.
2. Bottom-Up Design:
Approach: ii. Start with Detailed Components: Begin with the design of individual, low-level
components.
iii. Build Higher-Level Abstractions: Assemble these components into higher-level
abstractions and subsystems.
iv. Iterative Process: Continue the process iteratively, combining components into larger
structures.

1 ,
1
Advantages:
i. Early Prototyping: Allows for the early development and testing of individual components.
ii. Incremental Development: Permits the gradual construction of the system, making it easier
to identify and address issues.
Challenges:
i. Integration Complexity: May encounter challenges when integrating diverse components
into a coherent system.
ii. Risk of Incomplete System Vision: The overall system vision might be less clear until all
components are integrated.

2.5 Self Assessment Exercises


1. State the five functions of operating systems
2. Explain the characteristics of operating systems with the following concept; (i) Concurrency
(ii) sharing (iii) long-term storage (iv) non-determinacy.
3. Explain the following as they relate to the features of operating systems:
(i) Efficiency, (ii) Reliability, (iv) Maintainability (v) Size.
4. Describe the top-down and bottom up ways of carrying out operating systems design
techniques

Chapter 3 Components Of An Operating System

3.0 Introduction

1 ,
2
An operating system is a large and
complex system that can only be
created by partitioning into small
parts. These pieces should be a
well-defined part of the system,
carefully defining inputs, outputs,
and functions.
Although Windows, Mac, UNIX,
Linux, and other OS do not have
the same structure, most
operating systems share
similar OS system components,
such as file, memory, process, I/O Figure 3.1: Component of O/S
device management.
At the end of this chapter, students should be able to;
 Define operating system files such as IO.SYS, COMMAND.COM, CONFIG.SYS, and
 Describe the functions of the basic commands: i.e. FORMAT, DIR, CHKDSK, TYPE,
BACKUP, MODE, SYS, AUTOEXEC, DISCOMP, FDISK, etc.

3.1 Components of Operating System


1. (a) Process Management:
The process management component is a procedure for managing many processes running
simultaneously on the operating system. Every running software application program has one or
more processes associated with them.
For example, when you use a search engine like Chrome, there is a process running for that
browser program.

Process management keeps processes running efficiently. It also uses memory allocated to them
and shutting them down when needed.
The execution of a process must be sequential so, at least one instruction should be executed on
behalf of the process.

1 ,
3
Figure 3.2: The execution of a process of O/S

(b) Functions of process management


Here are the following functions of process management in the operating system, such as:
i. Process creation and deletion.
ii. Suspension and resumption.
iii. Synchronization process
iv. Communication process
2. (a) File Management
A file is a set of related information defined by its creator. It commonly represents programs
(both source and object forms) and data. Data files can be alphabetic, numeric, or alphanumeric.

Figure 3.3: File Management in O/S

(b) Function of File Management

1 ,
4
The operating system has the following important activities in connection with file management:
i. File and directory creation and deletion.
ii. For manipulating files and directories. iii.
Mapping files onto secondary storage.
iv. Backup files on stable storage media.
3. (a) Network Management
Network management is the process of administering and managing computer networks. It
includes performance management, provisioning of networks, fault analysis, and maintaining the
quality of service.

Figure 3.4: Network Management in O/S

A distributed system is a collection of computers or processors that never share their memory and
clock. In this type of system, all the processors have their local memory, and the processors
communicate with each other using different communication cables, such as fibre optics or
telephone lines.
The computers in the network are connected through a communication network, which can
configure in many different ways. The network can fully or partially connect in network
management, which helps users design routing and connection strategies that overcome
connection and security issues.
(b) Functions of Network Management
Network management provides the following functions, such as:
i. Distributed systems help you to various computing resources in size and function. They may
involve minicomputers, microprocessors, and many general-purpose computer systems. ii. A
distributed system also offers the user access to the various resources the network shares.

1 ,
5
iii. It helps to access shared resources that help computation to speed up or offers data
availability and reliability.
4. (a) Main Memory Management
Main memory is a large array of storage or bytes, which has an address. The memory
management process is conducted by using a sequence of reads or writes of specific memory
addresses.
It should be mapped to absolute addresses and loaded inside the memory to execute a program.
The selection of a memory management method depends on several factors.
However, it is mainly based on the hardware design of the system. Each algorithm requires
corresponding hardware support. Main memory offers fast storage that can be accessed directly
by the CPU. It is costly and hence has a lower storage capacity. However, for a program to be
executed, it must be in the main memory.

Figure 3.5: Main Memory Management of O/S


(b) Functions of Memory Management
An Operating System performs the following functions for Memory Management in the
operating system:
i. It helps you to keep track of primary memory.
ii. Determine what part of it are in use by whom, what part is not in use.
iii. In a multiprogramming system, the OS decides which process will get memory and how
much.
iv. Allocates the memory when a process requests.
v. It also de-allocates the memory when a process no longer requires or has been
terminated.
5. (a) Secondary-Storage Management

1 ,
6
The most important task of a computer system is to execute programs. These programs help you
to access the data from the main memory during execution. This memory of the computer is very
small to store all data and programs permanently. The computer system offers secondary storage
to back up the main memory.

Figure 3.6: Network Management in O/S.

Today modern computers use hard drives/SSD as the primary storage of both programs and data.
However, the secondary storage management also works with storage devices, such as USB flash
drives and CD/DVD drives. Programs like assemblers and compilers are stored on the disk until
it is loaded into memory, and then use the disk is used as a source and destination for processing.
(b) Functions of Secondary storage management
Here are some major functions of secondary storage management in the operating system: i.
Storage allocation
ii. Free space management iii.
Disk scheduling

6. (a) I/O Device Management


One of the important use of an operating system that helps to hide the variations of specific
hardware devices from the user.

1 ,
7
Figure 3.7: I/O Device Management in O/S

(b) Functions of I/O management


The I/O management system offers the following functions, such as:
i. It offers a buffer caching system
ii. It provides general device driver code
iii. It provides drivers for particular hardware devices. iv. I/O helps you to know the
individualities of a specific device.

7. (a) Security Management


The various processes in an operating system need to be secured from other activities. Therefore,
various mechanisms can ensure those processes that want to operate files, memory CPU, and
other hardware resources should have proper authorization from the operating system.
Security refers to a mechanism for controlling the access of programs, processes, or users to the
resources defined by computer controls to be imposed, together with some means of
enforcement.

1 ,
8
Figure 3.8: I/O Device Management in O/S.

For example, memory addressing hardware helps to confirm that a process can be executed
within its own address space. The time ensures that no process has control of the CPU without
renouncing it. Lastly, no process is allowed to do its own I/O to protect, which helps you to keep
the integrity of the various peripheral devices.
Security can improve reliability by detecting latent errors at the interfaces between component
subsystems. Early detection of interface errors can prevent the foulness of a healthy subsystem
by a malfunctioning subsystem. An unprotected resource cannot misuse by an unauthorized or
incompetent user.

8. Command Interpreter System


One of the most important components of an operating system is its command interpreter. The
command interpreter is the primary interface between the user and the rest of the system.

1 ,
9
Figure 3.9: Command Interpreter System in O/S.

Many commands are given to the operating system by control statements. A program that reads
and interprets control statements is automatically executed when a new job is started in a batch
system or a user logs in to a time-shared system. This program is variously called.
i. The control card interpreter,
ii. The command-line interpreter,
iii. The shell (in UNIX), and so on.
Its function is quite simple, get the next command statement, and execute it. The command
statements deal with process management, I/O handling, secondary storage management, main
memory management, file system access, protection, and networking.

3.2 Operating System Files


The files IO.SYS, COMMAND.COM, and CONFIG.SYS are associated with the MS-DOS
operating system. MS-DOS (Microsoft Disk Operating System) was a popular operating system
in the early days of personal computing. Here's a brief overview of these files and some of the
basic commands you mentioned:
(1) IO.SYS:
Function: IO.SYS (Input / Output System) is a system file that contains the core input/output
routines for the operating system.

2 ,
0
Role: It plays a crucial role in initializing the system and providing essential I/O functions during
the boot process.
(2) COMMAND.COM:
Function: COMMAND.COM is the command interpreter for MS-DOS. It is responsible for
executing commands entered by the user.
Role: It provides the command prompt and processes batch files, which are sequences of
MSDOS commands.
(3) CONFIG.SYS:
Function: CONFIG.SYS is a system configuration file that is read during the boot process. It
contains configuration directives and settings for the operating system and device drivers. Role:
It initializes device drivers, sets system parameters, and configures memory management.

3.3 Some MSDOS Commands


Now, let's briefly describe some of the basic MS-DOS commands you mentioned:
(1) FORMAT:
Function: FORMAT is used to prepare a storage medium (such as a disk) for use by an operating
system.
Usage: FORMAT [drive:]
(2) DIR:
Function: DIR displays a list of files and subdirectories in a directory.
Usage: DIR [drive:][path][filename][/A][/B][/C][/D][/L][/O][/P][/Q][/S][/W][/X][/4]
(3) CHKDSK:
Function: CHKDSK checks a disk for errors and attempts to fix them.
Usage: CHKDSK [drive:][/F][/V][/R][/X][/I][/C][/L]
(4) TYPE:
Function: TYPE is used to display the contents of a text file.
Usage: TYPE [drive:][path]filename
(5) BACKUP:
Function: BACKUP is used to back up files and directories.
Usage: BACKUP [drive:][path]filename [/S][/M][/A][/D:date]

(6) MODE:

2 ,
1
Function: MODE is used to configure system devices like the display and the printer. Usage:
MODE [device] [n],[m]
(7) SYS:
Function: SYS is used to transfer the MS-DOS system files to a disk.
Usage: SYS [drive1:][drive2:]
(8) AUTOEXEC.BAT:
Function: AUTOEXEC.BAT is a batch file that contains commands to be executed
automatically when the system boots.
Role: It allows users to customize the system environment at startup.
(9) FDISK:
Function: FDISK is used to create and manage disk partitions on a hard disk.
Usage: FDISK [/STATUS] [/MBR] [/PARTN[:ON|OFF]] [/PRI[:ON|OFF]] [/EXT[:ON|OFF]]
10. DEL (Delete):
Function: DEL is used to delete one or more files from a specified location.
Usage: DEL [drive:][path]filename [/P]
Example: DEL C:\Example\file.txt
11. COPY:
Function: COPY is used to copy one or more files from one location to another.
Usage: COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/L] [/A | /B ] source [/A | /B] [+ source [/A | /B]
[+ ...]] [destination [/A | /B]]
Example: COPY C:\Source\file.txt D:\Destination\
These commands and files were fundamental in the MS-DOS operating system and are reflective
of the computing landscape during that era. Many of these commands have equivalents or similar
functionalities in modern operating systems.
3.4 Self Assessment Exercises
1. Define the following operating system files;
(i) IO.SYS, (ii) COMMAND.COM, (iii) CONFIG.SYS.
2. Describe the following functions of the basic commands:
(i) FORMAT, (ii) DIR, (iii) CHKDSK, (iv) TYPE, (v) BACKUP, (vi) MODE,
(vii) SYS (viii) AUTOEXEC (ix) DISCOMP (x) FDISK

2 ,
2
Chapter 4 General Concept of Operating System

4.0 Introduction
As earlier defined in Chapter One, an operating system (OS) is system software that manages
computer hardware and software resources, and provides common services for computer
programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also
include accounting software for cost allocation of processor time, mass storage, peripherals, and
other resources.
For hardware functions such as input / output and memory allocation, the operating system acts
as an intermediary between programs and the computer hardware, although the application code
is usually executed directly by the hardware and frequently makes system calls to an OS function
or is interrupted by it. Operating systems are found on many devices that contain a computer –
from cellular phones and video game consoles to web servers and supercomputers.

Figure 4.1: Software Classification

Other specialized classes of operating systems (special-purpose operating systems), such as


embedded and real-time systems, exist for many applications. Security-focused operating
systems also exist. Some operating systems have low system requirements (e.g. light-weight
Linux distribution). Others may have higher system requirements.
At the end of this chapter, students should be able to;

2 ,
3
 Define Systems Programming,
 Define Application Programming,
 Differentiate between a systems program and an application program, and
 Identify areas involved in systems programming e.g. compilers, assemblers, operating
systems, device drivers, interrupt handlers.

4.1 Define Systems Programming:


System programming refers to the activity of writing or maintaining system software, which is a
type of software that provides a platform or infrastructure for running computer programs.
Systems programming involves creating software components such as operating systems,
compilers, assemblers, device drivers, and other system-level utilities. It is concerned with the
efficient and effective utilization of hardware resources, managing system components, and
providing a stable and reliable environment for application programs to run.

4.2 Define Application Programming:


Application programming involves the development of software applications that serve specific
user-oriented purposes. Application programmers create programs that perform tasks such as
word processing, data analysis, graphics design, and other user-focused functions. These
programs run on top of the operating system and utilize the services provided by the underlying
systems software. Application programming is more concerned with solving user problems and
delivering functionality rather than managing low-level system resources.

4.3 Differences between a Systems Program and an Application Program:


(1) Purpose:
Systems Program: It serves as the foundational software infrastructure, managing and controlling
the hardware resources of a computer system.
Application Program: It is designed to perform specific tasks for end-users, providing
functionalities like data processing, communication, and entertainment.

(2) Interaction with Hardware:


Systems Program: Interacts directly with hardware components to provide a platform for
executing application programs.

2 ,
4
Application Program: Interacts with the underlying systems software to access hardware
resources indirectly.
(3 Scope:
Systems Program: Focuses on low-level details, resource management, and system stability.
Application Program: Focuses on user requirements, functionality, and ease of use.
Examples:
Systems Program: Operating systems, device drivers, compilers, assemblers.
Application Program: Word processors, web browsers, games, spreadsheet software.

4.4 Areas Involved in Systems Programming:


Systems programming encompasses various areas that contribute to the development and
maintenance of system software. Some key areas include:
i. Compilers: Convert high-level programming languages into machine code or an
intermediate code.
ii. Assemblers: Convert assembly language code into machine code.
iii. Operating Systems: Manage hardware resources, provide services to application
programs, and ensure overall system stability.
iv. Device Drivers: Interface between the operating system and hardware devices, allowing
the OS to communicate with peripherals.
v. Interrupt Handlers: Respond to hardware interrupts, managing the interruption of the
normal execution flow to handle specific events.
vi. Linkers and Loaders: Combine and load multiple program modules into memory for
execution.
vii. System Libraries: Collections of pre-compiled functions and routines that can be used by
application developers.
viii. Debuggers: Tools for finding and fixing errors (bugs) in software code.
ix. Performance Optimization Tools: Tools to analyze and enhance the performance of
system software.

Systems programmers work in these areas to create the foundational software components that
enable application programs to run effectively on computer systems

2 ,
5
4.5 Self Assessment Exercises
1. Define Systems Programming.
2. Define application programming
3. Differentiate between a systems program and an application program.
4. What are the areas that are involved in systems programming?
5. Explain the following;
(i) Compilers, (ii) Assemblers, (iii) Operating Systems, (iv) Device Drivers, (v) interrupt
handlers (vi) Trap

2 ,
6
Chapter 5 Understanding The Use Of Utilities And Libraries

5.0 Introduction
The system libraries define a standard set of functions through which applications can interact
with the kernel, and which implement much of the operating system functionality that does not
need full privileges of kernel code; 3. The system utilities are programs that perform individual,
specialized management tasks.
At the end of this chapter, students should be able to;
 Define utilities,
 Explain utilities,
 Define Library,
 Explain Libraries,
 Relate utilities to Libraries, and
 Implement libraries and utility programs.

5.1 Define Utilities:


Utilities are software programs or tools designed to perform specific tasks or functions related to
the management, maintenance, and optimization of computer systems. These programs are
typically separate from the core operating system and application software but are essential for
enhancing system performance, troubleshooting issues, and providing additional functionalities.

5.2 Utilities:
Utilities serve a variety of purposes, including:
System Maintenance: Utilities help in tasks such as disk cleanup, defragmentation, and system
optimization.
Security: Antivirus utilities, firewall tools, and encryption software are examples of utilities that
enhance system security.
File Management: Utilities assist in tasks like copying, moving, and deleting files, as well as
searching for specific files.

Network Management: Utilities aid in managing network connections, diagnosing network


issues, and monitoring network activity.

2 ,
7
Data Recovery: Utilities may help recover lost or deleted data from storage devices.

5.3 Definition of Library


A library in the context of software refers to a collection of precompiled routines, functions, and
procedures that can be used by software developers to simplify the process of writing programs.
Libraries provide reusable code modules that serve common purposes, allowing developers to
leverage existing functionality without having to recreate it from scratch.

5.4 Explanation on Libraries:


Libraries can be categorized into two main types:
i. Static Libraries: Compiled code linked directly into an application during the build
process. The resulting executable includes the code from the library.
ii. Dynamic Libraries (Shared Libraries): Separate files containing compiled code that
are linked to an application at runtime. The application references the library
dynamically during execution.
Libraries can include functions related to file handling, mathematical calculations, user interface
elements, and more. They contribute to code modularity, reusability, and overall software
development efficiency.

5.5 Relationship Between Utilities and Libraries:


Utilities and libraries are related in that utilities often make use of libraries to accomplish their
tasks. For example:
Disk Cleanup Utility: This utility may use file-handling functions from a library to manage and
delete unnecessary files.
Antivirus Utility: It might leverage libraries containing algorithms for scanning and detecting
malware.
Backup Utility: Utilizes file-handling and storage management functions from libraries to create
and manage backups.

5.6 Implement Libraries and Utility Programs:


Implementing libraries and utility programs involves the following steps:
(1) Library Implementation:

2 ,
8
Write and compile functions or routines to be included in the library.
Create the library file (either static or dynamic) using a linker.
Document the functions and their usage for developers.
(2) Utility Program Implementation:
Identify the specific task or functionality the utility will perform.
Utilize appropriate libraries to streamline development.
Implement the utility program, considering user interface design, error handling, and
performance optimization.
Test the utility to ensure it functions as intended.
Both libraries and utility programs contribute to efficient and effective software development,
providing modular and reusable components for different aspects of system management and
application functionality.

5.7 Self Assessment of Exercises


1. Define utilities.
2. Explain utilities.
3. Define Library.
4. Explain Libraries.
5. Relate utilities to Libraries.
6. Implement libraries and utility programs

Chapter 6 Input / Output Devices Handlers

6.0 Introduction
In this chapter, we shall examine how operating system handles input and output devices. We
already know that Device Handlers are software that interface between OS and I/O devices.
When I/O instruction is received, Device Handler converts generic instruction and internal
character code into format required by specific device. At the end of this chapter, students should
be able to;
 Describe I/O processing,
 Describe interrupts, masking,
 Describe traps,

2 ,
9
 Differentiate between traps and interrupts and  Explain CPU states.

6.1 Describe I/O Processing:


I/O (Input / Output) processing refers to the communication and interaction between a computer's
CPU and its external devices, such as storage devices, keyboards, displays, and network
interfaces and so on. I/O processing involves the following steps:
i. Issuing Requests: The CPU issues I/O requests to devices to either send data (output) or
receive data (input).
ii. Device Communication: The operating system manages the communication between the
CPU and the devices. It uses device drivers to interface with specific hardware.
iii. Data Transfer: Data is transferred between the CPU and the I/O devices. This transfer can
occur via programmed I/O, interrupt-driven I/O, or direct memory access (DMA).
iv. Handling Delays: I/O operations can be slower than CPU operations, so the CPU might
perform other tasks while waiting for I/O operations to complete.

6.2 Interrupts and Masking:


Interrupts are signals sent by hardware or software to the CPU to indicate that an event requiring
immediate attention has occurred. When an interrupt occurs, the CPU stops its current task, saves
its state, and transfers control to a specific interrupt-handling routine.
Masking: Interrupt masking is a mechanism that allows the CPU to selectively enable or disable
interrupts. This is done to prioritize certain interrupts over others or to prevent certain interrupts
from occurring during critical sections of code.

6.3 Traps:
A trap is a software-generated interrupt caused by an error or a specific condition detected during
program execution. Traps are typically triggered by instructions within a program and are used
for error handling or to invoke operating system services.

6.4 Differentiate between Traps and Interrupts:

3 ,
0
Interrupts:
Source: External hardware or devices.
Trigger: Events that require immediate attention, often asynchronous.
Usage: Used for hardware signaling, asynchronous events, and device communication.
Traps:
Source: Generated by the program itself (software).
Trigger: Specific conditions or errors detected during program execution.
Usage: Used for error handling, invoking system services, and interacting with the operating
system.

6.5 CPU States:


The CPU can be in different states during its execution. The three primary states are:
i. Running State: The CPU is actively executing instructions of a program.
ii. Interrupted State: The CPU transitions to this state when an interrupt occurs. It saves its
current state, transfers control to the interrupt handler, and later resumes the interrupted
task.
iii. Idle State: The CPU enters this state when there are no tasks to execute. It might be
waiting for I/O operations to complete or for an external event to trigger a task.

Understanding CPU states is crucial for managing multitasking, handling interrupts, and
optimizing overall system performance. The CPU efficiently switches between these states to
execute multiple tasks concurrently and respond to events.

A diagrammatic representation of CPU States.

6.6 Self Assessment Exercises


1. Describe I/O processing 2.
Describe interrupts, masking.

3 ,
1
3. Describe traps.
4. Differentiate between traps and interrupts
5. Explain CPU states.
6. Why is it important to understand the CPU state.

3 ,
2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy