Linux and Programming in C++

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

LINUX AND PROGRAMMING IN C++

by
Syllabus
Introduction to Linux-Linux basic Commands- File System
Hierarchy-Users, groups and permissions. Programming
paradigms - Basic concepts and benefits of Object
Oriented Programming, An overview of C++, datatypes,
Selection statements, Functions, Arrays, Function
overloading . Classes and objects, Default constructor,
operator overloading, Friend functions - virtual functions.
Templates, Exception handling. Derived classes-
Inheritance, Virtual Base Class, Abstract class,
Polymorphism and Virtual Functions-Virtual Base class.
Console Input /output operation, File Handling. Error
handling.
INTRODUCTION TO
LINUX
OPERATING SYSTEM?????
ANY RELATION?????
INTRODUCTION TO OS
• The operating system (OS
) is the most important program that runs on a computer.

• Every general-purpose computer must have an operating syste


m to run other programs and applications.

• Computer operating systems perform basic tasks, such as reco


gnizing input from the keyboard
, sending output to the display screen, keeping track of files
and directories on the disk, and controlling peripheral devices
such as printers. 
CONT…
• For large systems, the operating system has even
greater responsibilities and powers.

• It is like a traffic cop — it makes sure that different


programs and users running at the same time do not
interfere with each other.

• The operating system is also responsible for security,


ensuring that unauthorized users do not access the
system.
Operating SYSTEM
Classification of Operating
systems
 Multi-user
 Multi processing
 Multitasking
 Multithreading
 Real Time
Multi-User
• A multi user operating system is that which handles
and controls multiple users attached to a single
computer.
• All mainframes and minicomputers are multi-user
systems.
• Another term for multi-user is time sharing.
Multi-User
Advantage
 Printing jobs in the office or library can be best handled by multi user operating
system. Normal OS cannot do the same job as printing can be mismatched.

 Each user can access same document on own pc. For example if one computer has
a song or movie then other computers attached with it will play that song or movie
on their pc also.

 Airlines also use this system and ticket reservation is also done by this system.

 Teachers and library staff also use multi user operating system for handling books
and for searching books. The book record is stored in one computer and other
terminals access to single resource to query the books.
DISADVANTAGES
• If you have computer that has private information then then sharing your
computer with multiple users is dangerous.

• If one computer get attacked by a virus then other computers also get
suffered.

• Your computer information will be shared to other users also.


Multi-Processing
• computer system's ability to support more than one process (program) at
the same time.

• Multiprocessing operating systems enable several programs to run


concurrently.

• UNIX is one of the most widely used multiprocessing systems.

• Multiprocessing systems are much more complicated than single-


process systems because the operating system must allocate
resources to competing processes in a reasonable manner.
Multi-Processing
• Multiprocessing is the ability of an
operating system to execute more than
one process simultaneously on a multi
processor machine.
• In this, a computer uses more than one
CPU at a time.
Multi-Processing
Example
• UNIX
• LINUX
• WINDOWS 2000
Multitasking
• Multitasking is the ability of an operating system to execute
more than one task simultaneously on a single processor
machine.

• Though we say so but in reality no two tasks on a single


processor machine can be executed at the same time.

• Actually CPU switches from one task to the next task so


quickly that appears as if all the tasks are executing at the
same time. More than one task/program/job/process can reside
into the same CPU at one point of time.
Cont…
• In simple, OS that is capable of allowing
multiple software process to run at the
same time.
• Examples:
• UNIX
• WINDOWS XP,VISTA
Multitasking
Multithreading
• Multithreading is the ability of an operating system to execute
the different parts of a program called threads at the same
time.

• Threads are the light wait processes which are independent


part of a process or program.

• In multithreading system, more than one threads are executed


parallely on a single CPU.
MULTITHREADING
REAL TIME
• Abbreviated as RTOS, a real-time operating system or embedded operating
system is a computer operating system designed to handle events as they occur.

• Real-time operating systems are commonly found and used in robotics, cameras,
complex multimedia animation systems, communications, and have various
military and government uses.

• Embedded operating systems are stored in a ROM chip instead of a


hard drive and contain only the absolutely necessary files for the device it is
running on. Because it does not load executable files, it is only capable of
running one application at a time.
Cont..
• Many operating systems, such as
Windows and Linux, have embedded
versions. Other examples include
Chimera, Lynx, MTOS, QNX, RTMX, RTX,
and VxWorks.

You might also like