Operating system paper 2013

RGPV OPERATIN SYSTEM : Solved Question: 2013 Paper
 

Q2. Compare and contrast:

(i)                  Multi programming, batch and time sharing system.

Ans.

(i)                 MULTIPROGRAMMING OPERATING SYSTEM:

Sharing the processor, when two or more programs reside in memory at the same time, is referred as multiprogramming.

Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to execute.

The following figure shows the memory layout for a multiprogramming system.

An OS does the following activities related to multiprogramming.

·        The operating system keeps several jobs in memory at a time.

·        This set of jobs is a subset of the jobs kept in the job pool.

·        The operating system picks and begins to execute one of the jobs in the memory.

·        Multiprogramming operating systems monitor the state of all active programs and system resources using memory management programs to ensures that the CPU is never idle, unless there are no jobs to process.

Advantages

  • High and efficient CPU utilization.
  • User feels that many programs are allotted CPU almost simultaneously.

Disadvantages

  • CPU scheduling is required.
  • To accommodate many jobs in memory, memory management is required.

(i)                 BATCH OPERATING SYSTEM:

The users of batch operating system do not interact with the computer directly.

Each user prepares his job on an off-line device like punch cards and submits it to the computer operator.

To speed up processing, jobs with similar needs are batched together and run as a group.

The operator then sorts programs into batches with similar requirements.

The problems with Batch Systems are following.-

·         Lack of interaction between the user and job.

·         CPU is often idle, because the speeds of the mechanical I/O devices is slower than CPU.

·         Difficult to provide the desired priority.

 

(i)                 TIME SHARING OPERATING SYSTEM:

Time-sharing or multitasking is a logical extension of multiprogramming.

Processor's time which is shared among multiple users simultaneously is termed as time-sharing.

Multiple jobs are executed by the CPU by switching between them, but the switches occur so frequently. Thus, the user can receives an immediate response.

Operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time.

ADVANTAGES -

·         Provide advantage of quick response.

·         Avoids duplication of software.

·         Reduces CPU idle time.

DISADVANTAGES -

·         Problem of reliability.

·         Question of security and integrity of user programs and data.

·         Problem of data communication.

 


(i)                 NETWORK AND DISTRIBUTED OPERATING SYSTEM

Ans. Comparison…

 

NETWORK OPERATING SYSTEM

 

DISTRIBUTED OPERATING SYSTEM

1

Users are aware of multiplicity of machines.

 

Users are not aware of multiplicity of machines.

2

Access to resources of various machines is done by transferring data from remote machines to local machines.

 

Access to remote resources similar to access to local resources.

3

Transfer the  data, to and from the remote server and only server performs  most of the computation.

 

Transfer the computation, rather than the data, across the system.

4

Execute an entire process, or parts of it, at the remote server.

 

Execute an entire process, or parts of it, at different sites.

5

Run process remotely, and needs to transfer all the data to the server for processing.

 

Run process remotely, rather than transfer all data locally.

6

 Employs a client-server model

 

Employs a master-slave model.

Q3. What is meant by system call. How it can be used? How does an application program use these calls during execution? How is all this related to the compilation process.

Ans. SYSTEM CALL:

System call act as an interface between user (computer program) and operating system.

System calls are used for hardware services.

HOW SYSTEM CALL USED:

Hardware’s request is received by kernel in the form of system call, than that system call is transferred to the operating system by Kernel and vice versa. It means a Kernel (System call) act as a interface between computer hardware’s (key board, mouse, printer, monitor etc.) and operating system.

 

APPLICATION PROGRAM USES SYSTEM CALL DURING EXEECUTION:

A user program cant interact directly with the operating systems kernel, because it will be against the violation of processors access control rules.

System call is a mechanism for the application programs to interact with the operating system.

Application codes start a system call; this system call is imported by application codes from the system libraries provided by operating system such a libc.a.

libc.a can have functions that perform some user-mode processing and then internally start a system call.

Than this system call from applications programs are interact with the kernels of an operating system, and then this kernel perform execution of application programs on operating system. Also kernel returns the response in the form of system call to the application programs.

 

SYSTEM CALL RELATED WITH COMPILATION PROCESS:

A process can call a system call and pass parameters to it just like any other library function.

So  

Each process from an user has a address space it means this process needed a memory location and reference.

Compiler pushes the system call name and parameters supplied by the process in a stack and then put the assembly instruction.

This assembly instruction is executed by hardware by first toggling the mode from user to kernel and then setting the code pointer, which picks up the parameters from the stack and executes the system call and passes to the CPU which again passes control to the user process.

 


Q4. Explain the function of operating system ?

Ans. OPERATING SYTEM:

ž  operating system is the set of programs that controls a computer.

ž  It provide a pleasant and effective  interface between the user and the hardware

ž  Makes the computer more convenient to use

SOME EXAMPLES OF OS:

(i)                 Windows XP

(ii)               MS DOS

(iii)             Linux etc

FUNCTIONS OF OS:

(I) Process Management

(II) Memory Management

(III) File Management

(IV) Security Management

(V) Command Interpreter

 

(I)                PROCESS MANAGEMENT

By process management OS manages many kinds of activities :-

ž  All process from start to shut down

ž  Creation and deletion of user and system processes.

(II)             MEMORY MANAGEMENT

The major activities of an operating regard to memory-management are:-

ž  Decide which process are loaded into memory when memory space becomes available.

ž  Allocate and deallocate memory space as needed.

(III)          FILE MANAGEMENT

The file management system allow the user  to perform such tasks:-

ž  Creating files and directories

ž  Renaming files

ž  Coping and moving files

ž  Deleting files

(IV)          SECURITY MANAGEMENT

By security management OS manages many tasks such as:-

ž  Alert messages

ž  Dialogue boxes

ž  Firewall

ž  Passwords

(V)             COMMAND INTERPRETER

A command interpreter is an interface between system and the user. There are two types of user interface:-

ž  Command line

ž  Graphical user interface

 


 

Q5 Explain various steps involved in booting ?

Ans.

Step 1: Power on device

Step 2: Start executing code in BIOS (H/W initialization) and Load boot vector.

Step 3: Machine start to execute at Boot Vector

Step 4: Bootloader loads OS image  into RAM by using Boot sector on disk.

 

 

 
COMING SOON...Next Paper

Related topics

Professor Jayesh video tutorial

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.