Você está na página 1de 9

HOMEWORK NO.

1
OF
SYSTEM PROGRAMMING

SUBMITTED TO: SUBMITTED BY:


Mandeep Kaur
Surendra
MCA 4th SEM
D3804A15
10806601
Part A
Q 1. System software is different from operating system. How?
Solu-
System software is computer software designed to operate the computer
hardware and to provide and maintain a platform for running application
software.

System software helps use the operating system and computer system. It includes
diagnostic tools, compilers, servers, windowing systems, utilities, language
translator, data communication programs, data management programs and more.
The purpose of system software is to insulate the applications programmer as
much as possible from the details of the particular computer complex being used,
especially memory and other hardware features, and such accessory devices as
communications, printers, readers, displays, keyboards, etc.

operating system (OS) is an interface between hardware and user, which is


responsible for the management and coordination of activities and the sharing of
the resources of a computer, that acts as a host for computing applications run on
the machine. One of the purposes of an operating system is to handle the resource
allocation and access protection of the hardware. This relieves the application
programmers from having to manage these details. Operating systems offer a
number of services to application programs and users. Applications access these
services through application programming interfaces (APIs) or system calls.
Q 2. Operating system rules the system give your comments? Give its
architectural details?
Solu-
Operating systems offer a number of services to application programs and
users. Applications access these services through application programming
interfaces (APIs) or system calls. By invoking these interfaces, the
application can request a service from the operating system, pass
parameters, and receive the results of the operation. Users may also interact
with the operating system with some kind of software user interface like
typing commands by using command line interface (CLI) or using a
graphical user interface. For hand-held and desktop computers, the user
interface is generally considered part of the operating system.
Operating system architecture

The computer architecture of a computing system defines its


attributes as seen by the programs that are executed in that
system, that is, the conceptual structure and functional behavior
of the machine hardware. Then, the computer architect defines
the functions to be executed in the hardware and the protocol to
be used by the software in order to exploit such functions. Note
that the architecture has nothing to do with the organization of
the data flow, the logical design, the physical design, and the
performance of any particular implementation in the hardware.

By Architecture we mean the order in which certain hardware


Processes are carried out by the OS and has nothing to do with
the logical software flow of the Computer.
An Operating System is the layer between the hardware and
software, as in

Q 3. Assemblers, compilers, linker and loader are termed as programming


systems? Give
examples?
Solu-
Assemblers-assembler is used to translate assembly language statements
into the target computer's machine code. The assembler performs a more or
less isomorphic translation (a one-to-one mapping) from mnemonic
statements into machine instructions and data. This is in contrast with high-
level languages, in which a single statement generally results in many
machine instructions.
There are two types of assemblers based on how many passes through the
source are needed to produce the executable program.
Assemblers are generally simpler to write than compilers for high-level
languages, and have been available since the 1950s. Modern assemblers,
especially for RISC based architectures, such as MIPS, Sun SPARC, and HP
PA-RISC, as well as x86(-64), optimize instruction scheduling to exploit the
CPU pipeline efficiently.

Compiler-A compiler is a computer program (or set of programs) that


transforms source code written in a computer language (the source language)
into another computer language (the target language, often having a binary
form known as object code). The most common reason for wanting to
transform source code is to create an executable program. Eg are c,c++ vb ,c#
complers.
Loader-A loader is a routine that loadsan object program and prepars it for
exeqution.there are various loading schemes: absolute,relocating,and direct
linking.in general,the loader must load,relocate,and link the object program.
Example-if a user wished to employee a squqre root subroutine, he woule have
to right his main program so that it would transfer to the loacation assigned to
the square root routine (sqrt).his program and subroutine would be assembled
together.if a second user wished to use the same subroutine ,he also would
assemble it along with his qwn program,and yhe complete machine language
translation would be loaded into memory.
Linker-linker is the part of an operating system (OS) that loads and links the
shared libraries for an executable when it is executed. The specific operating
system and executable format determine how the dynamic linker functions and
how it is implemented. Linking is often referred to as a process that is
performed at compile time of the executable while a dynamic linker is in
actuality a special loader that loads external shared libraries into a running
process and then binds those shared libraries dynamically to the running
process.

Part B
Q 4. Give application areas of various types of operating system with
examples?
Solu- operating system is a software component of a computer system that is
responsible for the management of various activities of the computer and the
sharing of computer resources. It hosts the several applications that run on a
computer and handles the operations of computer hardware

Types of Operating Systems

Within the broad family of operating systems, there are generally four types,
categorized based on the types of computers they control and the sort of
applications they support. The categories are:

Real-time operating systems:


They are used to control machinery, scientific instruments and industrial
systems. An RTOS typically has very little user-interface capability, and no
end-user utilities, since the system will be a sealed box when delivered for use..
In a complex machine, having a part move more quickly just because system
resources are available may be just as catastrophic as having it not move at all
because the system is busy.

Single-user, single-tasking operating system:


As the name implies, this operating system is designed to manage the computer
so that one user can effectively do one thing at a time. The Palm O.S. for Palm
handheld computers is a good example of a modern single-user, single-task
operating system.
Embedded System:
The operating systems designed for being used in embedded computer systems
are known as embedded operating systems. They are designed to operate on
small machines like PDAs with less autonomy. They are able to operate
with a limited number of resources. They are very compact and extremely
efficient by design. Windows CE, FreeBSD and Minix 3 are some examples
of embedded operating systems.
Single-user, multi-tasking operating system:
This is the type of operating system most people use on there desktop and
laptop computers today. Windows 98 and the Mac O.S. are both examples
of an operating system that will let a single user has several programs in
operation at the same time. For example, it's entirely possible for a Windows
user to be writing a note in a word processor while downloading a file from
the Internet while printing the text of an e-mail message.

Multi-user operating systems:


A multi-user operating system allows many different users to take advantage of
the computer's resources simultaneously. The operating system must make sure
that the requirements of the various users are balanced, and that each of the
programs they are using has sufficient and separate resources so that a problem
with one user doesn't affect the entire community of users. Windows 2000 and
Novell Netware can each support hundreds or thousands of networked users,
but the operating systems themselves aren't true multi-user operating systems.
The system administrator is the only user for Windows 2000 or Netware. The
network support and the entire remote user logins the network enables are, in
the overall plan of the operating system, a program being run by the
administrative user
Q 5. Operating system can be divided into how many parts give details of
each?
Solu-
A UNIX operating system consists of a kernel and some system programs. There
are also some application programs for doing work.
Kernel-The kernel is the heart of the operating system. It keeps track of files on
the disk, starts programs and runs them concurrently, assigns memory and other
resources to various processes, receives packets from and sends packets to the
network, and so on. The kernel does very little by itself, but it provides tools with
which all services can be built. It also prevents anyone from accessing the
hardware directly, forcing everyone to use the tools it provides. This way the
kernel provides some protection for users from each other. The tools provided by
the kernel are used via system calls.
System programs- The system programs use the tools provided by the kernel to
implement the various services required from an operating system. System
programs, and all other programs, run `on top of the kernel', in what is called the
user mode. The difference between system and application programs is one of
intent: applications are intended for getting useful things done (or for playing, if it
happens to be a game), whereas system programs are needed to get the system
working. A word processor is an application; mount is a system program. The
difference is often somewhat blurry, however, and is important only to compulsive
categorisers.

shell -A shell is a piece of software that provides an interface for users to an


operating system shell which provides access to the services of a kernel. However,
the term is also applied very loosely to applications and may include any software
that is "built around" a particular component, such as web browsers and email
clients that are "shells" for HTML rendering engines

Q 6. Machine language differs from assembly language give examples?


Write a program to
display your name using any of machine languages?
Solu-
Machine language-Machine code or machine language is a system of
instructions and data executed directly by a computer's central processing
unit. Machine code may be regarded as a primitive (and cumbersome)
programming language or as the lowest-level representation of a compiled
and/or assembled computer program.. Machine code is sometimes called
native code when referring to platform-dependent parts of language features
or libraries. Machine code should not be confused with so called "bytecode",
which is executed by an interpreter.
Example-
The MIPS architecture provides a specific example for a machine code whose
instructions are always 32 bits long. The general type of instruction is given by
the op (operation) field, the highest 6 bits. J-type (jump) and I-type (immediate)
instructions are fully specified by op. R-type (register) instructions include an
additional field funct to determine the exact operation. The fields used in these
types are:

6 5 5 5 5 6 bits
[ op | rs | rt | rd |shamt| funct] R-type
[ op | rs | rt | address/immediate] I-type
[ op | target address ] J-type

rs, rt, and rd indicate register operands; shamt gives a shift amount; and the
address or immediate fields contain an operand directly.

For example adding the registers 1 and 2 and placing the result in register 6 is
encoded:

[ op | rs | rt | rd |shamt| funct]
0 1 2 6 0 32 decimal
000000 00001 00010 00110 00000 100000 binary

Load a value into register 8, taken from the memory cell 68 cells after the
location listed in register 3:

[ op | rs | rt | address/immediate]
35 3 8 68 decimal
100011 00011 01000 00000 00001 000100 binary

Jumping to the address 1024:

[ op | target address ]
2 1024 decimal
000010 00000 00000 00000 10000 000000 binary

Assembly language-A program written in assembly language consists of a


series of instructions--mnemonics that correspond to a stream of executable
instructions, when translated by an assembler, that can be loaded into memory
and executed.

For example- an x86/IA-32 processor can execute the following binary


instruction ('MOV') as expressed in machine language (see x86 assembly
language):

Hexadecimal: B0 61 (Binary: 10110000 01100001)

The equivalent assembly language representation is easier to remember


(example in Intel syntax, more mnemonic):

MOV AL, 61h

This instruction means:

Move (really a copy) the hexadecimal value '61' into the processor register
known as "AL". (The h-suffix means hexadecimal or = 97 in decimal)

Você também pode gostar