Analysis of 3rd Semester Operating System – Introduction and System Structure

Introduction and System Structure – Questions and Analysis – Operating System, 3rd Semester WBUT BCA

 

By Shritam Bhowmick
Web Application Penetration Tester
LinkedIn: https://www.linkedin.com/profile/view?id=281014248&trk=nav_responsive_tab_profile
Academia: https://independent.academia.edu/ShritamBhowmick
Facebook: https://www.facebook.com/coded32

Last post I went ahead to introduce process management but I really forgot to add the first module. This post will not only cover the module aspect but also answer the questions which would be related to the specific section of Operating Systems – Introduction and System Structure. Having said that one must initially assume the title would spread the post in-depth in itself. Yes, the post is about the introductory part and is consumed with answering analytically deducted questions which were asked basically in previous years before 2014. Since, this would be my take in because none in WBUT BCA did a good job at sharing, I will go ahead with my take at this.

Following are the frequently asked questions which just as well might appear for 2014 WBUT, BCA. This post might also be beneficial not only to the current in-taking the examinations but would also help other students, researchers or examiners in developing or inspiring ‘writing’ what they had already documented on the hard copy. I believe sharing the world would be the utmost priority where  everyone else only hopes.

The questions related with ‘analysis’ (prediction of possibilities of their coming up in year 2014) are as follows:

1.) Differentiate between Logical and Physical Address Space.
2.) What is Operating System? State the importance of Operating System.
3.) Discuss the relationship of Operating System to basic computer hardware. Explain the hierarchy of the Operating System.
4.) Write a Short Note on Device Management and Virtual Machine.

Now there are these objective questions along with answers (a one liner) which I think might help with the Objective based questions:

  1. Which is not a layer of the operating system? Kernel is not a layer of the operating system, others like ‘Shell’, ‘Application Program’, and ‘Critical Section’ are a part of the operating system.
  2. The Operating system is responsible for ‘controlling peripheral devices such as monitor, printers, disk drives, etc. It also helps detecting errors in user programs. It provides an interface which allows users to choose programs to run and to manipulate files. Pretty much everything‘. Anything else would be a wrong answer. The question asked were almost every-time belonged to all of these when objectively asked.
  3. When an interrupt occurs, ”resuming execution of interrupted process after processing the interrupt‘ happens, anything else would be a wrong attempt at answering the question.
  4. What is a Shell? – Shell is a command interpreter, anything else is wrong.
  5. Multiprogramming Systems ‘execute each job faster‘.
  6. Multiprogramming is ‘more than one program executing on a machine‘.
  7. In System mode, machine is executing operating system instructions. So basically it is in system mode that the operating system prefers to execute OS system instructions. Other modes are Normal, Safe, and User.But none of the latter would be correct if objectively asked about executing system instructions.

That been done, we now have very basic touch with the objective part. The questions which were given are as per the subjective analysis and on this analysis, i would be getting the answers in this post. The subjective questions which are predicted to come for year 2014 has already been detailed in this post before, so I would straight away drive to answering them at a go.

1.) Differentiate between logical v/s physical address space.

Answer: First off, let’s dive what really an address space is. To the definition, an address space is the amount of memory allocated for all possible addresses of a computational entity such as for example: a file, a a device, a server, or a networked computer.  An address space may refer to a range of addresses which are available to the processor or available to a process. This range of addresses might be logical or physical.

Now, to answer the second part and differentiate between logical and physical address space, we need to know what are logical and what are physical address space. Logical address are the addresses generated by the CPU. From the perspective of the program that is running, an item seems to be from the address which is logically assigned by the CPU. The user-program never looks down at the Physical Addresses, it always has to refer to logical addresses generated by the CPU. In other words, the logical address space is the set of logical addresses generated by a program. Logical addresses need to be mapped to physical addresses before they are used and this mapping is handled using a hardware device called the Memory Management Unit (MMU). Now, for Physical address space, Physical address or the real address is the address seen by the memory unit and it allows the data bus to access a particular memory cell in the main memory. Logical addresses generated by the CPU when executing a program are mapped in to physical address using the MMU.

The difference between Logical Address Space and Physical Address Space: Logical address is the address generated by the CPU (from the perspective of a program that is running) whereas physical address (or the real address) is the address seen by the memory unit and it allows the data bus to access a particular memory cell in the main memory. All the logical addresses need to be mapped in to physical addresses before they can be used by the MMU. Physical and logical addresses are same when using compile time and load time address binding but they differ when using execution time address binding.

2.) What is an Operating System? State the Importance of the Operating System.

Answer: The low level software which is a collection of programs and utilities and supports basic functions such as scheduling tasks, and controlling peripherals is known as the Operating System. It sits between the user and the hardware, and lets the user use the interface to control the machine and produce or generate output. The operating system manages the I/O operations, handles interrupts,  manages the file system, storage space and additionally provides utilities which could be handy for an user to automate tasks.

Importance of the Operating System: The importance of an Operating System is that is provides the user with a power to create programs, account, execute a program, access files in a controlled way, access additional systems, detect error, and access I/O devices for an automated way of working. Users depend on their Operating Systems to automate tasks which are repetitive in nature for them and also detect, manipulate and quarantine error accordingly without requiring the user to take care of the low level tasks. It interacts with the hardware and allows the hardware to instruct other hardware to progressively execute a job/task and produce useful results as an output.

3.) Discuss the Relationship of operating system to basic hardware. Explain the hierarchy structure of the operating system.

Answer: The basic computer hardware are monitor, the CPU, the keyboard, memory, and other I/O and secondary devices. Operating system manages all of these resources which is the reason it has been also termed as ‘Resource Manager’. The efficiency with which an operating system handles all these resources are remarkable and it also handles the scheduling i.e: which job depending upon their priority must be executed first by the hardware involved and which jobs are to be queued.

The structure of the Operating System is organized the following way:

oslayer

This resembles to the following image which deduces out the functionality associated with each layer:

Layered

 

The application programs are dependent on the users of the operating system. The system program layer consists of computer, assembler, linker, library, routine, etc. The kernel directly interacts with the hardware and provides services such as hardware drivers etc. The kernel comprises of I/O drivers, CPU scheduler, pager, swapper, etc. Altogether, the structure of the Operating system manages the hardware resources in timed and at an efficient manner.

4.) Write a Short Note on Device Management and Virtual Machine.

Answer: Device Management: The operating system has an important role in handling devices and managing them. The devices can be managed by the operating system via three distinct ways:

a.) Dedicated
b.) Shared
c.) Virtual

The dedicated devices are tape drives, plotters, etc. The shared devices are printers, hard drives, etc and the virtual devices are virtual printers (spooling), etc. The status of channels, control units, and devices must be checked by the device management routines embedded into the operating system. Some devices are capable of doing an I/O peration withot any support from the channel or the control units. However most devices require the control unit and the support of channels.

Virtual Machine: Virtual Machine are visualized operating system within the operating system. The virtual machine works the same way a operating system installed on a physical hard disk might work but relies on the virtual machine control program called “VMM”. VMM stands for Virtual Machine Monitor and is responsible to link the virtual machine, often called as the ‘guest operating system‘ to the underlying primary hardware. The hardware partition for the virtual operating system would also be virtual and depends on the VMM. The advantages of visualization are:

a.) Consolidation
b.) Stability
c.) Security
d.) Development Flexibility
e.) Migration

Products like VMware and Oracle’s VirtualBox makes visualization easy.

This post was all about the introductory part of the operating system syllabus for BCA WBUT, 2014. I would come up with the continuation of the posts related to process management since I had been working on them. Related answers to process management in Operating Systems could be found later in this blog. I would first detail them and then come up with analysis (prediction) for the coming 2014 Winter exams. Stay chilled this winter and have a great start of the week ahead. Taking a leave!

 

Advertisements

Looking for intellectual opinions. Feedbacks are welcome!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s