You are on page 1of 37

COSC 203- OPERATING SYSTEMS I

DR. ADEGBENJO ADERONKE


MODULE 1- CONCEPTS OF COMPUTER SYSTEMS
WHAT IS A COMPUTER?
A computer is an electronic device that accepts data as inputs, stores the data and
manipulates the data to produce or process new information or a result as output.

COMPONENTS OF A COMPUTER SYSTEMS


A computer system can be divided roughly into four components:
1. The hardware
2. The operating system
3. The system and application programs
4. The users.

End User

Application (System & Application software )

Operating System (Windows, Apple OS, Linux & Unix)

Hardware (CPU, Memory, Hard drive)


SYSTEM
SOFTWARE
SOFTWARE
APPLICATION
COMPUTER SOFTWARE
SYSTEM
I/O DEVICES,
HARDWARE MEMORY,
PROCESSOR

FIG 1.1. BASIC CLASSIFICATION OF A COMPUTER SYSTEM


Hardware: the various physical components of a computer system. It is any part that can be
held or felt or touched. i.e. Monitor, processor, hard drive, keyboard, etc.
Software consists of the non-tangible elements. It includes instructions and other
commands that control the operation of the computer system. The software is the interface
between the hardware and user applications.

TYPES OF SOFTWARE
1) System software: it is designed to run the computer’s hardware and application
programs. It is the interface between the hardware and user applications. It is
designed by the software manufacturers i.e. OS

TYPES OF SYSTEM SOFTWARE


1. OPERATING SYSTEM (OS): An Operating system is a program that manages the
computer hardware and computer software. It is a software designed by system
developers to control and manage the resources of a computer system.

2. TRANSLATOR: A translator is the middle thing responsible for the conversion or


translation of a program written in a language format other than machine language
(source code) into the machine code version which the computer understands.
TYPES OF TRANSLATOR
- Assembler is a set of program that translates a program written in assembly
language into machine code.
- Interpreter is a set of program that does its translation of high-level language
program to machine code line by line basis. If the first line is not settled it
does not go to the next.
- Compiler is a set of program that translate a high-level program into its
machine equivalent in batches.
N.B.
1. The computer experts which takes as input a program written in one
programming language
2. Beginners All Purpose Symbolic Code (BASIC) and turns it into computer
readable form.
UTILITIES PROGRAM: These are programs responsible for routine operations within the
computer system. Some of these come with the operating system software (called
embedded programs).

TYPES/ EXAMPLES OF UTILITY PROGRAM


- Backup utilities: These are programs designed to backup or keep a duplicate
copy of the contents of a hard disk drive on floppy/diskettes, CD, DVD, flash
drive, tape etc.
- Data Compression programs: These are programs used for compressing large
files, thereby freeing up disk space.
- Diagnostic software: These are programs designed to help in finding and
correcting problems on the computer.
- Disk defragmenter: A program that re-organizes contiguously programs that
were initially non-contiguous on the memory to free more space for incoming
programs and to improve access time.
- Vaccine programs: These are programs designed to prevent virus from
entering the computer system. They are popularly called antivirus software.
-

2) Application software: It is a type of computer program that performs a specific


personal, business, or educational function.
TYPES OF APPLICATION SOFTWARE/ PACKAGES
- Word Processing Packages: These are programs used by various
organizations to produce text-based documents. Examples are MS Word,
Word Perfect, and Word Star etc.
- Spreadsheet Packages: These are the program that can turn your system into
a powerful calculating device. They are electronic worksheet programs used
for making payrolls, budget analysis, and production of charts and so on. MS
Excel, and Lotus 123 are examples.
- Graphic /Presentation Packages: These are programs for creating high
resolution images and other illustrations like pie charts, bar charts and other
graphs used for presentations. Power point, Corel Draw and Page Maker are
examples.
- Communication Packages: These are the programs that are used to turn the
computer into devices for sending messages from one person to another and
also for sending and receiving electronic mails. Examples are MS Outlook,
Outlook Express, Internet Explorer, FoxPro Mozilla.
- Analytical/Statistical Packages: these are programs for solving more
analytical problems like statistical analysis. Statistical Package for Social
Sciences (SPSS) is an example.

INTRODUCTION TO THE OPERATING SYSTEM


- Operating system is an integrated set of programs that controls the resources
of a computer system and provide its users with an interface that is more
convenient to use.
- An operating system is software that manages the computer hardware as
well as providing an environment for application program to run.
- An operating system is a control program. A control program manages the
execution of user programs to prevent errors and improper use of the
computer.
- The software that contains the core components of the operating system is
called the kernel.
- The software that contains the core components of the operating system is
called the kernel.
- The main task an operating system carries out is the allocation of resources
and services, such as the allocation of memory, devices, processors, and
information.
- The operating system also includes programs to manage these resources,
such as a traffic controller, a scheduler, memory management module, I/O
programs, and a file system.
MODULE 2- MANAGERS OF OPERATING SYSTEMS
MANAGERS OF THE OPERATING SYSTEM
1. The Memory Manager (main memory also called Random Access Memory or RAM).
2. The Processor Manager (CPU)
3. The Device Manager (keyboard, Printer, Disk drives, Modem, Monitor).
4. The File Manager (Program files, data files, compilers etc.).

PROCESSOR MANAGEMENT
- It decides how to allocate the CPU
- It keeps track of the status of each process i.e. Whether the CPU is executing a
process or waiting to READ or WRITE command
- It sets up the necessary registers and tables for a process
- When the job is finished, it reclaims the processor
N.B. A process is defined as an instance of execution of a program
A process is a dynamic entity, a program is a static entity
A traffic controller handles the processes transitions from one state of execution to another

TWO LEVELS OF RESPONSIBILITY


1. Job scheduler: handles jobs as they enter the system
2. Process scheduler: manages each process within the jobs
Job scheduler Process scheduler
It’s the high level portion of the It’s the low level portion of the
processor manager processor manager
It accepts or rejects incoming jobs It decides which process gets the CPU
and for how long

MEMORY MANAGEMENT
- It is in charge of the main memory (RAM)
- It checks the validity of each request for memory space (checks if it’s a legal request)
- It allocates portion of the memory that isn’t already in use
- In multiuser environment, it sets up a table to keep track of who is using which
sections of the memory
- When the time comes to reclaim the memory, it deallocates the memory
- PRIMARY ROLE: To protect the space of the main memory by the OS itself. (it can’t
allow nay part of it to be altered)

DEVICE MANAGEMENT
- It monitors every device, channel, and control unit
- It chooses the most efficient way to allocate all the system’s hardware resources i.e.
printers, ports, disk drives etc.
- It allocates the system’s devices based on a scheduling policy chosen by the system’s
designers.
- It deallocates devices when the operation is complete, making the devices available
for the next process or job

FILE MANAGEMENT
- It keeps track of every file in the system i.e. data files, program files, compilers, apps,
etc.
- It enforces restrictions on who has access to which files using predetermined access
policies
- It controls what users are allowed to do with files once they access them
- It creates and deletes files to organize directories
- It supports primitives for manipulating files and directories
- It maps files onto secondary storage
- It backs up files on stable storage media

PRIMARY OBJECTIVES OF THE OPERATING SYSTEMS


- To provide an environment in which a user can execute programs conveniently
- It manages the computer hardware which must provide appropriate mechanisms to
ensure the correct operation of the computer systems

N.B.
1. It is a resource management
2. Interface/ virtual machine is an application that emulates the functionality of a
computer system

FUNCTIONS OF AN OPERATING SYSTEM


1. Memory management
2. Processor management
3. File management
4. Security i.e. privacy by means of password, protection to control access
5. Control over system performance: collects usage statistics for various resources and
monitors performance parameters such as response time.
6. Job accounting: keeps track of time and resources used by various jobs and users
7. Error detection and response: Provides a response that clears the error without
impacting the running applications
8. Booting the computer: the process of starting or restarting the computer
9. Coordination between other software and users
THE THREE MAIN FUNCTIONS OF AN OPERATING SYSTEM
- Manage the computer resources such as CPU, memory, disk drives and printers.
- Establish a user interface.
- Execute and provide services for application software

THE OPERATING SYSTEM TASKS


- Provides the facilities to create, modification of programs and data files using an
editor.
- Access to the compiler for translating the user program from high-level language to
machine language.
- Provide a loader program to move the compiled program code to the computer’s
memory for execution.
- Provide routines that handle the details of I/O programming.

N.B.
1. If computer is switched off completely and then turned on then it is cold booting.
If computer is restarted, then it is warm booting.
2. Operating System helps in implementing user interface.
3. Operating System allows users to share data among themselves.
4. Operating System prevents users from interfering with one another.
5. Operating System handles network communication.
MODULE 3- TYPES OF OPERATING SYSTEMS
TYPES OF OPERATING SYSTEMS
1) Batch Processing Operating System
2) Timesharing Operating System
3) Real Time Operating System
4) Networked Operating System
5) Distributed Operating System
BATCH OPERATING SYSTEM
- Implemented in the early 1950’s
- Users submit jobs to a central place where these jobs are collected into a batch and
subsequently placed on an input queue
- Users submit jobs on a regular schedule i.e. daily, monthly, etc.
- The response time is the turnaround time
- Jobs with similar needs are batched together and run as a group to speed up the
processing
- A compiler can be loaded once to process all the jobs in a row that are stored in
queues
- The jobs are executed automatically
- The commands are written in JCL (Job Control Language) i.e. command for marking a
job at the beginning and at the end, loading and executing programs.
- Batch jobs are executed one at a time
- There is no interaction between the user and the computer while the program is
being run
- There is an operator which takes similar jobs having the same requirement and
group them into batches. It is the responsibility of the operator to sort jobs with
similar needs.

-
-
N.B.
A) Turnaround time is the time from submission of the job until execution is completed and
the results are ready for return to the person who submitted the job.
B) Each piece of work for a batch processing is system is called a job. A job constitutes the
set of program instructions corresponding to a particular computation task. i.e. program and
data
BENEFITS OF BATCH PROCESSING
1. It allows sharing of computer resources among many users or programs
2. It shifts the time of job processing to when the computing resources are less busy.
Idle time is less
3. Multiple users can share the batch systems
4. It is easy to manage large work repeatedly

DISADVANTAGES OF BATCH PROCESSING


1. Turnaround time can be large from the user’s standpoint
2. It’s difficult to debug programs
3. Lack of interaction between user and the job
4. CPU is often idle because the speed of the I/O devices is slower than the CPU
5. Difficult to provide desired priority
6. The computer operators are not well known with batch systems
7. It is sometimes costly
8. The other jobs will have to wait for an unknown time if any job fails
9. It is very difficult to guess or know the time required for any job to complete
(Processors know how long the job would take when it’s on the queue)

EXAMPLES OF BATCH OPERATING SYSTEM


1. Payroll system
2. Bank statements
TIMESHARING OPERATING SYSTEM
- The computer provides computer services to several or many users concurrently
online
- The users can share the computer resources i.e. Memory, CPU, in a manner that is
facilitated, controlled and monitored by the OS.
- The user has full interaction with the program during its execution
- Timesharing systems were multimode systems (supported batch processing and real
time applications)
- Timesharing system is an example of multiprogramming systems because it
supported multiple interactive users
- Time sharing is also known as multitasking system
- Time sharing is a logical extension of multiprogramming
- The response time is typically short; user gives instructions through input devices
such as keyboard/mouse and receives immediate response
- Timesharing system is called an interactive system (point above is the reason)
- The CPU is the major device being shared among the multiple users
WHY IS TIMESHARING INTERACTIVE?
In time-sharing systems, the CPU executes multiple jobs by switching among them, but the
switches occur so frequently that the users can interact with each program while it is
running.
MULTIPROGRAMMED BATCH SYSTEMS VS TIMESHARING SYSTEMS
The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is
that in case of Multiprogrammed Batch Systems, the objective is to maximize processor use,
whereas in Time-Sharing Systems, the objective is to minimize response time.

Multi-
programmed Timesharing
Batch systems
Systems Maximizes Minimizes
processor use response time

ADVANTAGES OF TIMESHARING OPERATING SYSTEMS


1) Provides the advantage of quick response
2) Avoids duplication of software
3) Reduces CPU idle time
4) Each task gets an equal opportunity

DISADVANTAGES OF TIMESHARING OPERATING SYSTEMS


1) Problem of reliability
2) Question of security and integrity of user programs and data
3) Problem of data communication

N.B.
1. The task can be from a single user or a different user
2. The time each task gets to execute is called QUANTUM; after this time interval, the OS
switches over to the next task

EXAMPLES OF TIMESHARING OPERATING SYSTEMS


1. Multics
2. Unix etc.
REAL TIME OPERATING SYSTEMS
- Large number of events (mostly external to the computer system) must be accepted
and processed in a short while or within a certain deadline.
- KEY OBJECTIVE: To provide a quick response time and meet scheduling deadlines.
- It reduces certain functions when they cannot be executed within the time
constraints
- It monitors inputs consistently and in a timely manner.
- It keeps track of how much of each resources might possibly be used by the currently
running tasks
- The tasks must have a pre-known maximum time limit for each of the functions to be
performed by the computer
- Real time is used when there are rigid time requirements on the operation
- Real time systems can be used as a control device in a dedicated application

N.B.
1. The time interval required to process and respond to inputs is called RESPONSE TIME.
2. In real time operating systems, the response time is so small that it controls the
environment. (less than timesharing systems)
HARD REAL-TIME SYSTEMS
This OS is meant for applications where the time constraints are very strict and even the
shortest possible delay is not acceptable. Such systems include systems that are built for
saving lives i.e. airbags, automatic parachutes.
N.B.
1. Virtual memory is rarely found in this system.
2. Secondary storage is limited or missing (the data is stored in ROM).
SOFT REAL-TIME SYSTEMS
This OS is for applications where the time constraint is less strict. A critical real-time tasks
gets priority over other tasks and retains priority until it completes.
N.B.
1. They have limited utility than hard real-time systems
2. Examples of this system include Multimedia, Virtual reality, Advanced scientific projects
i.e. planetary rovers
ADVANTAGES OF REAL-TIME OPERATING SYSTEMS
1. Maximum consumption: maximum utilization of devices and system i.e. more output
from all the resources
2. Task shifting: The time assigned for shifting tasks in these systems are very less
3. Focus on application: focuses on running applications and less importance to
applications which are in the queue
4. RTOS in the embedded system: Since the size of programs are small, RTOS can also
be used in embedded systems like in transport and others
5. Error free
6. Memory allocation: memory allocation is best managed in RTOS

DISADVANTAGES OF REAL-TIME OPERATING SYSTEMS


1. Limited tasks: Very few tasks run at the same time and their concentrations is very
less on few applications to avoid errors
2. Use heavy system resources: sometimes, the system resources are not so good and
they are expensive as well
3. Complex algorithm: The algorithms are very complex and difficult for the designer to
write on
4. Device driver and interrupted signals: it needs specific device drivers and interrupts
signals to respond earliest to interrupts
5. Thread priority: it is not good to set thread priority as these systems are very less
prone to switching tasks
EXAMPLES OF RTOS
- Scientific experiments, medical imaging systems, industrial control systems, weapon
systems, robots, air traffic control systems, flight control, airline reservation systems,
missile systems, air traffic control systems, etc.

NETWORKED OPERATING SYSTEMS


- It enables processes to access resources
- This computing system is a collection of physical interconnected computers.
- The users are aware of the existence of multiple computers and can log into remote
machines and copy files from machine to another
- It runs on a server and provides the server the capability to manage data, users,
groups, security, applications and other networking functions.
- PRIMARY PURPOSE: To allow shared file and printer access among multiple
computers in a network i.e. LAN, private network, etc.
- The computers in the Networking system are called TIGHTLY COUPLED SYSTEMS
because the users are well aware of the underlying configuration of all other users
within the network and their individual connections, etc.
-
N.B.
1. A process can execute on the computer on which it is created or on another computer on
the network.
2. A user controls one computer but operates with other computers on the network i.e.
Each machine run its own local OS and has its own user and network interface controller.
ADVANTAGES OF NETWORKED OPERATING SYSTEMS
1) Centralized servers are highly stable
2) Security of server is well managed
3) Upgrades to new technology and hardware can be easily integrated into the system
4) Remote access to servers is possible from different locations and types of systems.
DISADVANTAGES OF NETWORKED OPERATING SYSTEMS
1) High cost of buying and running a server
2) Dependency on a central location for most operations
3) Regular maintenance and updates are required
EXAMPLES OF NETWORKED OPERATING SYSTEMS
- Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac
OS X, Novell Netware and BSD
DISTRIBUTED OPERATING SYSTEM
- It is recent technology
- It is also known as LOOSLY COUPLED SYSTEMS
- Various autonomous interconnected computers communicate with each other using
a shared communication network.
- Independent systems possess their own memory unit and CPU.
- MAJOR PURPOSE: It is always possible that one user can access the files or software
which are not present on his system but on some other system connected in the
network i.e. remote access is enabled within the devices in that network
- Distributed OS is a single OS that manages resources on more than one computer.
- It provides the illusion that multiple computers are single powerful computer so that
a process can access all of the system resources regardless of the process location
within the distributed system network computers.

ADVANTAGES OF DISTRIBUTED SYSTEMS


1) With file sharing facility, a user at one site may be able to use the resources
available at another
2) Speedup the exchange of data with one another via email
3) If one site fails, the remaining sites can continue operating as systems are
independent
4) Better service to the customers
5) Reduction of the load on the host computer
6) Reduction of delays in data processing
7) Computation is highly fast and durable (since resources are being shared)
8) The systems are easily scalable (as many systems can easily be added to the
network)

DISADVANTAGES OF DISTRIBUTED OS
1) They are difficult to implement
2) Requires complicated algorithm
3) Failure of the main network will stop the entire communication
4) These types of systems are not readily available as they are very expensive

EXAMPLES OF DISTRIBUTED OPERATING SYSTEM


- Solaris OS for SUN multiprocessor workstations
- Mack/OS (a multitasking and multithreading UNIX compatible OS)
- OSF/1 operating system
DIFFERENCE BETWEEN BATCH PROCESSING AND TIME SHARING SYSTEMS
BATCH PROCESSING TIMESHARING
The users have no interaction with the job The users have full interaction with the
during execution program during execution
It focuses on maximizing the processor It focuses on minimizing response time
The CPU is often idle as the other devices The CPU is never idle
are much slower than it
There is an operator that groups jobs based It doesn’t make use of an operator
on similar needs

DIFFERENCE BETWEEN TIME SHARING AND REAL TIME SYSTEMS


TIMESHARING REAL-TIME
A response is provided to the user in a The response is sent to the user based on
second or less time constraints
Switching method is available Switching method is unavailable
Resources are shared to the external Resources are not shared to the external
It deals with several processes concurrently It deals with only one application at a time
online

DIFFERENCE BETWEEN NETWORKED AND DISTRIBUTED SYSTEMS


NETWORKED DITRIBUTED
Tightly coupled system Loosely coupled system
All nodes can have different OSs All nodes have the same OS
Easy to implement Difficult to implement

DIFFERENCE BETWEEN BATCH PROCESSING AND REAL-TIME SYSTEMS


BATCH PROCESSING REAL TIME
Processor is only busy when work is Processor needs to be responsive and
assigned to it active always
There is no time limit There is time limit
The time for a job to complete is unknown The time for a task to complete is pre-
until it gets on the queue known
Completion time isn’t critical The time to complete the task is very
critical
Sorting is performed before processing No sorting is required
MODULE 4: CHARACTERISTICS AND EXAMPLES OF OPERATING
SYSTEM
HOW THE PROCESSOR PERFORMS ITS EXECUTION OF PROGRAMS?
- The CPU (Central Processing Unit) performs execution of a program operation
- After CPU execution, the compiled program (executable code) is stored on the hard
disk
- The code is then brought to the main memory where it must reside to be accessed
and processed by the CPU
N.B. CPU cannot directly access secondary storage device

CHARACTERISTICS OF AN OPERATING SYSTEM


EFFICIENCY

USABILITY ROBUSTNESS

SECURITY OPERATING SCALABILITY


SYSTEM

INTERACTIVITY EXTENSIBILITY

PORTABILITY

SCALABILITY

USABILITY

PORTABILITY

ROBUSTNESS

INTERACTIVITY

SECURITY

EFFICIENCY:

EXTENSIBILITY
SCALABILITY
- A scalable OS is able to use resources as they are added
- It can easily adjust its degree of multiprogramming
- Scalability is an important attribute of multiprocessor systems
- Scalability is the ability of a system to accommodate an increasing number of
elements or objects, to process growing volumes of work.
- Network OS is more scalable than Distributed OS
- Scalability issues arise from application code, hardware resources, and database
limitations

USABILITY
- A usable OS is one that has the potential to serve a significant user base.
- Usability relates to the effectiveness, efficiency and satisfaction with which users
achieve goals using computer systems
WHAT MAKES A USABLE OS?
- Easy to Learn
- Has an interface that works as users expect
- Has environments that are pleasant to look at and interact with.
- Efficient
- Controllable
- Human Friendly
- Error Tolerant
- Error Clarity
- Error Magnitude.

PORTABILITY
- A portable OS is designed such that it can operate on many hardware configurations
- Porting is the task of doing any work necessary to make the computer program run
in the new environment
- C programming language is portable because it is a hardware or platform
independent
- Linux is portable because it has already been ported to various systems; it can be
used in an operating systems other than the one in which it was created without
requiring major rework
ROBUSTNESS
- This is the ability of a computer system to cope with errors during execution and
cope with erroneous input.
- A robust OS is fault tolerant and reliable
- Areas of Computer Science that are encompassed by robustness are: robust machine
learning and robust security network.
N.B. Fault tolerance is the ability of OS to handle software and hardware error; the
system will not fail due to isolated application or hardware errors and if it if it fails it
does so by minimizing loss of work and preventing damage to the system hardware
INTERACTIVITY
- This allows applications to respond quickly to user actions and events
- Interactivity refers to the ability of users to interact with a computer system
- Examples of interactive OS’s are: Mac and Windows OS’s
Human-Computer Interaction (HCI)
HCI studies requires the evaluation of obtained observations while the user performs
certain tasks and habits of the user together.
These data are used in the development process of interactive systems.
HCI has four main components namely:
- The user
- The task
- The tools/ interface
- The context
AN OS DOES THE FOLLOWING ACTIVITIES RELATED TO INTERACTIVITY –
- Provides the user an interface to interact with the system.
- Manages input devices to take inputs from the user.

SECURITY
- A secure OS prevents user and software from assessing services and resources
without authorization
- The process of ensuring OS availability, confidentiality, integrity is known as
operating system security.
- OS security refers to the processes or measures taken to protect the operating
system from dangers, including viruses, worms, malware, and remote hacker
intrusions.
- A major security problem for operating system is Authentication problem.

EFFICIENCY:
- An efficient OS achieves high throughput and low average turnaround time
- Efficiency is the ratio of useful work to resources (processor and storage) expended
- An OS is efficient when all processes are optimized
FACTORS THAT MEASURE EFFICIENCY OF AN OS
-System performance metrics are the factors that measure the efficiency of an OS.
Examples are:
- Available memory
- Average bytes read/write
- Average read/write time
- Disk read/write per second
- Network utilization
- Pages input per second
- Processor queue length
- Processor usage
N.B. Throughput measures the amount of work a processor can complete within a
certain time period.
EXTENSIBILITY
- An extensibility OS will adapt well to new technologies and provide
capabilities to extend the OS to perform tasks beyond its original design.
- Extensibility is the ability of the software system to allow and accept the
significant extension of its capabilities without major rewriting of code or
changes in its basic architecture.
- An extensible language user can create new notations, new data structures,
new operations.
-

N.B. Scalability means a system is able to accommodate growth i.e. the system grows.
Extensibility means able to easily add something to the system.

EXAMPLES OF OPERATING SYSTEMS


The following are examples of operating system:
- Microsoft Windows (like Windows 10, Windows 8, Windows 7, Windows Vista and
Windows XP, Windows 2000)
- Apple Mac Os (formerly OS X)
- Chrome Os
- Blackberry Tablet OS
- Ubuntu.
The common operating systems are:
- Microsoft Windows
- Apple Mac Os
- Linux
- Android
- Apple’s OS

OS/390
- OS/390 is the IBM OS
- It is a renamed version of MVS (Multiple Virtual Storage)
- It comes with Unix and programming interfaces
- It can be used as both MVS system and Unix system simultaneously
- It runs older applications such as COBOL and FORTRAN
- The design objectives of MVS are to provide performance, reliability, availability and
capability for the large system environment.
- MVS attempt to recover programming errors; It has many functional recovery
routines that gains control in the event of an OS failure.
N.B.
COBOL: Common Business-Oriented Language
FORTRAN: Formula Translation
UNIX
- It is a multiuser, timesharing OS
- It is used on wide variety of computers
- It was developed in the early 1970’s (November 3rd, 1971) at Bell’s laboratory by Ken
Thompson and Dennis Ritchie
- It was the first OS to be written in a High level language (C language)
- It was the first open source/ system that could be improved by anyone
- Unix supported on systems supplied by Sun Microsystems is called Solaris
- Unix supported on Systems supplied by DEC is called Ultrix
- Unix supported on systems supplied by HP is called HP-Unix.
N.B.
- The normal practice was to use assembly language for writing OS due to which OS
were system dependent. They were usable only in the system for which they were
developed
- Open source software facilitates enhancements to software products by permitting
anyone in the developer community to test, debug and enhance applications.
- Examples of an open source are Linux, Free BSD, Open BSD (Berkeley Software
Distribution).

MICROSOFT WINDOWS
- It was developed in Microsoft to overcome the limitation of its own MS-DOS
VERSIONS OF MICROSOFT WINDOWS
- Windows 95
- Windows 98
- Windows 2000
- Windows Vista
- Windows XP
- Windows 7
- Windows 8
- Windows 10
- Windows 11

MAIN FEATURES OF MICROSOFT WINDOWS


- Easier for a new user to learn to use
- It is a single user, multitasking OS
- Allows file names containing up to 255 characters
-
MICROSOFT WINDOWS NT
- It is a multiuser timesharing OS
- It is designed to have Unix like features so that it can be used for powerful
workstations, network and database servers.
MAIN FEATURES OF MICROSOFT WINDOWS NT
- It supports multiprogramming and multiprocessing.
- It has built in networking and communication features.
- It has GUI.
- It can run Microsoft windows application and many Unix applications directly.

MACINTOSH (MAC)
- It was introduced in 1984 by Apple computer
- It was the first wildly sold PC with a GUI (Graphical User Interface)
- It was designed to provide users with a natural and user friendly computers
interface.
- It was the first OS to use the mouse, use of icons to represent objects, click and drag
actions.
- Mac OS proved to be relatively easy to learn and use because of GUI that use
graphical symbols to facilitate user interaction with programs.
- In Macintosh computers, the GUI was embedded in the OS
- OS Xerox’s Palo Alto Research Centre (PARC) developed the mouse and GUI.

MS-DOS
- It is a single user OS for IBM
- It was introduced in 1981
- It was the most popular OS for personal computers in the 1980’s.
Limitation of MS-DOS
- It was a single user OS that did not support multitasking.
- It did not have any protection features to protect two or more programs stored in
memory from one another.
- It had a command line interface that some people found difficult to use and hard to
learn.
-
LINUX
- It is an open source OS.
- It has both GUI and text based user interface.
- It is multitasking OS
- Linux could be installed on a computer system along with another OS e.g. windows
N.B.
- You can choose which OS to run at booting time.
- Linux boot manager/ Linux loader helps with booting.
- While running Microsoft windows, you can start Linux straight from MS-DOS
command prompt using LOADIN command.
ADVANTAGES OF LINUX OS
- it is cheap and free
- It can be copied and distributed without restrictions
- It is simple because many of the Unix features and tools are supported on Linux.
MODULE 5- TERMINOLOGIES USED IN OS AND HARDWARE CONCEPTS
TERMINOLOGIES USED IN OS
1. Register: is a high speed memory located on a processor that holds data for
immediate use by the processor.
2. Time slicing: for every workstation, there is only one microprocessor running. Each
task is given time slice of the microprocessor cycles when the time slice is up, the
task is suspended and the microprocessor executes the next task.
3. Device Driver: is a software through which kernel interacts with hardware devices.
4. Client: is a process that requests a service from another process (a server). The
machine on which the client process run is called Clients.
5. Server: is a process that provides services to other processes called clients. The
machine on which these processes run is also called a Server.
6. Fault Tolerance: is the operating system ability to handle software or hardware
errors.
7. Shell: is an application (Typically GUI or text based) that enables a user to interact
with an OS.
8. Response Time: is the interval from the time of submission of a job to the system for
processing to the time the first response to the job is produced by a system.
9. Single User System: is a system that is intended to serve one person at a time. It
runs windows as the OS.
10. Multiuser System: is a system that is intended to serve many users at a time. It is
connected to the LAN that is the number of computer called Workstations are
connected to a central computer so that the central computer is shared by all
workstation.
11. Process: is a unit of program in execution. It is a separately executable unit of code
that executes independently and competes for system resources with other
processes.

MULTIPROGRAMMING
- Multiprogramming is the ability of an operating system to execute more than one
program on a single processor machine.
- In a multiprogramming system, there are one or more programs loaded in the main
memory which are ready to execute.
- Only one program at a time gets the CPU for executing its instructions (Single
processor)
- Multiprogrammed systems provide an environment in which the various system
resources (CPU, memory, peripheral devices) are utilized effectively
- It stores multiple programs in the memory at once to execute them concurrently.
- There is at most one process running on the system, while others are waiting for
their turn (in the queue)
- MAIN PURPOSE: To maximize the use of the CPU
- The CPU is never idle (as long as there is at least one job to be executed)
- There is no user interaction with the system during execution of tasks
MULTIPROCESSING
- Multiprocessing is the ability of an operating system to execute more than one
process simultaneously on a multiprocessor machine.
- The computer uses more than one CPU at a time in this system
- If one processor fails, other processors are allowed to take over a function previously
performed by that processor

MULTITASKING
- Multitasking is the logical extension of multiprogramming.
- The main difference between multitasking and multiprogramming is that in
multitasking, the switching of jobs occurs so frequently and quickly that the users
can interact which each program while it’s running.
- Multitasking is the concurrent execution of multiple jobs (tasks given by user) in a
single user system.
- Multitasking is the ability of an operating system to execute more than one task
simultaneously on a single processor machine.
- Actually, the CPU switches from one task to the next so quickly that it appears as if
all the tasks are executing at the same time.
- No two tasks on a single processor machine can be executed at the same time (in
actual sense)
- More than one task/ program/ job/ process can reside into the same CPU at one
point of time

MULTITHREADING
- Multithreading is the ability of an operating system to execute different parts of a
program called threads at the same time.
- Threads are the light weight processes which are independent parts of a process or
program
- In multithreading systems, more than one thread is executed parallel on a single
CPU.
- It is a technique that incorporates multiple threads of execution within a process to
perform parallel activities possibly simultaneously.
COMPARISM BETWEEN MULTIPROGRAMMING, MULTIPROCESSING, AND
MULTITASKING
MAJOR DIFFERENCE BETWEEN MULTIPROGRAMMING AND MULTITASKING
MULTIPROGRAMMING MULTITASKING
There is no user interaction There’s full user interaction
during execution during execution

MAJOR DIFFERENCE BETWEEN MULTIPROCESSING AND MULTITASKING


MULTIPROCESSING MULTITASKING
Multiple processor Single processor

MAJOR DIFFERENCE BETWEEN MULTIPROGRAMMING AND MULTIPROCESSING


MULTIPROGRAMMING MULTIPROCESSING
Single processor Multiple processor

HARDWARE CONCEPTS
- Hardware is the mechanical device that makes up the computer.
- It consists of interconnected electronic devices that can be used to control
computer’s operation, input, and output.
- Computer hardware includes the physical parts of a computer, such as
Central Processing Unit (CPU), Monitor, Mouse, keyboard, computer data
storage, Graphics card, Sound card, Speakers and Motherboard.
-
HARDWARE COMPONENTS
1. Mainboard (Motherboard, main circuit board, system board, baseboard, planar
board, logic board): is the main Printed Circuit Board (PCB) in general-purpose
computers and other expandable systems. It serves as the backbone for
communication between hardware components, allowing them to communicate via
the electrical connections on the board (Printed Circuit Board).

N.B.
Printed Circuit Boards (PCB) is a hardware component that provides electrical
connection between devices at various locations on the board.

2. Processor: executes machine-language instructions and enforces protection for


system resources such as main memory. It is the logic circuitry that responds to and
processes the basic instructions that drive a computer
N.B.
The CPU is seen as the main and most crucial Integrated Circuitry (IC) chip in a
computer, as it is responsible for interpreting most of computers commands.

3. Memory: referred to Random Access Memory (RAM). It is the hardware in a


computing device where the operating system (OS), application programs and data
in current use are kept so they can be quickly reached by the device's processor
4. Secondary storage: used to store large amounts of data because of the limited
capacity and volatility of main/primary memory.
5. Buses: is a collection of traces (or other electrical connections) that transport
information between hardware devices.
6. Peripherals Devices: A peripheral device is any hardware device that is not required
for a computer to execute software instructions. Peripheral devices include many
types of I/O devices (e.g. printers, scanners and mice), network devices (e.g.,
network interface cards and modems) and storage devices (e.g., CD, DVD and disk
drives).
7. Timer and Clocks: Timers are associated with a clock in the system - against which a
timer's expiration is measured - when they are created. A timer begins to count
down to its expiration after having been set. Once the timer has expired, the timer
can be automatically rearmed.
SOFTWARE COMPONENTS
1. Processes: is the instance of a computer program that is being executed by one or
many threads
2. Threads: is a flow of execution through the process code, with its own program
counter that keeps track of which instruction to execute next, system registers which
hold its current working variables, and a stack which contains the execution history.
3. File: an object on a computer that stores data, information, settings, or commands
used with a computer program
4. Database: is an organized collection of data, generally stored and accessed
electronically from a computer system.
MODULE 6- MEMORY MANAGEMENT
- Memory management of an OS are concerned with the management of primary
memory.
- The primary memory is the memory that the processors directly access for
instructions and data.
- Primary memory is also called: core memory, real memory, main memory, physical
memory
- The aim of memory management is to organize and manage the computer’s memory
- The memory manager is an operating system component concerned with the system
memory organization scheme and memory management strategies. [Go to Module 2
for more info]
S

CONTIGUOUS VS NON-CONTIGUOUS MEMORY ALLOCATION


- In non-contiguous memory allocation, a program is divided into block and segment
that the system may place in nonadjacent slots in the main memory.
- Noncontiguous allocation allows for making use of holes (unused gaps) in memory
that would be too small to hold whole programs

SINGLE-USER CONTIGUOUS MEMORY ALLOCATION


- Each program to be processed must be loaded in memory.
- Two hardware items are needed: register and accumulator
- Register is to store the base address of the program
- Accumulator is to keep track of the size of the program as it’s being read into the
memory
- Once the program is loaded into memory, it remains there until execution is
complete.
ADVANTAGES OF SINGLE-USER CONTIGUOUS MEMORY ALLOCATION
- It requires simplicity
- It does not require great expertise to understand or use
DISADVANTAGES OF SINGLE-USER CONTIGUOUG MEMORY ALLOCATION
- It doesn’t support multiprogramming
- It can handle only one job at a time
- It leads to wastage of memory
- Poor utilization of processor
- Lack of flexibility
- User’s job is limited to the size of the available memory

GENERAL STRUCTURE OF THE ALLOCATION SCHEME


- As processes enter the system, they are put into an input queue
- The operating system takes into account the memory requirements of each process
and the amount of available memory space in determining which processes are
allocated memory
- When a process is allocated space, it is loaded unto the memory and it can then
compete for the CPU
- When a process terminates, it releases its memory which the operating system may
then fill with another process from the input queue

FIXED PARITION
- To create partition within the main memory, one partition is for each job
- Once the system is in operation, the partition sizes remain static.
- As each job terminates, the status of its memory partition is changed from busy to
free so incoming jobs can be assigned to the partition
Partition Partition Job Wasted
size size Space

1 8k 1k 7k

2 32k 9k 23k

3 32k 9k 23k

4 120k 33k 87k

5 520k 121k 399k

ADVANTAGES OF FIXED PARTITION


- Protection of the job’s memory space
- It is flexible because it allows several programs to be in the memory at the same
time
- Once a partition was assigned to a job, no other job could be allowed to enter its
boundaries either accidentally or intentionally
- The size of the job must match the size of the partition to make sure it fits
completely
DISADVANTAGES OF FIXED PARTITION
- It leads to internal fragmentation i.e. the unused spaces within the partition
- Large jobs have longer turnaround time
- If the partition sizes are too small, larger jobs will be rejected
DYNAMIC PARTITION
- In dynamic partition, jobs are given as much memory as they request when they are
loaded for processing
- In dynamic partition, memory is not wastes within the partition.
- It works on a first-come-first-serve basis
- In dynamic partitions, the partitions are allocated on the basis of first fit, best fit,
Worst fit.
N.B.
For both fixed and dynamic memory allocation, the operating system must keep lists of each
memory location noting which are free and which are busy. Then, as new jobs come into the
system, the free partitions must be allocated.

FIRST FIT STRATEGY


- The system places an incoming job in the main memory in the first available hole
that is large enough to hold it.
- It allows the system to make a placement decision quickly
- It is faster in making the allocation but it is not always efficient
- It is organized by memory location
- It can be in a random order
BEST FIT STRATEGY
- The system places an incoming job in the hole in the main memory in which it fits
most tightly and which leaves the smallest amount of unused space
- It requires searching all of the holes in memory for the best fit
- It is organized by size i.e. ascending order
- The sorting is expensive but it usually makes the best use of memory space
- It uses memory more efficiently and yields better memory utilization
WORST FIT STRATEGY
- Placing a job in main memory in the hole in which there is a largest possible hole
- It can be arranged in descending order
- Worst fit is the opposite of best fit
INTERNAL AND EXTERNAL FRAGMENTATION
Internal Fragmentation: it is a situation in which a fixed partition is only partially used by the
program, the remaining space within the partition is unavailable to any other job and is
therefore wasted.
External Fragmentation: it is a situation in which the dynamic allocation of memory creates
unusable fragments of free memory between blocks of busy or allocated memory

You might also like