Unit - 1
Operating Systems Overview
Q1) What is the operating system?
A1) An Operating system (OS) is a software which acts as an interface between the end user and computer hardware. Every computer must have at least one OS to run other programs. An application like Chrome, MS Word, Games, etc needs some environment in which it will run and perform its task. The OS helps you to communicate with the computer without knowing how to speak the computer's language. It is not possible for the user to use any computer or mobile device without having an operating system.
Fig 1: Operating System
Hardware in a computer system (which consists of both hardware and software) can only read machine code (in the form of 0 and 1), which makes no sense to a layperson.
We require a system that can function as an intermediate and manage all of the system's procedures and resources.
An operating system is a software interface between the user and the hardware. It is in charge of all process execution, resource allocation, CPU management, file management, and a variety of other functions.
The goal of an operating system is to offer a convenient and efficient environment in which a user may run programmes.
Q2) Write the features of the operating system?
A2) Features of Operating System
Here is a list commonly found important features of an Operating System:
● Protected and supervisor mode
● Allows disk access and file systems Device drivers Networking Security
● Program Execution
● Memory management Virtual Memory Multitasking
● Handling I/O operations
● Manipulation of the file system
● Error Detection and handling
● Resource allocation
● Information and Resource Protection
Q3) What are the functions of the operating system?
A3) Functions of an Operating System
Fig 2: Function of OS
Function of an Operating System
In an operating system software performs each of the function:
- Process management: Process management helps the OS to create and delete processes. It also provides mechanisms for synchronization and communication among processes.
- Memory management: Memory management module performs the task of allocation and deallocation of memory space to programs in need of this resources.
- File management: It manages all the file-related activities such as organization storage, retrieval, naming, sharing, and protection of files.
- Device Management: Device management keeps tracks of all devices. This module also responsible for this task is known as the I/O controller. It also performs the task of allocation and deallocation of the devices.
- I/O System Management: One of the main objects of any OS is to hide the peculiarities of that hardware devices from the user.
- Secondary-Storage Management: Systems have several levels of storage which includes primary storage, secondary storage, and cache storage. Instructions and data must be stored in primary storage or cache so that a running program can reference it.
- Security: Security module protects the data and information of a computer system against malware threat and authorized access.
- Command interpretation: This module is interpreting commands given by the and acting system resources to process that commands.
- Networking: A distributed system is a group of processors which do not share memory, hardware devices, or a clock. The processors communicate with one another through the network.
- Job accounting: Keeping track of time & resource used by various job and users.
- Communication management: Coordination and assignment of compilers, interpreters, and another software resource of the various users of the computer systems.
Q4) Explain the types of OS?
A4) Types of Operating system
● Batch Operating System
● Multitasking/Time Sharing OS
● Multiprocessing OS
● Real Time OS
● Distributed OS
● Network OS
● Mobile OS
Batch Operating System
Some computer processes are very lengthy and time-consuming. To speed the same process, a job with a similar type of needs are batched together and run as a group.
The user of a batch operating system never directly interacts with the computer. In this type of OS, every user prepares his or her job on an offline device like a punch card and submit it to the computer operator.
Multi-Tasking/Time-sharing Operating systems
Time-sharing operating system enables people located at a different terminal(shell) to use a single computer system at the same time. The processor time (CPU) which is shared among multiple users is termed as time sharing.
Real time OS
A real time operating system time interval to process and respond to inputs is very small. Examples: Military Software Systems, Space Software Systems.
Distributed Operating System
Distributed systems use many processors located in different machines to provide very fast computation to its users.
Network Operating System
Network Operating System runs on a server. It provides the capability to serve to manage data, user, groups, security, application, and other networking functions.
Mobile OS
Mobile operating systems are those OS which is especially that are designed to power smartphones, tablets, and wearables devices.
Some most famous mobile operating systems are Android and iOS, but others include BlackBerry, Web, and watchOS.
Q5) Write the difference between 32 and 64 bit OS?
A5) Difference between 32-Bit vs. 64 Bit Operating System
Parameters | 32. Bit | 64. Bit |
Architecture and Software | Allow 32 bit of data processing simultaneously | Allow 64 bit of data processing simultaneously |
Compatibility | 32-bit applications require 32-bit OS and CPUs. | 64-bit applications require a 64-bit OS and CPU. |
Systems Available | All versions of Windows 8, Windows 7, Windows Vista, and Windows XP, Linux, etc. | Windows XP Professional, Vista, 7, Mac OS X and Linux. |
Memory Limits | 32-bit systems are limited to 3.2 GB of RAM. | 64-bit systems allow a maximum 17 billion GB of RAM. |
Q6) Write the advantages of using os?
A6) The advantage of using Operating System
● Allows you to hide details of hardware by creating an abstraction
● Easy to use with a GUI
● Offers an environment in which a user may execute programs/applications
● The operating system must make sure that the computer system convenient to use
● Operating System acts as an intermediary among applications and the hardware components
● It provides the computer system resources with easy to use format
● Acts as an intermediator between all hardware's and software's of the system
Q7) Illustrate the Evolution of OS?
A7) The following is a timeline of an operating system's evolution:
Fig 3: Evolution of OS
Serial Processing
By the 1940s and 1950s, programmers were embedded into hardware components without the use of an operating system. The scheduling and setup time are the issues here. By squandering computational time, the user logs in for machine time. When loading the compiler, saving the compiled programme, source programme, linking, and buffering, setup time is involved. If there is an intermediate error, the process is restarted.
The Batch System
It is used to improve computer utilization and application. On cards and tapes, jobs were scheduled and submitted. Then, using Job Control Language, they were successively executed on the monitors. The first computers employed in the batch operation method created a computer batch of jobs that didn't stop or pause. The software is written on punch cards and then transferred to the tape's processing unit. When the computer finishes one job, it immediately moves on to the next item on the tape. Professional operators are taught how to communicate with the machine where users drop off jobs and then return to pick up the results after the project is completed.
Despite the fact that it is inconvenient for the users, it is designed to keep the pricey computer as busy as possible by running a continuous stream of operations. The memory protection prevents the memory space that makes up the monitor from being changed, and the timer prevents the job from monopolizing the system. When the input and output devices are in use, the processor remains idle due to poor CPU utilization.
Multi-programmed Batch System
It's utilised when there are numerous jobs to run that need to be kept in main memory. The processor choose which application to run based on job scheduling.
Time-Shared Operating System
Substitute batch systems were developed using this method. Like an electric teletype, the user communicated directly with the computer via printing ports. Few users shared the computer instantly, and each job was completed in a fraction of a second before moving on to the next. The fast server may act on a large number of users' processes at the same time by creating iterations while they are receiving full attention. Multiple programmes use timesharing systems to apply to the computer system by sharing the system interactively.
Multiple communicative jobs are managed via multi-programming. The processor's time is divided among numerous users, and multiple users can access the system via terminals at the same time. Programs with the command-line user interface, in which the user has written responses to prompts or written instructions, required printing ports. As if it were a roll of paper, the interaction is scrolled down.
Printing terminals that displayed fixed-size characters were replaced with video terminals. Some are used to create shapes on the screen, but the majority are scrolled like a glass teletype. In the mid-1970s, personal computers became adaptable. The Altair 8800 was the first commercially viable personal computer, and it shocked the business world.
Macintosh Operating System
It was based on decades of research into graphical operating systems and applications for personal computers. The photo depicts a Sutherland pioneer programme sketchpad that was developed in 1960 employing many of the characteristics of today's graphical user interface, but the hardware components cost millions of dollars and took up a room.
After many research gaps, the Macintosh was commercially and fiscally viable thanks to a project on massive computers and hardware improvements. Many research laboratories are still working on research prototypes like sketchpads. It served as the foundation for anticipated products.
Q8) Describe the history of OS?
A8) History of OS
The operating system can be classified into four generations, as follows:
First Generation (1945-1955)
It marks the start of the development of electronic computing systems as a replacement for mechanical computers. Because of the flaws in mechanical computing devices, humans' calculation speed is limited, and they are prone to making mistakes. Because there is no operating system in this generation, the computer system is given instructions that must be carried out immediately.
Plug Boards are an example of a type of operating system and device.
Second Generation (1955-1965)
In the second generation, the batch processing system was implemented, which allows a job or task to be done in a series and then completed sequentially. The computer system in this generation does not have an operating system, although there are various operating system functionalities available, such as FMS and IBSYS.
Batch systems are an example of the type of operating system and devices employed.
Third Generation (1965-1980)
In the third generation, the operating system was designed to service numerous users at the same time. Interactive users can communicate with a computer via an online terminal, making the operating system multi-user and multiprogramming.
Multiprogramming is an example of a type of operating system and devices employed.
Fourth Generation (1980-Now)
The operating system is employed in this age for computer networks where users are aware of the existence of computers connected to one another.
The era of distributed computing has already begun, and users are comforted by a Graphical User Interface (GUI), which is an incredibly comfortable graphical computer interface.
The demand for traditional operating systems has increased as a result of the introduction of new wearable devices such as Smart Watches, Smart Glasses, VRGears, and others.
With the introduction of innovative gadgets such as Smart Watches, Smart Glasses, VR gears, and other wearable devices, the demand for unorthodox operating systems is also increasing.
Personal computers are an example of a type of operating system and device.
Q9) Write the operation of OS?
A9) An operating system is a framework that enables user application programmes to communicate with system hardware. The operating system does not perform any functions on its own, but rather creates an environment in which various apps and programmes can do valuable tasks.
Process management, memory management, device management, and file management are the major functions of the operating system. The following is a list of them in detail:
Fig 4: Operation of OS
Process Management
The operating system is in charge of managing processes, which entails assigning the processor to a specific process at a given time. This is known as process scheduling. The different algorithms used for process scheduling are FCFS (first come first served), SJF (shortest job first), priority scheduling, round robin scheduling etc.
There are many scheduling queues that are used to handle processes in process management. The processes are placed in the job queue as soon as they enter the system. The ready queue contains the processes that are ready to run in main memory. The processes in the device queue are those that are waiting for an I/O device.
Memory Management
Memory management is crucial in the operating system. It is concerned with memory and the movement of processes from disc to primary memory for execution, as well as the reverse.
The operating system's memory management activities are as follows:
● The operating system allocates memory to processes based on their needs. The best fit, first fit, and worst fit algorithms can be used to accomplish this.
● The operating system keeps track of all memory, indicating which parts are in use by processes and which are empty.
● As needed, the operating system reallocated memory from processes. When a process is killed or no longer requires memory, this can happen.
Device Management
The operating system manages a variety of I/O devices, including the mouse, keyboard, and disc drive, among others. To manage a given device, different device drivers can be attached to the operating system. The device controller serves as a link between the device and its driver. Device drivers, which are device-specific programmes, allow user applications to access all I/O devices.
File Management
The operating system uses files to provide a consistent view of data storage. All of the files are mapped to non-volatile physical devices, ensuring that data is protected in the event of a system failure.
The system has two options for accessing the files: sequential access and direct access.
Sequential Access
Sequential access is used to process the data in a file in order. The records in the files are accessed one by one. Sequential access is used by the majority of file systems, including editors, compilers, and so on.
Direct Access
The files can be accessed at random for read and write operations using direct or relative access. Because it supports random accesses, the direct access model is based on the disc model of a file.
Q10) Explain the structure of OS?
A10) The software may be a construct that enables the user application programs to act with the system hardware. Since the software is such a fancy structure, it ought to be created with utmost care therefore it will be used and changed simply. A simple thanks to doing that is to form the software in elements. Every one of those elements ought to be outlined with clear inputs, outputs, and functions.
Simple structure
There square measure several operative systems that have a rather easy structure. These started as little systems and quickly distended a lot more than their scope. A typical example of this can be ms-dos. It had been designed merely for a distinct segment quantity for individuals. There was no indication that it might become therefore well-liked.
An image as an instance of the structure of ms-dos is as follows −
Fig 5: MS-DOS structure
It is higher than operative systems have a standard structure, in contrast to ms-dos. That may cause larger management over the pc system and its numerous applications. The standard structure would conjointly permit the programmers to cover data pro re nata and implement internal routines as they see work while not ever-changing the outer specifications.
Layered structure
One way to realize modularity within the software is that the stratified approach. In this, the rock bottom layer is that the hardware, and therefore the top layer is that the interface.
An image demonstrating the stratified approach is as follows −
Fig 6: The layered structure of OS
As seen from the image, every higher layer is made on the rock bottom layer. All the layers hide some structures, operations, etc from their higher layers.
One downside with the stratified structure is that every layer has to be rigorously defined. This is often } necessary as a result of the higher layers can solely use the functionalities of the layers below them.
Q11) What do you mean by system call?
A11) In an operating system software plays out every one of the following functions:
- Process management: Process management causes OS to create and delete processes. It likewise gives mechanisms for synchronization and communication among processes.
- Memory management: Memory management module plays out the role of assignment and de-allotment of memory space to programs needing the resources.
- File management: It deals with all the file-related task, for example, storage organization, recovery, naming, sharing, and protection of files.
- Device Management: Device management keeps tracks of all the devices. This module is in charge of the task also known as the I/O controller. It additionally plays out the undertaking of designation and de-distribution of the devices.
- I/O System Management: One of the primary objects of any OS is to conceal the identity of that hardware devices from the user.
- Secondary-Storage Management: Systems have a few degrees of storage which incorporates primary storage, secondary storage, and cache storage. Instructions and data must be put away in primary storage or cache so a running program can reference it.
- Security: Security module ensures the data and information of a computer system against malware danger and authorized access.
- Command interpretation: This module is interpreting directions given by the acting system and assign resources to process that directions.
- Networking: A distributed system is a collection of processors which don't share memory, hardware devices, or a clock. The processors speak with each other through the network.
- Job accounting: Keeping track of time and resource utilized by different job and users.
- Communication management: Manage the coordination and task of compilers, interpreters, and other software resource of the different users of the computer systems.
Q12) What are the types of system calls?
A12) System calls are divided into five categories.
Fig 7: Types of system call
The following are the various sorts of system calls:
Process control
Processes such as process creation, process termination, and so on are handled by these system calls.
Functions
● End and Abort
● Load and Execute
● Create Process and Terminate Process
● Wait and Signal Event
● Allocate and free memory
File management
File manipulation is handled by these system calls, which include creating, reading, and writing to files.
Functions
● Create a file
● Delete file
● Open and close file
● Read, write, and reposition
● Get and set file attributes
Device management
Device manipulation, such as reading from device buffers and writing into device buffers, is handled by these system calls.
Functions
● Request and release device
● Logically attach/ detach devices
● Get and Set device attributes
Information maintenance
These system calls control the flow of data between the operating system and the user programme.
Functions
● Get or set time and date
● Get process and device attributes
Communication
These system calls can be used to communicate between processes. They're also in charge of setting up and disabling communication connections.
Functions
● Create, delete communications connections
● Send, receive message
● Help OS to transfer status information
● Attach or detach remote devices
Q13) Write the disadvantages of using OS?
A13) Disadvantages of using Operating System
● If any issue occurs in OS, you may lose all the contents which have been stored in your system
● Operating system's software is quite expensive for small size organization which adds burden on them. Example Windows
● It is never entirely secure as a threat can occur at any time