Introduction To Systems Programming (CSE 405) Credit: 4 Prerequisite: CSE 301
Introduction To Systems Programming (CSE 405) Credit: 4 Prerequisite: CSE 301
Introduction To Systems Programming (CSE 405) Credit: 4 Prerequisite: CSE 301
Chapter 01
Introduction to Systems
Programming
(CSE 405)
Credit: 4
Prerequisite: CSE 301
By Desta Gebre (MSc.)
Objectives
Evaluation
Lab assignments (15-20%)
Quiz (10%)
Bonus programming Assignment (5%)
Mid exam (30-35%)
Final Exam (40%)
Total out of 105%
Introduction
A modern software application typically needs to manage both
private and system resources.
Private resources are its own data, such as the values of its internal
data structures.
System resources are things such as files, screen displays, and network
connections.
Threads and sub-processes are also system resources.
Definition
Computer System
Hierarchies
Contd
Relations
All the processes and programs are run under and controlled by an
OS such as Windows or Linux.
Machine Structure
One characteristic in which most system software differs
from application software is machine dependency.
Assembler: instruction format, addressing modes
Compiler: registers (number, type), machine
instructions
OS: all of the resources of a computing system.
Of course, some aspects of system software are machineindependent.
General design and logic of a assembler
Code optimization in a compiler
Linking of independently assembled subprograms.
Machine Structure
I/O processors are concerned with the transfer of
data between memory and peripheral devices.
The Central Processing Units (CPUs) are concerned
with the manipulation of data stored in memory.
The I/O processors execute instruction in the
memory; they are generally activated by a command
from CPUs. Typically this consists an execute I/O
instruction whose argument is the address of the
start of the I/O program.
The CPUs interpret the command and pass the
arguments to the I/O processors.
Basic Machine
The programmer has a basic machine at
his disposal that interprets instruction by
hardware.
A programmer writes series of 0s and 1s
(machine language) place them into
memory.
Press a button and start executing.
Mnemonics (Symbol)
As a solution to the difficulty of using
machine language, mnemonic symbols or
Assembly language was introduced.
Assemblers were written to automate the
translation of assembly language to
machine language.
Relocation
Relocation is the process of assigning load addresses to
various parts of a program and adjusting the code and
data in the program to reflect the assigned addresses.
Relocating loaders perform:
Allocate space in memory for programs (allocation)
Resolve symbolic references between objects
decks (linking)
Adjust all address dependent locations such as
address constants to correspond to allocated space
(relocation)
Physically place the machine instruction and data
into memory (loading)
Macros
Allows programmers to define an abbreviation of
part of a program that will be used now and again
in the program.
Macro processor:
Treats identical parts of a program defined by the
abbreviation as macro definition and saves it.
Substitutes all occurrences of the abbreviation
(macro call).
Operating Systems
An Operating system is a program that manages
the computer hardware. OS acts as an
intermediary between the computer user and
the computer hardware.
An amazing aspect of operating systems is how
varied they are in accomplishing these tasks.
Mainframe operating systems are designed
primarily to optimize utilization of hardware.
Personal computer (PC) operating systems
are designed to be convenient to use for the
user.
Thus, some operating systems are designed to
be convenient, others to be efficient, and
others some combination of the two.
Multiprogramming
Place more than one programs in a partitioned memory.
Fragmentation, some sections of memory became unused.
Reloadable memory (compaction)
Paging: Simple and demand