Chapter: 2:XI_C++ Working with operating system An operating system has two parts. 1.Kernel 2.shell The kernel is responsible for interacting with hardware . Shell is responsible for interacting with user.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Working with operating system
An operating system has two parts.
The kernel is responsible for interacting with hardware .
Shell is responsible for interacting with user.
It acts as the command interpreter which takes the commands from the user, interprets then and takes action accordingly
Path: A path is a sequence of directory names which give hierarchy to access a particular directory or file name.
Pathname: The full name of a file or directory.
A??.exe means A followed by any two or less characters and extension.exe
Asterisk(*): The *(Asterisk) replace any number of characters.
A*.exe will list
*.* Can be used for referring all file with any primary name and any extension.
2.Types of Software
The proficiency, versatility and processing speed of desktop computers have advanced to such an extent that any type of information and data processing is like a child’s play to the machines which are now available.
Over the years , professional programmers have come out with incredible software and programs to enable our desktop computer to perform almost any type of task.
This chapter is dedicated to the “ computer software ” that played a very important role in making computers a household name.
Types of Software
=>A computer system consists of hardware and software for its proper functioning .
=>Hardware represents the physical and tangible components of the computer i.e. , the components that can be seen and touched.
=>Software represents the set of programs that govern the operation of the computer system and make hardware run. Software broadly classified into two categories.
System Software: The software that controls internal computer operations is called System Software.
The system software can further be classified into two categories:
1.Operating System: An Operating System is a program which acts as an interface between use and the hardware.
TYPES OF OS:
1.Single Program OS. As the name suggests , this OS is single user operating system , so only one user program can be supported and executed by it at any point.
2.MultiProgram OS. It supports multiprogramming.i.e., more than one user can be supported by it, therefore ,more than one user programs are loaded and active in the main store at he same time.
3.Time Sharing OS. This OS uses the time sharing technique. Each active user program is given a fair share of CPU time(δ),if the time elapses or an I/O operation is requested, CPU shifts over to the next jobs waiting and the previous program
4.Real Time os: The jobs have fixed deadlines and the jobs have to be completed within their deadlines. the system performance is measured by its ability to complete its jobs within specified deadlines. If a job cannot be complete within its deadline, its situation is called deadline overrun.
5. Multiprocessing os: The Multiprocessing os is capable of handling more than one processors as the have to be executed on more than one processor(CPU)
Assembler: It translates(converts) the assembly language program into an equivalent machine language program.
Compiler: It Translate(convert) the Entire HLL program into machine language program in one go, and reports all errors of the program along with the line numbers.
Interpreter: It Translate(convert) the HLL program into machine language program line by line.
It is a set of programs necessary to carry out operations for a specified application.
=> Types of services provided by OS :
(i). Program execution: It is responsible for executing various programs whether user programs or system programs.
(ii). Handling Input/output operation: It is responsible for Handling various Inputand various output in the appropriate manner.
(iii). Manipulation of file system: It is responsible for making of decisions regarding the storage of file.
(iv). Error Detecting and Handling : It is also responsible for detecting any type of errors that occurs and then properly handling it
(v).Resource Allocation: It is responsible for proper use of resources available.
(vi). Accounting: It keeps an account of what type of functioning is taking place and what type of errors have occurred.
(viii). Information and Resource Protection: It is responsible for ensuring that the information and resources available on machine are used in the correct way
=>Functions of an Operating System
An operating system has variety of functions to perform. It divided into three types:
(i). Processor Management: This deals with management of the Central Processing Unit (CPU). The operating system takes care of the allotment of CPU time to different processes. This is called scheduling.
=> Throughput: It is the amount of work accomplished in a given time interval.
=>Priority Scheduling: Each task is given CPU time according to the priority assigned to that task. The program with higher priority will be given CPU time before a program with lower priority. The CPU executes the task till it is completed or there is some interrupt request i.e. till the time operating system has to stop (interrupt) the current task due to an unavoidable job request.
=> There are two types of scheduling technique.
(i). Non-Preemptive scheduling.
(ii). Preemptive scheduling.
=>Non-Preemptive scheduling: A scheduled job always completes before another scheduling decision is made.
=>It is divided into three types:
(a). First Come First Serve(FCFS) Scheduling.
(b). Shortest Job Next(SJN) Scheduling.
(c). Deadline Scheduling.
=> First Come First Served Scheduling: It work on the basis of FCFO. The process, which requests the CPU First, is allocated the CPU first. A query is maintained called ready queue in which all the process , that want cpu time are entered.
=>Shortest Job Next(SJN) scheduling: Whenever a new job is to be admitted , the shortest of the arrived job is selected and given the cpu time. Throughput remain the same as in FCFS but waiting time improved.
=> Deadline Scheduling: a Deadline of a job is the time limit within a job must be over. If a job overshoots its deadline, it is said to be Deadline Over Run.
=> Deadline Over Run(K) = C-D
Where C is job completion time
D is Deadline for a job
=> Preemptive Scheduling: A scheduling decision can be made even while the job is executing whereas in Non-Preemptive scheduling , a scheduling decision is made only after job completes it execution. => It is Divided into two types
(i). Round Robin Scheduling.
(ii). Response Ratio Scheduling.
=>Round Robin Scheduling: This type of scheduling technique is also known as Time Sharing Scheduling. In this, each program or task is given a fixed amount of time to execute. The CPU continues with the execution till either the allotted time is over or there is some interrupt request or the task is completed before the allotted time. If the task is not completed at the end of the allotted time, it is put at the end of the queue. So each task gets its allotted share of CPU time. This scheduling technique improves the response time and provides an interactive environment.
=> Response Ratio Scheduling:
Execution time received
The job with highest response ration is preferred over others. When a short job arrives , its response ration is high, so it is scheduled for execution immediately.
=> Storage Management: In a computer, both the CPU and the I/O devices interact
with the memory. When a program needs to be executed it is loaded onto the main
memory till the execution is complete. Thereafter that memory space is freed and
is available for other programs. The common memory management techniques
used by the operating system are Partitioning and Virtual Memory.
=> Continuous Storage Allocation: each problem, , which is to be executed , is allocated a contiguous storage memory .each job step is considered as a single independent entity for allocation for a contiguous storage area.
=>Non-Continuous Storage Allocation: A program can be stored in Non-Continuous Storage area . A program is divided into smaller components of equal sizes. One of more components can be stored in the non-Continuous Storage area .each component in that particular memory area is provided addresses 0,1,2,…..n .
=> Virtual storage using Paging: In this technique the program is executed even if the complete program is not loaded on to the main memory. The operating system divides the main memory into equal sizes called pages. A part of the
=> Demand Paging: Bringing in(paging –in) the required pages is called DEMAND PAGING.
=> Virtual storage using Segmentation: In this technique, use of program segment. A program segment is a logical unit of a program as defined by a programmer.it is a piece of program logic which performs a specific task. The programmer only for determining how many segments a program should have or which program units should comprise a segment. Foe accessing a particular word in the segment, its logical address consists of two parts: (i). Segment Number. (ii). Word Number.
=> This segment number mapped on to ‘SEGMENT TABLE’ to get physical address of the segment and by adding the word’s identification number, physical or logical address of the word is found out. Again the hardware unit , address transformation unit , is responsible for generation of actual address of the required word within the segment.
=> Information Management: The Information Management component of OS is structured as follow:
(i). Physical IOCS(input-output control system): It is responsible for device management and for ensuring device independence.
(ii). Logical IOCS: It is responsible for efficient organization and access of the data on IO device.
(iii). File System: It is responsible for protecting and controlling sharing of files.
=> Commonly Used Operating Systems:
(i). Linux: Linux is a free and open software which means it is freely available for use and since its source code is also available so anybody can use it, modify it and redistribute it. It can be downloaded from www.linux.org.
(ii).Windows: Microsoft launched Windows 1.0 operating system in 1985 and since then Windows has ruled the world’s software market. It is a GUI (Graphic User Interface) and various versions of Windows have been launched like Windows. like Windows 7, Windows 8.
(iii). BOSS (Bharat Operating System Solutions): This is an Indian distribution of GNU/Linux. It consists of Linux operating system kernel, office application suite, Bharateeya OO, Internet browser (Firefox), multimedia applications and file sharing.
(iv). Solaris:It is a free Unix based operating system introduced by Sun Microsystems in 1992. It is now also known as Oracle Solaris.
(v). Mobile Operating Systems (Mobile OS): It is the operating system that operates on digital mobile devices like smart phones and tablets. The most commonly used mobile operating systems are –Android and Symbian.
=> Android: It is a Linux derived Mobile OS released on 5th November 2007 and by 2011 it had more than 50% of the global Smartphone market share. It is Google’s open and free software that includes an operating system, middleware and some key applications for use on mobile devices.
=> Symbian: This Mobile OS by Nokia (currently being maintained by Accenture) designed for smartphones. It offers high level of functional integration between communication and personal information management. It has an integrated mail box and it completely facilitates the usage of all Google applications in your smartphone easily.
=> Window Phone
=> Apple iOS
=> RIM BlackBerry OS
=>Distributed Operating System: On a network data is stored and processed on multiple locations. The Distributed Operating System is used on networks as it allows shared data/files to be accessed from any machine on the network in a transparent manner. We can insert and remove the data and can even access all the input and output devices. The users feel as if all data is available on their workstation itself.
=>Interactive Operating System: This is the operating system that provides a Graphic User Interface (GUI) through which the user can easily navigate and interact. The computer responds almost immediately after an instruction has been entered, and the user can enter new instructions after seeing the results of the previous instructions.