Cpe 312 Operating Systems Lessons
Cpe 312 Operating Systems Lessons
Based on the preliminary activities, what did you notice about it?
________________________________________________________
CONGRATULATIONS!
You may now proceed to the lesson.
➢ Internal structure of operating systems can differ. Structures of operating systems tend to
differ depending on the arrangement of files, how hardware and applications are installed
and controlled and how the user interacts with the system.
▪ SYNCHRONIZATION
▪ PROCESSOR
➢ Processor is the logic circuitry that responds to and processes the basic instructions that
drive a computer.
▪ VIRTUAL MEMORY
▪ I/O SUBSYSTEMS
➢ The primary concerns of I/O subsystem architecture include the coordination of central
processor and I/O subsystem activities, the mapping of external I/O processing
requirements into the basic functionality of the I/O subsystem, and the management of
concurrent processing activities within the I/O subsystem itself.
Operating Systems Page 4 of 14
Introduction to Operating Systems
▪ STORAGE SYSTEMS
➢ Storage is frequently used to mean the devices and data connected to the computer
through input/output operations.
▪ Sharing: how are resources shared ▪ Scale and growth: how to handle
among users? increased demand?
▪ Naming: how are resources named (by ▪ Compatibility: can we ever do anything
users and programs)? new?
▪ Reliability and fault tolerance: how to And the principles in this course are the
mask failures? methods/approaches/solutions to these issues.
▪ OS is complex
Between the hardware and the application software lies the operating system.
The OPERATING SYSTEM is a program that conducts the communication
between the various pieces of hardware like the video card, sound card,
printer, the motherboard and the applications.
➢ Computation
➢ Communication
➢ Input/output devices
➢ Physical resources
➢ Logical resources
Windows 95 and Windows 98 are actual operating systems on their own. The previous versions of
Windows use DOS as the operating system and adding a graphical user interface which
will do multitasking. But with Windows 95 Microsoft released an operating system that can
take advantage of the 32-bit processors.
Operating Systems Page 8 of 14
Introduction to Operating Systems
Prior to its announcement on July 22, 2005, Windows Vista was known by its
codename "Longhorn". Development was completed on November 8, 2006, and
over the following three months, it was released in stages to computer hardware and software
manufacturers, business customers and retail channels. On January 30, 2007, it was released worldwide
and was made available for purchase and download from Microsoft's website.
Windows CE is for small devices like palmtop and handheld computers. Lite versions of a
number of major applications are available to run on these devices.
Windows 7 made its official debut to the public on October 22, 2009 as the latest in
the 25-year-old line of Microsoft Windows operating systems and as the successor to
Windows Vista (which itself had followed Windows XP). Windows 7 was released in conjunction with
Windows Server 2008 R2, Windows 7's server counterpart.
Windows 8 is a completely redesigned operating system that's been developed from the
ground up with touchscreen use in mind as well as near-instant-on capabilities that
enable a Windows 8 PC to load and start up in a matter of seconds rather than in minutes. Windows 8 will
replace the more traditional
Operating Systems Page 9 of 14
Introduction to Operating Systems
The Apple Macintosh is a multitasking operating system that was the first graphical interface
to achieve commercial success. The Mac was an immediate success in the areas of graphics
production, and still commands the lion's share of that market. Apple made a major marketing
error when they decided to keep their hardware and software under tight control rather than
licensing others to produce compatible devices and programs.
OS/2 is IBM's 32-bit operating system. This is a popular system for businesses with complex
computer systems from IBM.
UNIX is an operating system developed by Bell Labs to handle complex scientific applications. University
networks are likely to use UNIX, as are Internet Service Providers. X-Windows is a
graphical interface for UNIX that some think is even easier to work with than Windows 98.
Operating Systems Page 10 of 14
Introduction to Operating Systems
An ABSTRACTION is software that hides lower level details and provides a set of higher-level
functions. An operating system transforms the physical world of devices, instructions, memory, and
time into virtual world that is the result of abstractions built by the operating system.
3. The operating system transforms the computer hardware into multiple virtual
computers, each belonging to a different program. Each program that is running is
called a process.
One can view Operating Systems from two points of views: RESOURCE MANAGER and EXTENDED
MACHINES. From RESOURCE MANAGER POINT OF VIEW, Operating Systems manage the different
parts of the system efficiently and from EXTENDED MACHINES POINT OF VIEW, Operating Systems
provide a virtual machine to users that are more convenient to use.
Operating Systems Page 3 of 11
Introduction to System Software and Application Software
Based on the preliminary activities, what did you notice about it?
________________________________________________________
CONGRATULATIONS!
You may now proceed to the lesson.
DEFINITION:
SOFTWARE is defined as a program or set of instruction that tells the computer what
to do. Computer software can be divided into two main classes: application software
and system software.
On the other hand, SYSTEM SOFTWARE is more transparent and less noticed by the typical computer
user. This software provides a general programming environment in which programmers can create
specific applications to suit their needs. This environment provides new functions that are not available at
the hardware level and performs tasks related to executing the application program.
Operating Systems Page 4 of 11
Introduction to System Software and Application Software
1. SYSTEM SOFTWARE – these programs are used to manipulate the basic operations of a
computer system. The user does not need to know the exact details of
how these tasks are performed. The system software takes care of
these exact details.
System software is a type of computer program that is designed to run a computer’s hardware and
application programs. System software acts as an interface between the hardware of the computer
and the application software that users need to run on the computer.
▪ BIOS (basic input/output system) gets the computer system started after you turn it on and
manages the data flow between the operating system and attached devices.
▪ BOOT PROGRAM loads the operating system into the computer’s main memory or
random-access memory (RAM).
▪ ASSEMBLER takes basic computer instructions and converts them into a pattern of bits
that the computer’s processor can use to perform its basic operations.
▪ DEVICE DRIVER controls a particular type of device that is attached to your computer.
The driver program converts the more general input/output instructions of the operating
system to messages that the device type can understand.
▪ SYSTEM UTILITIES
▪ DEVELOPMENT TOOLS
▪ They hide the “ugly” details of computer operations from the user. It creates a virtual
machine interface where the user does not need to know how the computer works on the
hardware level.
Operating Systems Page 5 of 11
Introduction to System Software and Application Software
▪ Computer programmer can write programs without knowing the details on how the
computer hardware works. It makes programming easier since programmers do not
need to know about how to control the hardware.
t the
System Software
(OS, Device Drivers) System software supports all application
The system Software controls the programs. For example, a user using an
printer as the document is printed
application program such as Microsoft Word
clicks on the save icon to tell Word to save a
Hardware
(Computer, Printer)
document. In this process, Word does not
communicate with the printer, but rather request the operating system to print the document.
a. DOCUMENT PRODUCTION SOFTWARE – these are programs that are used to compare,
edit, print, and electronically publish documents.
b. SPREADSHEET SOFTWARE – these are programs that are used to create and
manipulate spreadsheets electronically for analysis, planning, and modeling.
c. PRESENTATION SOFTWARE – these are programs that are used to create and display
information in the form of slide shows.
d. DATABASE MANAGEMENT SOFTWARE – these are programs that are used to store,
modify, and retrieve information from a database in an organized and structured manner.
Operating Systems Page 7 of 11
Introduction to System Software and Application Software
e. BUSINESS SOFTWARE – these are programs that can provide users with tools for
business management.
a. MULTIMEDIA SOFTWARE – these are programs that can manipulate picture, sound, and
video.
b. ENTERTAINMENT SOFTWARE
Operating Systems Page 3 of 13
Introduction to System Programming
Based on the preliminary activities, what did you notice about it?
________________________________________________________
CONGRATULATIONS!
You may now proceed to the lesson.
Definition:
1. MACHINE LANGUAGE – is the natural or primitive language that the computer actually
understands. It is a low-level language which consists of 0’s and 1’s and the only language a
machine understands.
▪ Most high-level programming has pre-defined functions and subroutines, thus make programming
easier.
▪ The assembly language program executable code is compact. A compact or short code would
mean that the program can execute faster.
▪ Assembly language is not constrained with certain programming conventions nor rigid coding
restrictions.
▪ Assembly language has instructions that allow programmers more direct control over memory
access.
Operating Systems Page 5 of 13
Introduction to System Programming
Some compilers first produce files that contain instructions in an intermediate language, which
can then be recompiled to machine language instructions.
2. INTERPRETERS – these system programs convert a high-level language program into machine
language. Unlike compilers, interpreters read one instruction from the source code, convert it to
machine language, and then execute it before proceeding to the next instruction. It also does not
generate an executable file.
Each instruction must be translated each time they are read. As a result, interpreted programs run
much slower than compilers.
Operating Systems Page 6 of 13
Introduction to System Programming
LINKER – is a system software that combines or links the object modules together with the
libraries which then form a single executable program called executable file.
In computing, a linker or link editor is a computer program that takes one or more object files
generated by a compiler and combines them into a single executable file, library file, or another
object file.
Each program is first converted to an object file or object module (which contains machine
language instructions) and then combined with other programs using a linker.
In high level languages, some built in header files or libraries are stored. These libraries are
predefined and these contain basic functions which are essential for executing the program. These
functions are linked to the libraries by a program called linker. If linker does not find a library of a
function then it informs to compiler and then compiler generates an error. The compiler
Operating Systems Page 7 of 13
Introduction to System Programming
automatically invokes the linker as the last step in compiling a program. Not built in libraries, it also
links the user defined functions to the user defined libraries. Usually a longer program is divided
into smaller subprograms called modules. And these modules must be combined to execute the
program. The process of combining the modules is done by the linker.
LOADER is a program that loads machine codes of a program into the system memory.
In computing, a loader is the part of an operating system that is responsible for loading programs. It
is one of the essential stages in the process of starting a program. Because it places programs into
memory and prepares them for execution. Loading a program involves reading the contents of
executable file into memory. Once loading is complete, the operating system starts the program by
passing control to the loaded program code. All operating systems that support program loading
have loaders. In many operating systems the loader is permanently resident in memory.
LOADER is the one responsible for bringing the load module to the main memory for execution.
Its main function is to perform address binding.
ADDRESS BINDING – is the process of assigning or mapping symbolic references to actual memory
locations. Address binding allocates a physical memory location to a logical pointer by associating a
physical address to a logical address, which is also known as a virtual address. Address binding is part of
computer memory management and it is performed by the operating system on behalf of the applications
that need access to memory.
Address binding relates to how the code of a program is stored in memory. Programs are written in
human-readable text, following a series of rules set up by the structural requirements of the programming
language, and using keywords that are interpreted into actions by the computer’s Central Processing Unit.
The point at which the executable version of a program is created dictates when address binding occurs.
Operating Systems Page 8 of 13
Introduction to System Programming
Symbolic variables are used to represent data in a program. Any name that represents the data it will
store.
1. ABSOLUTE LOADING
In ABSOLUTE LOADING, the load module has actual memory addresses assigned instead of
symbolic variables. The actual addresses may have been determined before or during compile
time. The load module is placed into main memory without performing address binding.
2. RELOCATABLE LOADING
In RELOCATABLE LOADING, address binding is performed right before the load module is
loaded and the address assignment is based on the available main memory location at that time.
The address that will be generated is referred to as RELATIVE ADDRESS. The relative address is
based on a reference point or base address.
Operating Systems Page 9 of 13
Introduction to System Programming
In DYNAMIC RUN-TIME LOADING, the absolute address is not generated when loaded, but only
when it is needed by the CPU. It places the load module in main memory but does not convert the
relative addresses to absolute addresses. Relocating a program becomes possible even though it
is executing.
Operating Systems Page 3 of 15
Operating System Fundamentals
Based on the preliminary activities, what did you notice about it?
________________________________________________________
CONGRATULATIONS!
You may now proceed to the lesson.
Definition:
OPERATING SYSTEM – is a system software that allows users or the application programs they are using
to interact with the computer hardware in an easy and convenient manner.
1. It creates a virtual machine interface between the user/ application program and the
hardware. This is called Hardware Abstraction or Resource Abstraction wherein users and
application programs are isolated from the details of the hardware resources.
a. CPU. The operating system makes sure that the CPU is shared efficiently and is kept
busy at all times.
b. MAIN MEMORY. The operating system must be able to allocate the limited memory
locations to all processes for the CPU execution.
c. I/O DEVICES.
1. The operating system should make the computer easy and convenient to use.
2. The operating system should manage the resources of the computer system to make them more
Operating Systems Page 4 of 15
Operating System Fundamentals
efficient.
1. SHELL – often called command interpreter, is the part of the operating system that serves as the
interface between users and the kernel. Users enter command via the shell in order to use the
service of the kernel.
2. KERNEL - is the heart and soul of the operating system. It directly controls the computer hardware
and performs the services of the operating system.
The kernel hides the hardware details from the user and application programs. The services
offered by the kernel must be used in order to access hardware resources. The kernel makes
appropriate system calls or requests to communicate with the hardware resources. An operating
system’s kernel always resides in the main
memory for immediate access to its services.
The operating system must be executed when the computer is turned on. You turn on the
power supply to your computer. A bootstrap program stored in the computer’s read-only
memory (ROM) is executed upon power on. This sends electricity to the motherboard on a
wire called the ‘Voltage Good‘ line. If the power supply is good, then the BIOS (Basic
Input/Output System) chip takes over. At this stage the computer ‘s CPU is operating in Real Mode (or real
address mode), which means that it is only capable of using approximately 1 MB of memory built into the
motherboard. RAM will be initialized later using device drivers from the operating system.
The BIOS chip contains basic instructions for starting up the rest of the computer system. The first thing
that it will do is a Power-On Self-Test (POST), which will check to make sure all your hardware is working
properly. If the hardware is all working, BIOS will then look for a small sector at the very beginning of your
primary hard disk called the Master Boot Record (MBR). The MBR contains a list, or map, of all of the
partitions on your computer ‘s hard disk (or disks).
After the MBR is found the Bootstrap Loader follows basic instructions for starting up the rest of the
computer, including the operating system. If multiple operating systems are installed, the user will be given
a choice of which operating system to use. Another program called boot block loader locates the
operating system and loads it in the main memory. At this point, the operating system takes charge of the
computer system.
1. PROGRAM EXECUTION
operating system. It also prevents unauthorized access to file unless the user has been given the
right to do so.
3. SYSTEM ACCESS
The operating system prevents unauthorized access to the computer system. This is usually
done by implementing a log-in mechanism such as user account and the corresponding password.
Access privileges, can also be modified depending on user type. In this way, improper and
malicious use of resources can be prevented.
5. ERROR HANDLING
The operating system needs to be detecting and correcting errors constantly. Errors may occur
The operating system detects hardware- and software- oriented errors within the computer system
and also takes proper actions to resolve them. When an error is encountered, the operating
system may:
c. Report the error to the user and let the user take the necessary remedial action.
Operating Systems Page 7 of 15
Operating System Fundamentals
6. COMMUNICATION
The kernel contains the core services of the operating system. These are:
➢ It is responsible for determining which among programs will execute first and determine
runtime duration if there are several programs running in a CPU.
➢ It is responsible for creating new processes in the system and managing the most
fundamental resources associated with a process. These services are all provided via
messages.
2. MEMORY MANAGER
➢ It handles memory allocation and monitor which memory areas are in use and which are
free or available.
➢ It organizes the files stored in the secondary storage and presented for easy access by the
file manager. Folders and files may be displayed in a hierarchical tree based on their
directory structure. Some file managers contain features inspired by web browsers,
including forward and back navigational buttons.
Operating Systems Page 8 of 15
Operating System Fundamentals
➢ It is a computer program that provides a user interface to manage files and folders. The
most common operations performed on files or groups of files include creating, opening,
renaming, moving or copying, deleting and searching for files, as well as modifying file
attributes, properties and file permissions.
➢ It manages the different input-output devices of the computer system. It grants user
requests to use the I/O devices and resolves conflict issues when two or more programs
access a device at the same time.
2. MULTIPROCESSOR SYSTEMS
In an AMP system, specific tasks are assigned to each processor. For this reason, each
processor may have its own unique software or only a part of the operating system will be
executed.
3. NETWORKED SYSTEM
4. DISTRIBUTED SYSTEM
a. Transparency – it must ensure that users have a convenient and uniform way of using all
resources within the system.
c. Reliability – it must also have fault detection and recovery mechanisms so that if one
computer fails to function, it will not affect the whole system.
5. REAL-TIME SYSTEM
HANDHELD POS
Two operating systems currently dominate mobile computing: Apple iOS and Google Android.
iOS was designed to run on Apple iPhone and iPad mobile devices. Android powers smartphones
and tablet computers available from many manufacturers.
Other examples of handheld operating systems for PDAs are PalmSource’s Palm OS and
Microsoft’s Windows Mobile.
Operating Systems Page 3 of 14
History of Operating System
Based on the preliminary activities, what did you notice about it?
________________________________________________________
CONGRATULATIONS!
You may now proceed to the lesson.
After Babbage’s unsuccessful efforts, little progress was made in constructing digital
computers until World War II. Around the mid-1940s, Howard Aiken at Harvard, John von
Neumann at the Institute for Advanced Study in Princeton, J. Presper Eckert and William
Mauchley at the University of Pennsylvania, and Konrad Zuse in Germany, among others, all
succeeded in building calculating engines. The first ones used mechanical relays but were
very slow, with cycle times measured in seconds. Relays were later replaced by vacuum
tubes.
Mainframe computers were used in the late 1940s and early 1950s. These computers were massive,
enormous, filling up entire rooms with tens of thousands of vacuum tubes, expensive, slow, and very
primitive. Mainframes were locked away in specially air-conditioned computer rooms, with staffs of
professional operators to run them. Only big corporations or major government agencies or universities
could afford the multimillion-dollar price tag.
In addition:
1. These computers have no operating systems, so these computers were “bare” machines.
Computer users should be well-versed with computer hardware since they communicate directly
with it.
Operating Systems Page 4 of 14
History of Operating System
2. These computers can only be used by one person at a time. Each programmer is assigned a
time schedule to use the machine. Each program is processed one after another, hence referred
to as SERIAL PROCESSING.
the introduction of punched cards. It was now possible to write programs on cards and read them
in instead of using plugboards; otherwise, the procedure was the same.
After a program is encoded, the punch cards will be taken to the computer room according to the
assigned schedule. A device called punched card reader is used to read the punch cards,
generate the electronic form of the program, and load it into the main memory for compilation. The
punch card reader is connected to the computer.
The punch cards should be reloaded again every time a program needs to be executed. The
compilers, assemblers, linkers, loaders, etc. stored in punched cards or magnetic tapes should be
loaded as well.
The introduction of the transistor in the mid-1950s changed the picture radically.
Computers became reliable enough that they could be manufactured and sold to paying
customers with the expectation that they would continue to function long enough to get
some useful work done. For the first time, there was a clear separation between designers, builders,
operators, programmers, and maintenance personnel.
Given the high cost of the equipment, it is not surprising that people quickly looked for ways to reduce the
wasted time. The solution generally adopted was the batch system. Batch processing started in the mid-
1950s wherein similar jobs were grouped and processed together as a batch. Instead of using the
computer one programmer at a time, a computer operator may be assigned to get all their punched cards.
The operator will load the compiler and then compile their programs as a group. The results are set-up
Operating Systems Page 6 of 14
History of Operating System
time was reduced (since the compiler is setup only once) and CPU utilization is increased.
In batch processing, punched card decks are stacked on top of another and were separated by control
cards. Control cards contain information or instructions on how the job following it should be performed by
the computer. These cards are placed in the punched card reader.
The idea behind it was to collect a tray full of jobs in the input room and then read them onto a magnetic
tape using a small relatively) inexpensive computer, such as the IBM 1401, which was very good at reading
cards, copying tapes, and printing output, but not at all good at numerical calculations. Other, much more
expensive machines, such as the IBM 7094, were used for the real computing. This situation is shown in
the figure below.
Developing and maintaining two completely different product lines was an expensive
proposition for the manufacturers. In addition, many new computer customers initially
needed a small machine but later outgrew it and wanted a bigger machine that would
run all their old programs, but faster. IBM attempted to solve both of these problems at a single stroke by
introducing the SYSTEM/360.
The SYSTEM/360 was the first major computer line to use (small-scale) Integrated Circuits (ICs), thus
providing a major price/performance advantage over the second-generation machines, which were built up
Operating Systems Page 7 of 14
History of Operating System
Multiprogramming
The price of computer peripherals decreases in the late 1960s. Video display terminals
which can be connected to mainframes and/or minicomputers were easily purchased.
On-Line Processing became possible wherein users can now directly compile and
execute their programs in the computer.
Operating Systems Page 8 of 14
History of Operating System
MULTITASKING
In some circumstances, if multiprogramming is used, there might be cases wherein the CPU might be busy
executing a certain program, neglecting the needs of other users. As a solution to this problem, Time-
Sharing or Multitasking Operating System was developed. The CPU is assigned to a user or process for a
time period (also called Time Slice or Time Quantum) by the operating system. This time period is usually
in the range of a few milliseconds. After a user consumes its time slice, the CPU is assigned to another
user or process and so on. This happens very fast that the users feel like they each have their own
computer instead of sharing a single CPU. However, the entire computer system will slow down as the
number of users increase.
With the development of LSI (Large Scale Integration) circuits, chips containing thousands of transistors on
a square centimeter of silicon, the age of the personal computer dawned.
In 1974, when Intel came out with the 8080, the first general-purpose 8-
bit CPU, it wanted an operating system for the 8080. In part to be able to
test it, Intel asked one of its consultants, Gary Kildall, to write one. Kildall
and a friend first built a controller for the newly-released Shugart
Associates 8-inch floppy disk and hooked the floppy disk up to the 8080,
thus producing the first microcomputer with a disk. Kildall then wrote a
disk-based operating system called CP/M (Control Program for Microcomputers) for it. Since Intel did
not think that disk-based microcomputers had much of a future, when Kildall asked for the rights to CP/M,
Intel granted his request. Kildall then formed a company, Digital Research, to further develop and sell
CP/M.
In the early 1980s, IBM designed the IBM PC and looked around for software to run on it. People from IBM
contacted Bill Gates to license his BASIC interpreter. They also asked him if he knew of an operating
system to run on the PC. Gates suggested that IBM contact Digital Research, then the world’s dominant
operating systems company. Making what was surely the worst business decision in recorded history,
Kildall refused to meet with IBM, sending a subordinate instead. To make matters worse, his lawyer even
refused to sign IBM’s nondisclosure agreement covering the not-yet-announced PC. Consequently, IBM
went back to Gates asking if he could provide them with an operating system.
CP/M, MS-DOS, and other operating systems for early microcomputers were all based on users typing in
commands from the keyboard. That eventually changed due to research done by Doug Engelbart at
Stanford Research Institute in the 1960s. Engelbart invented the GUI (Graphical User Interface),
pronounced ‘‘gooey,’’ complete with windows, icons, menus, and mouse. These ideas were adopted by
researchers at Xerox PARC and incorporated into machines they built.
Operating Systems Page 10 of 14
History of Operating System
One day, Steve Jobs, who co-invented the Apple computer in his garage, visited
PARC, saw a GUI, and instantly realized its potential value, something Xerox
management famously did. Steve Jobs then embarked on building an Apple with a
GUI. This project led to the LISA, which was too expensive and failed
commercially. Steve Jobs’ second attempt, the Apple Macintosh, was a huge
success, not only because it was much cheaper than the Lisa, but also because it
was user friendly.