MARQUEE

this blog is only for the important notes for the paper solving systematic created by RANJEET TIWARI.

facebook page

Sunday, 4 February 2018

Operating system notes chapter 1

Operating system  -An operating system (OS) is system softwarethat manages computer hardware and software resources and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also include accounting software for cost allocation of processor timemass storageprinting, and other resources.
For hardware functions such as input and output and memory allocation, the operating system acts as an intermediary between programs and the computer hardware,although the application code is usually executed directly by the hardware and frequently makes system calls to an OS function or is interrupted by it. Operating systems are found on many devices that contain a computer – from cellular phonesand video game consoles to web servers and supercomputers.
Image result for operating system
Function of operating system  

  • Start the computers.
  • Running applications program .
  • Running utility program .
  • Managing files .
  • Providing services 

Start the computers  : As we know the bios and diagaustic routine as available in rom .There  are permanently available to check I/O devices.In addition rom contains a boot strap

loder which is used to start the computer.When  the computer is switched onLAUTOMATICALLY BEGINS TO EXECUTE THE BOOT PROGRAM .THE PROGRAM IA A FIRST RUNS DIAGAUSTIC PROGRAM TO CHECK THE STATUS OF RAM AND OF EACH THE ATTACH SYSTEM DEVICE . THE BOOT PROGRAM THEN READS THE PROGRAM FROM THE DISK.  NOW THE CONTROL OF THE COMPUTER SYSTEM IS TURNED OVER THE OPERATING SYSTEM SUCH AS    C:\>.



 Running applications program  : TO RUN AN APPLICATION PROGRAM SUCH AS "TURBO C " PROGRAM , THE USER TYPES GETTING THE DOS PROMPT ON THE SCREEN .FOR THIS USER FOLLOW THE PROCESSOR GIVEN BELOW.
                                              C:\> CD TCC↩
                                               C:\>TCC> TC↩




Running utility program : AN OS. INCLUDES UTILITY PROGRAM THAT GIVE THE USER CONTROL OVER VARIOUS FEATURES OF THE COMPU2TER THE UTILITY PROGRAM ARE EITHER RESIDENT OR TRANSIENT . THE RESIDENT PROGRAM ARE ALWAYS PRESENT IN RAM . TRANSIENT PROGRAM WE READ INTO RAM AS THEY  REQUESTED . THERE ,SOME DOS COMMAND  USING SOME TYPICAL UTILITY PROGRAM ARE "DIR, FORMAT,COPY, REN .


Managing files: THIS INFORMATION INCLUDES THE FILES NAME THE NUMBER  OF BYTES IN THE FILES WAS LAST ALTERED. SOME OS ALLOW DISCRIPTED FILE ATTRIBUTE IN THE DIRECTORY. 

Providing services : AN OS. PROVIDE SERVICE SO THAT THE PROGRAMMER CAN CONTROL THE COMPUTER SYSTEM.

              Types of operating system 

 Single user operating system :- 
Single user mode is a mode in which a multiuser computer operating system bootsinto a single superuser. It is mainly used for maintenance of multi-user environments such as network servers. Some tasks may require exclusive access to shared resources, for example running fsck on a network share. This mode can also be used for security purposes - network services are not run, eliminating the possibility of outside interference. On some systems a lost superuser password can be changed by switching to single user mode, but not asking for the password in such circumstances is viewed as a security vulnerability.

Batch operating system :  Batch processing is the execution of a series of jobs in a program on a computer without manual intervention (non-interactive). Strictly speaking, it is a processing mode: the execution of a series of programs each on a set or "batch" of inputs, rather than a singleinput (which would instead be a custom job). However, this distinction has largely been lost, and the series of steps in a batch process are often called a "job" or "batch job".
Image result for batch operating system
    

                                   Advantages 

Repeated jobs are done fast in batch systems without user interaction.
You don’t need special hardware and system support to input data in batch systems.
Best for large organizations but small organizations can also benefit from it.
Batch systems can work offline so it makes less stress on processor.
Sharing of batch system for multiple users.
The idle time batch system is very less.
                               Disadvantages
Computer operators must be trained for using batch systems.
It is difficult to debug batch systems.
Batch systems are sometime costly.
If some job takes too much time i.e. if error occurs in job then other jobs will wait for unknown time

Multi processing operating system : -
Multiprocessing is the use of two or more central processing units (CPUs) within a single computer system.The term also refers to the ability of a system to support more than one processor or the ability to allocate tasks between them.There are many variations on this basic theme, and the definition of multiprocessing can vary with context, mostly as a function of how CPUs are defined (multiple cores on one die, multiple dies in one package, multiple packages in one system unit, etc.).
Image result for multiprocessing operating system

                                                                       Advantages: -


1.higher performance due to parallel processing.
2.if one CPU get failed other CPU are used to do that CPUs job.

  Disadvantages: 

1.complex OS is required.
2.large main memory requried.
3.very expensive


MultiProgrammingOperating  System / MultiTaskingoperating  System

In a multiprogramming system there are one or more programs loaded in main memory which are ready to execute. Only one program at a time is able to get the CPU for executing its instructions (i.e., there is at most one process running on the system) while all the others are waiting their turn.
The main idea of multiprogramming is to maximize the use of CPU time. Indeed, suppose the currently running process is performing an I/O task (which, by definition, does not need the CPU to be accomplished). Then, the OS may interrupt that process and give the control to one of the other in-main-memory programs that are ready to execute (i.e. process context switching). In this way, no CPU time is wasted by the system waiting for the I/O task to be completed, and a running process keeps executing until either it voluntarily releases the CPU or when it blocks for an I/O operation. Therefore, the ultimate goal of multiprogramming is to keep the CPU busy as long as there are processes ready to execute.
Note that in order for such a system to function properly, the OS must be able to load multiple programs into separate areas of the main memory and provide the required protection to avoid the chance of one process being modified by another one. Other problems that need to be addressed when having multiple programs in memory is fragmentation as programs enter or leave the main memory. Another issue that needs to be handled as well is that large programs may not fit at once in memory which can be solved by using pagination and virtual memory. Please, refer to this article for more details on that.
Finally, note that if there are N ready processes and all of those are highly CPU-bound (i.e., they mostly execute CPU tasks and none or very few I/O operations), in the very worst case one program might wait all the other N-1 ones to complete before executing.
Multitasking
Multitasking has the same meaning of multiprogramming but in a more general sense, as it refers to having multiple (programs, processes, tasks, threads) running at the same time. This term is used in modern operating systems when multiple tasks share a common processing resource (e.g., CPU and Memory). At any time the CPU is executing one task only while other tasks waiting their turn. The illusion of parallelism is achieved when the CPU is reassigned to another task (i.e. process or thread context switching).
There are subtle differences between multitasking and multiprogramming. A task in a multitasking operating system is not a whole application program but it can also refer to a “thread of execution” when one process is divided into sub-tasks. Each smaller task does not hijack the CPU until it finishes like in the older multiprogramming but rather a fair share amount of the CPU time called quantum.
Just to make it easy to remember, both multiprogramming and multitasking operating systems are (CPU) time sharing systems. However, while in multiprogramming (older OSs) one program as a whole keeps running until it blocks, in multitasking (modern OSs) time sharing is best manifested because each running process takes only a fair quantum of the CPU time.
Multiprogramming or multitasking operating systems are those which consumes CPU or ram efficiently. That mean the CPU keep all times busy and all tasks are given time. In these systems users get quick response time. But if there are many tasks running on the RAM then it stops loading more tasks and in that case hard drive will be used for storing some processes
.Advantages of multiprogramming systems
  • CPU is used most of time and never become idle
  • The system looks fast as all the tasks runs in parallel
  • Short time jobs are completed faster than long time jobs
  • Multiprogramming systems support multiply users
  • Resources are used nicely
  • Total read time taken to execute program/job decreases
  • Response time is shorter
  • In some applications multiple tasks are running and multiprogramming systems better handle these type of applications
 Disadvantagesof multiprogramming systems
  • It is difficult to program a system because of complicated schedule handling
  • Tracking all tasks/processes is sometimes difficult to handle
  • Due to high load of tasks, long time jobs have to wait long
Multi user operating system: 
Multi-user software is software that allows access by multiple users of a computerTime-sharing systems are multi-user systems. Most batch processing systems for mainframe computers may also be considered "multi-user", to avoid leaving the CPU idle while it waits for I/O operations to complete. However, the term "multitasking" is more common in this context.
An example is a Unix server where multiple remote users have access (such as via a serial port or Secure Shell) to the Unix shellprompt at the same time. Another example uses multiple X Window sessions spread across multiple terminals powered by a single machine - this is an example of the use of thin client. Similar functions were also available under MP/MConcurrent DOSMultiuser DOSand FlexOS.
Image result for multiuser operating system
  


Time sharing operating system : -
A time sharing system allows many users to share the computer resources simultaneously. In other words, time sharing refers to the allocation of computer resources in time slots to several programs simultaneously. For example a mainframe computer that has many users logged on to it. Each user uses the resources of the mainframe -i.e. memory, CPU etc. The users feel that they are exclusive user of the CPU, even though this is not possible with one CPU i.e. shared among different users


 Advantages of Timesharing operating system 

1.Provides the advantage of quick response.
2.Avoids duplication of software.
3.Reduces CPU idle time.
DisadvantagesofTime-sharingoperating system
1.Problem of reliability.
2.Question of security and integrity of user programs and data.
3.Problem of data communication

Real Time operating System

A real-time system is defined as a data processing system in which the time interval required to process and respond to inputs is so small that it controls the environment. The time taken by the system to respond to an input and display of required updated information is termed as the response time. So in this method, the response time is very less as compared to online processing.
Real-time systems are used when there are rigid time requirements on the operation of a processor or the flow of data and real-time systems can be used as a control device in a dedicated application. A real-time operating system must have well-defined, fixed time constraints, otherwise the system will fail. For example, Scientific experiments, medical imaging systems, industrial control systems, weapon systems, robots, air traffic control systems, etc.
There are two types of real-time operating systems.

Hard real-time systems

Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems, secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual memory is almost never found.

Soft real-time systems

Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks and retains the priority until it completes. Soft real-time systems have limited utility than hard real-time systems. For example, multimedia, virtual reality, Advanced Scientific Projects like undersea exploration and planetary rovers, etc.
Image result for real time operating system


Advantages of Real Time Operating System.

 1.Maximum Consumption
 2.Task Shifting
 3.Error Free
 4.Memory Allocation

Disadvantages of Real Time Operating System
1. Limited Tasks
2.Use heavy system resources
3.Low multi-tasking
4.Expensive

CLI(Command Line Interface ):-command-line interface or command language interpreter (CLI), also known as command-line user interface, console user interfaceand character user interface(CUI), is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines). A program which handles the interface is called a command language interpreter or shell.
The CLI was the primary means of interaction with most computer systems on computer terminals in the mid-1960s, and continued to be used throughout the 1970s and 1980s on OpenVMSUnix systems and personal computer systems including MS-DOSCP/Mand Apple DOS. The interface is usually implemented with a command line shell, which is a program that accepts commands as text input and converts commands into appropriate operating system functions.
   
    GUI(Graphical user interface ) :-

The graphical user interface (GUI ), is a type of user interface that allows users to interact with electronic devices through graphical icons and visual indicators such as secondary notation, instead of text-based user interfaces, typed command labels or text navigation. GUIs were introduced in reaction to the perceived steep learning curve of command-line interfaces (CLIs),which require commands to be typed on a computer keyboard.
The actions in a GUI are usually performed through direct manipulation of the graphical elements.

Characteristics of Operating System
Here is a list of some of the most prominent characteristic features of Operating Systems −
Memory Management − Keeps track of the primary memory, i.e. what part of it is in use by whom, what part is not in use, etc. and allocates the memory when a process or program requests it.
Processor Management − Allocates the processor (CPU) to a process and deallocates the processor when it is no longer required.
Device Management − Keeps track of all the devices. This is also called I/O controller that decides which process gets the device, when, and for how much time.
File Management − Allocates and de-allocates the resources and decides who gets the resources.
Security − Prevents unauthorized access to programs and data by means of passwords and other similar techniques.
Job Accounting − Keeps track of time and resources used by various jobs and/or users.
Control Over System Performance − Records delays between the request for a service and from the system.
Interaction with the Operators − Interaction may take place via the console of the computer in the form of instructions. The Operating System acknowledges the same, does the corresponding action, and informs the operation by a display screen.
Error-detecting Aids − Production of dumps, traces, error messages, and other debugging and error-detecting methods.
Coordination Between Other Software and Users− Coordination and assignment of compilers, interpreters, assemblers, and other software to the various users of the computer systems.


  •                             THE END  OF CHAPTER 1 




No comments:

Chapter 5 dccn

                                           Transport layer In computer networking, the transport layer is a conceptual division of metho...