Lecture 3
Lecture 3
Lecture 3
Lecture 3:
• System software:
o Is an interface or buffer between application
software and hardware.
o Controls the computer hardware and acts as
an interface with applications programs.
Operating System Functions
• Perform common computer hardware
functions.
• Provide a user interface.
• Provide a degree of hardware independence.
• Manage system memory.
• Manage processing tasks.
• Provide networking capability.
• Control access to system resources.
• Manage files.
User Interface
• User interface:
A function of the operating system that allows
individuals to access and command the
computer
• Command-based user interface:
A particular user interface that requires text
commands be given to the computer to
perform basic activities
E.g., unix, DOS
• Graphical user interface (GUI):
A user interface that uses pictures (icons) and
menus displayed on the screen to send
commands to the computer system
E.g. Windows, MAC OS
Systems Software Concepts
• Hardware independence:
o Operating system (OS) provides hardware
independence for application software.
o Application software interfaces with the
operating system which interfaces with the
hardware.
o When the hardware is changed, the operating
system is changed so that the application
software is not required to be changed.
Software Concepts
• Memory management.
• Virtual memory & paging.
• Multitasking.
• Multithreading.
• Timesharing.
Memory Management
• Memory management:
Controls how memory is accessed and
maximizes available memory and storage.
Virtual Memory & Paging
• Virtual memory:
Memory that allocates space in secondary storage
to supplement the immediate, functional memory
capacity of RAM.
• Paging:
A function of virtual memory allowing the computer
to store currently needed pages in RAM while the
rest of the pages wait in secondary storage.
Memory Disk
• Programming languages:
Coding schemes used to write both systems and
application software.
Categories of Programming Languages (1)
• Machine Language:
1st generation programming language
Considered a low-level language because it
involves basic coding using the binary symbols
1 and 0.
• Assembly Language:
2nd generation language
Replaced binary digits with mnemonics (e.g.,
“ADD”) programmers could more easily
understand.
Categories of Programming Languages (2)
• Query languages:
Used to ask the computer questions in English-
like sentences.
Also known as database languages
• Structured query language (SQL):
A standardized language often used to perform
database queries and manipulations.
Object Oriented Languages (1)
• Object-oriented languages (OOL):
Languages that allow interaction of programming
objects, including data elements and the actions that
will be performed on them
Note: OOP = object-oriented programming
• Encapsulation:
The process of grouping items into an object
• Polymorphism:
A process allowing the programmer to develop one
routine or set of activities that will operate on
multiple objects
Object Oriented Languages (2)
• Inheritance:
Property used to describe objects in a group of
objects taking on characteristics of other objects
in the same group or class of objects.
• Reusable code:
The instruction code within an object that can be
reused in different programs for a variety of
applications.
• Examples: C++, Java.
Visual Programming Languages
• Visual programming languages:
o Languages that use a mouse, icons, or
symbols on the screen and pull-down menus
to develop programs.
o Examples: Visual Basic, Visual C++.
Fifth-Generation Languages
• 5th generation languages…
Combines rule-based code generation,
component management, visual programming
techniques, and reuse management.
• Knowledge-based management:
An approach to the development of computer
programs in which you do not tell a computer
how to do a job, but what you want it to do.
Programming Languages: Terminology (1)
• Language translator:
Systems software that converts a programmer’s
source code into its equivalent in machine
language
• Source code:
High-level program code written by the
programmer
• Object code:
Another name for machine language code
Programming Languages: Terminology (2)
Interpreter:
A language translator that translates one
program statement at a time into machine
code.
Program Machine
Interpret
statemen language
er statement
t
Statement
execution
Programming Languages: Terminology (3)
Compiler:
A language translator that converts a complete
program into machine language to produce a
program that the computer can process in its
entirety.
Step 1: Translate program
Machine
Computer
Compiler language
program program
Machine
language
program
Program
execution
System Calls
• An OS’s system calls are called the Application
Programmers Interface (API).
• System calls are routines run by the OS on behalf
of the user.
• They are run in supervisory mode
• Allow user to access I/O, create processes, get
system information, etc.
• How many system calls an OS has varies
o Unix: around a hundred
o Windows: around a thousand
System Startup
• On power up:
o everything in system is in random, unpredictable state
o special hardware circuit raises RESET pin of CPU
o sets the program counter to 0xfffffff0
o this address is mapped to ROM (Read-Only
Memory)
• BIOS (Basic Input/Output Stream):
o set of programs stored in ROM
o some OS’s use only these programs
MS DOS
o many modern systems use these programs to load
other system programs
o Windows, Unix, Linux
BIOS
General operations performed by BIOS:
1) find and test hardware devices - POST (Power-
On Self-Test).
2) initialize hardware devices:
- creates a table of installed devices.
3) find boot sector:
- may be on floppy, hard drive, or CD-ROM.
4) load boot sector into memory location
0x00007c00.
5) sets the program counter to 0x00007c00:
- starts executing code at that address.
Boot Loader
• Small program stored in boot sector.
• Loaded by BIOS at location 0x00007c0.
• Configure a basic file system to allow
system to read from disk.
• Loads kernel into memory.
• Also loads another program that will
begin kernel initialization.
Initial Kernel Program
• Determines amount of RAM in system:
o uses a BIOS function to do this.
many services
mach Unix
System Programs
• Application programs included with the
OS.
• Highly trusted programs.
• Perform useful work that most users need.
o listing and deleting files, configuring system.
o ls, rm, Windows Explorer and Control Panel.
o may include compilers and text editors.
• Not part of the OS.
o run in user space.
• Very useful.
Thanks ...