Operating System and UNIX
Q1. Explain the purpose and syntax of any two UINX commands belonging to the following categories of the commands
(a) Process Management
(b) System Management
(c) Directory Commands
(d) File Manipulation commands
(e) Security and Protection
(f) Inter-user Commands
(g) Information commands
Q2(a) What are the salient features of UNIX Operating System ? Explain .
(b) What is the directory structure of UNIX Operating System? Explain
Q3(a) What do you understand by an operating System ? What are the major functions performed by an operating System?
(b) Enumerate important characteristics of a good operating system and also discuss the ]
Responsibilities of an operating system as a resource manager.
(c) Give an overview of the different types of operating systems.
Q4 what is fragmentation ? What are different types of fragmentation ? How each of these can be overcome ? Explain
Q5(a) What do you understand by a process ? What are the different states of it.
(b) Explain Process States and its diagram
(c) Differentiate between long term ,medium term and short term scheduler.
Q6(a) What do you mean by device Independence ? Discuss the major functions of the device independent software
(b) Explain clock hardware and clock software
Q7 Explain the Following
(a) Device controller
(b) Device Driver
(c) User space I/O Software
(d) Interrupt Handler.
Q8(a) Consider swapping system in which memory of the following hole size in memory order
10K,4K,20K,18k,7K,9K,12K and 15K
Which hole is taken for successive requests of
(i) 12K (ii) 10K (iii) 9K
For first fit ? repeat the same for Best-Fit,Worst-Fit and Next-Fit
Q8( b) Shown below is the workload for 5 job arriving at time zero in the order given below
Job Burst
1 10
2 29
3 3
4 7
5 12
Now considering FCFS ,SJF and round robin (RR) [with quantum=1] algorithms for this set of minimum average time.
(c) Consider a system with a set of a process P1,P2,P3 and P4. Let their arrival times and CPU burst times mentioned as below
Process Arrival Time CPU Brust Time
P1 0 3
P2 1 6
P3 5 4
P4 6 2
(1) Draw the Gantt chart using
(i) First –Come First-Served
(ii) Sortest Job First
(iii) Round Robin
[Quantum of time 2 units]
(2) Calculate
(i) Average Turnround Time
(ii) Average Wait Time
(iii) Average Throughput
Q9(a) what is meant by disk scheduling? Explain why disk scheduling is necessay.
(b) Discuss three disk scheduling algorithms
(c) State the desirable characteristics of disk scheduling policies and explain briefly the various seek optimization scheduling techniques.
Q10 (a) What is time slicing ? How the time slicing duration affects the overall working of the system.
(b) write short note on virtual memory.
Q11(a) What is segmentation ? what are its advantages and disadvantages ? Explain
(b) what is memory management ? Discuss objectives of memory management.
Q12 Write notes on the following
(a) Highest Response Ratio Next Scheduling
(b) Shortest Remaining Time Scheduling
(c) Thrashing
(d) System Calls
Q13. Explain the following allocation algorithms
(a) First Fit
(b) Best Fit
(c) Worst Fit
(d) Buddy’s System
(e) Next fit
Q14(a) when does a page fault occur ? Explain various page replacement strategies/algorithms
(b) What factors can lead to the degradation of the performance of round robin scheduling
Q15(a) Differentiate the following
(a) Networking Operating System and Distributed operating System
(b) Batch Operating System and Real Time Processing System.
(c) Multitasking and Multithreading
(d) Real Time System and Timesharing System
(e) Multiprocessing and Multiprogramming
(f) Preemptive and non-preemptive scheduling
(g) Paging and segmentation
Q16(a) what is an operating system structure ? Compare important operating system structures.
(b) how layered structure approach differs from kernel approach ? Explain
Q17(a) what is File-System ? What are the main responsibilities of a file-system located in layered organization of operating system?
Q17(b) what do you understand by file protection and security ? Explain the various file protection methods / strategics
Q18 what are deadlock ? When do these occurs ? Suggest three basic methods for preventing these
Q19 what are the benefits of multi-programming .
Q19(b) What are the benefits of Multiprocessing /Parallel systems.
Q20 what do you mean by paging ? how address mapping is performed in paging technique? Also enumerate the advantages and disadvantages of paging.
Q21 (a) what are the different objectives which must be considered in the design of scheduling discipline?
Q21(b) what are semaphores ? How do semaphores solve the problem of mutual exclusion ? Explain what are the benefits and limitations of semaphores.
Network Operating System Distributed Operating System
1) In Network Operating system we have to know the IP Address of a particular system to access the resources. 1) In Distributed Operating system we will male simple query to server. The server will check the entire clients computer the return the result back to client computer.
2) Any user can access any computer after providing user name and password 2) One user can not access any computer without the permission of administrator
3) Any hardware disturbance will slow down the process of the computer 3) Any hardware disturbance will not slow down the process of the computer
4) It is not reliable 4) It is reliable
5) One user can know about the location of a particular user easily 5) One user can not know about the location from where the result is coming
6) Updation process is cheap Updation process is costly.
7) Backup process is costly 7) Backup process is not costly.
8) if server is not working then entire process will be break down 8) if server is not working then backup server or recovery server manage all process.
9) Controlling of all system is done by System administrator 9) Controlling of all System is done by System automatically
10) resources can be shared between different system 10) Resource can not be shared between System because one user can not login into another system.
Batch Processing System Real Time Processing System
1) all processes are collected and processed in a particular fashion 1) all processes are collected and processed in the order in which it is inserted in system
2) It is the oldest method for processing 2) It is the latest processing Concepts
3) we can perform sorting to get the desired result 3) we does not required sorting of processing
4) Result is provided without any time limit 4) Result is provided within time Limit
5) Processing request is done by the user. 5) Processing request is done by the event which we perform on an application.
6) order of processing can be changed according to user requirement 6) Order of processing will be depend on the order in which request is entered in the system.
7) Last process in the batch will take more time to get the final output 7) Real time processing system will provide same time for each processing
8) It is cheap processing System 8) It is costly processing System
9) There is no specific time limit 9) there is a Time limit
10) It is measurement oriented 10) It is action Oriented
11) For Example
Payroll ,forecasting 11) for Eample
Scientific Experiement
12) Processes are handled in a batch 12) Processes are not handled in a batch
Multitasking and Multithreading
MultiTasking MultiThreading
1) In Multitasking more then one program is executed with in same CPU 1) In Multithreading multi tasking is performed within a single program
2) Different tasks can be taken from different users 2) Single task is taken from single user at a time
3) we can handle complex processes 3) we can handle simple process
4) Each program contains Individual address memory space 4) every program will use same memory space
5) each process can not perform separate task without using any resources. 5) In this process process can perform the task without using resources.
6) In multitasking stack is used 6) In multithreading stack is used but sequentially is executed
7) It can handle different users request 7) It can not handle Different user request
Real Time System and TimeSharing System
Real Time System Time sharing System
1) Program is executed according to event we perform 1) Program is executed according to time slice is given to each program
2) We can handle one process at a time 2) We can handle multi program at a time
3) User can see the result according to query performed by the user. 3) User can change ,upgrade as well modify the program
4) User get the result of query with in the time limit given by the user. 4) time is already decided by the user.
5) Processing time is less because no context switching is performed 5) It will take more time because more context switch is taken
6) Real Time System can be classified into two category
a) flexible
b) Fixed 6) Time sharing system will be depend on the Time slice is given to each process
7) One time can be processed at a time 7) Multiple task can be processed at a time
Preemptive and Non-Preemptive
Preemptive Non-Preemptive
1) Time is allocated to each process 1) Time is not allocated to each process
2) In Preemptive shifting is done from one process to another process 2) shifting is not performed from one process to another process
3) It is best for Multiprogramming environment 3) It is best for UniProcessor System
4) We need a special hardware to perform Preemptive 4) We does not required special hardware
5) It will increase the utilization of CPU Utilization 5) It will not increase the CPU Utilization
6) It is costly because we have to prepare scheduled 6) It is not costly .
7) Time is limit given by the user 7) Time limit is not given
8) Deadlock condition can not happens 8) deadlock condition can come
9) Time Interval equally given to each process 9) Time Interval is not given equally to each process
10) It will shift from one process to another process until the entire tasks are not completed 10) It will shift from one process to another process
Paging and Segmentation
Paging Segmentation
1) This is the physical arrangement of Information 1) This is the logical arrangement of Information
2) User can not see the limit of paging 2) User can view the limit of paging
3) Paging always performed in Fixed size 3) segmentation size can be changed according to the size of an application
4) Size of physical will be decided by the machine architecture 4) Size is not decided by the machine architecture
5) we have to rearrange the physical blocks 5) We donot have to rearrange the physical blocks
6) we have to decide the frame to handle the paging 6) we do not required frame to handle segmentation
7) Paging can be used to shift from one block to another block 7) Segmentation can not be used to shift from one location to another location
Q18. What are deadlock? When these do occur? Suggest three basic methods for preventing these.
Ans. Deadlock means that one process is requesting one resource the is hold by another process.
According to the diagram there are four process P1,P2,P3,P4. Process P1 is requesting the resource that has been hold by another process P2 and P2 is requesting the resource that has been hold by the process P3 and p3 is requesting the resource that is hold by the P4 process . In this condition no one process will be satisfied that means no one will satisfied. This will lead to Deadlock condition.
There are four conditions that must be true for a particular deadlock
1) Mutual Exclusion
In this condition one particular resource is allocated to particular process and other process will wait until the resource is not free up by the first process.
According to the diagram P1 is using the resource R and p2 is also demanding the same resource R.In this case P2 will wait until p1 does not release the resource R.
2) Hold and Wait
In This condition one process hold one resource and demanding another resource that has been hold by another process.
3) No Pre-emptive
In This condition one process hold a particular resource and other processes are waiting for that resources.In other word we can say that one process hold a particular resource for unlimited time. that will bring other process to deadlock condition
‘
4) Circular –wait :
In this condition one process wait for a particular resource that is hold by another process and another process is waiting for a resource for a resource that is hold by some another process. That means no one has been satisfied.
According to this diagram P1 is waiting the resource that has been held by the process P2 and P2 is requesting the resource that has been held by the process P3 that process requesting the resource that has been held by the process P4.
Deadlock handling:
Deadlock handling is the concepts in which we will handle the deadlock with different techniques. There are different techniques are available to handle the deadlock condition.
1) Deadlock Prevention
This method will ensure that we will prepare some protocol to ensure the system does not enter into deadlock situation. The following conditions must be ensure the deadlock should not be entered
a) Mutual Exclusion
b) Hold and Wait
c) No Preemptive
d) Circular Wait
2) Banker’s Algorithms
Q9 (a) Disk Scheduling is concept in which we will decide how we will access the data from disk. Disk Scheduling will use different methods to access the data from storage. Disk Scheduling will take the data from requested track and sector on which data has been stored.
For Example
There are four request arriving from different different user then which one process will be processed first or which one will be processed last that will be decided by the Disk Scheduling. Finally we can say that Disk Scheduling will arrange different request arriving from different users.
Disk Scheduling is required with following reasons
1) Time should be taken to access the data should be less
2) Reducing the seek Time to move to desired Sector or track
3) Providing the proper execution time to each process that are arriving for the process
4) Deciding which operation we want to perform on disk
5) Handling the proper address for data transfer
6) Handling the proper number of bytes for transfer
7) Proper arrangement of different proper that has been stored in System Queue.
8) Proper utilization of CPU
There are different Methods are used for disk scheduling
1) First Come First Server
In this scheduling we will process the request that arrive first then move to process that arrive later. This is the simplest disk scheduling technique. This technique is fair enough to process the request.This technique does not provide fatest service to process the request that arrive to the CPU. For Example
Process Block
P1 92
P2 152
P3 82
P4 30
P5 20
P6 50
According to this example the starting position of head at 20. during the first process head will move to block 92 then it will move to block 182 this is the forward movement of head then it will go back to block 81 this is backward movement of head. All processes processing required
242 blocks to be traveled.
Advantage
a) It is the simple scheduling technique
b) It will follow the order of request. It means that First In First Out will be
followed up
c) As the request will be placed in queue that will be processed without observing the higher order or lowest order.
d) This technique can be implemented easily.
Disadvantage
a) It does not provide fastest service to us
b) Reading and Writing time to the disk will take more time. Because
switching from one block from one block.
2) Shortest Seek Time First
Shortest Seek Time First is a scheduling in which job will be processed first which contains less time from the current head location.This scheduling technique will ensure that process which will take less time will be processed first.
Process Block
P1 92
P2 152
P3 82
P4 30
P5 20
P6 50
According to the example the starting head location is 80 . It will check which one process will take less time to process. From starting position it will move to process P3 after that it will check that which block is very near to the current block location.
Advantage
a) Shortest Time taking process will be executed first then other process will be processed.
b) It will not consider the order of insert.
c) It is the best technique when we have short time process in the queue.
Disadvantage
a) This technique will take us to starvation condition. For example
we are at block no. 20 and next block location is 220 .
According to this technique process at block location 220 will
remain in wait condition .
3) SCAN Scheduling
In this scheduling technique we will start from one block then we will move to another block. In other word we can say that head will start moving from one block to another block the request that arrive between starting to ending location of memory that will be processed. In this scheduling the process will executed in a specific order.
For Example
Process Block
P1 56
P2 78
P3 18
P4 120
P5 220
P6 250
The Processing will performed in the following order.
First of all starting position of the head will be considered . Then first location P1 will be processed then P2,P4,P5,P6 in the last when head will be restarted the process no. P3 will be processed.
Advantage
a) It is the simple disk scheduling technique
b) It is faster technique than FCFS,SSTF technique.
c) It is Better technique to avoid starvation of process.
Disadvantage
a) if any process arrive before the head position then process will have to wait until the head position reach to that location.
b) It is not best when you want to execute a process immediately.
4) C-SCAN Scheduling
C-SCAN scheduling in which head will move in circular condition. that means when head reach to end of the disk then it will be started automatically to the starting of the disk.
For Example
Process Block
P1 56
P2 78
P3 88
P4 120
P5 220
P6 250
According to this example there are six processes from P1 to P6 and head position start from block no. 109 then it will process in the following order
Process number Process Name
1 P4
2 P5
3 P6
4 P1
5 P2
6 P3
This example indicate the process will be started with P4 and ending with with P3.
Advantage
a) This scheduling with ensure every request will be processed
b) This is the simple technique to process different types of request
c) The request will be processed in a particular sequence
Disadvantage
a) The process request before the head position will have to wait for their term
b) Waiting for execution can create starvation condition for different types of processes.
LOOK Scheduling
In This scheduling head will move in any direction according to request done by the user. In this scheduling head will move in any direction it can be forward or backward.
For Example
Process Block
P1 92
P2 152
P3 82
P4 30
P5 20
P6 50
According to the example user make a request for a particular block then head will be automatically shifted to that block.
Advantage
a) request will be processed fast
b) Priory can be given according to the user request
c) This is the simple techniques for scheduling
Disadvantage
a) Unrequired blocks can be read by the head because moving from one location to another location that will travel lot of blocks from one location to another location.
Q2(a) What are the salient features of UNIX operating system ? Explain
There are following features provided by UNIX
a) Multitasking
UNIX provide more than one job at a time. For Example
You are typing a letter in text editor at the same time you can copy,modify,delete another file according to user requirement. This indicate that multiple taks can be performed at the same time.
b) Software Development
UNIX Operating system provide excellent environment for developing the software with the help of different types of tools provided by the UNIX with the help of UNIX we can utilize the hardware at maximum level to get the proper out to us.
c) Networking
UNIX operating system provides different types of programs by which we can perform the networking between different types of computers.
d) Security
UNIX provide a particular user a user name and password to provide proper security to the user.
e) Rights
UNIX operating system provides proper rights to each user and file. There are three types of rights provided by the UNIX operating system (Read,Write,Execute)
f) Flexible
UNIX Operating system provides flexible environment to modify,change the environment according to user requirement
g) File Structure
UNIX Operating system provides File structure by which we can organize different types of files easily.
h) Format
UNIX operating system use a uniform format of file that format can be modified easily.
Format will be accepted globally
i) User Interface
UNIX operating system use a simple user interface that means user can interface with the system easily
j) hideness
UNIX operating system hide the hardware information from the user. That means user can not view the hardware details from the system
k) Primitives
UNIX Operating System provides different types of primitives that provides the facility to make simple and complex program easily.
l) Independent
UNIX operating system is machine independent that means UNIX operating system can run on any system without any hardware specifications
m) Portable
UNIX operating system is portable so that we can shift from one system to another system easily
n) Multi-support
UNIX Operating system support character interface and user interface.
(b) what is the directory structure of UNIX operating system ? Explain
Ans : As we know that directories are files that give the file system a hierarchical structure.In a directory the data is put in a sequence of entires.Each such entry contains an node number and name of a file present in the directory and pathname is a null terminated character string. The pathname is divided into separate parts by “/” character.Each component will contains directory name by which it will be identified.
According to the diagram there is single root tha is called root. Every leaf is called directory.This diagram contains one root and following directories inside it.
a) /dev
This directory will contains all device files. This directory will contains files that are associated with printer,monitor and other devices which we have attached with the system
For Example /dev/console This directory indicate that dev is the directory that contains directory console inside it. That will handle all operation that we will perform on monitor
b) /bin
This directory will contains the executable files for most UNIX commands. As we know that all UNIX commands are executable that has been written in “C” language or script .UNIX provide shell script that will contain single name by which file will be identified.we have to type one name of the file for execution
c) /usr
This directory will contains all files that can be private or public to every one. This directory will contains all work perform by a single user or group of users.
d) /tmp
This directory will contains all temporary files that will stored for temporary operation or different other operation we perform on a particular file.
e) /etc
This directory will contains all additional files that are used to handle additional work that we perform on the system.This directory will contains all files that are associated with Devices,Pheripheral Devices that we have attached with the system.
f) /lib
This directory will contains all library functions that is provided by UNIX for the programmers.We can use library functions by making system calls to library from where we want to access the function.
Advantage
a) We can arrange different files in different directories
b) We can easily identified different files
c) We can easily arrange different files with in a single directory
d) We can provide index to different files that are placed in a particular directory.
Disadvantage
a) We have to provide path to switch from one directory to another directory
b) We have to provide long path to access a particular file.
Q13 Explain the following allocation algorithms
(a) First Fit
This allocation algorithm will scan the free list until a large enough hole is found. This algorithm find the perfectly fit block of memory if perfectly block of memory is found then it will be allocated to process otherwise process will wait for memory allocation
For Example
List of available Memory block
Block Size
B1 128
B2 152
B3 421
B4 322
B5 22
Now the request arrive for a process with size of 150 then block B2 will be selected to fit the memory block.
Advantage
a) It is fastest algorithm because list of free space is also maintained
b) It can be implemented easily
Disadvantage
a) If any change happens in any memory block then we have to change the list according to the changes done in memory
b) Every time we have to update the list to get the better output
c) If there is no large space is available then process will move to starvation condition
(b) Best Fit
This allocation technique will place the process in smallest block of unallocated memory. This algorithm will find all list of small holes in memory then it will check which is best to fit the process request done by the user.
For Example
List of available Memory block
Block Size
B1 128
B2 152
B3 54
B4 42
B5 47
Now the request arrive for a process with size of 150 then smallest block B4 then B5 and last B3 will be occupied.
Advantage
a) Smallest block of memory will utilize perfectly
b) We can arrange small and large block easily
Disadvantage
a) We require list of free memory block to get the best fit memory blocks.
b) This algorithms will generate large number of small holes
c) Searching in list will take lot of time
(c) Worst Fit
This allocation technique will place process in available largest block of unallocated memory .This algorithm will make a large hole once the allocation has been done.
For Example
List of available Memory block
Block Size
B1 128
B2 152
B3 54
B4 42
B5 47
Now the request arrive for a process with size of 150 then largest block B2 will be occupied.
Advantage
a) This algorithm will generate large hole of memory
b) This algorithm will arrange large blocks of memory perfectly
Disadvantage
a) Once larger block of memory occupied then same size memory can not be prepared.
b) This technique is best when we have large number of memory blocks
(d) Buddy’s System
Buddy’s System is System in which different memory blocks are arrange with the size of multiply with 2. This system will handle memory block fast because allocation address calculation is an easy process. When ever user make a request then request will be processed with power of 2.
For Example
List of available Memory block
Block Size
B1 128
B2 152
B3 54
B4 42
B5 48
Now the request arrive for a process with size of 150 then block B2 will be occupied.
Advantage
a) Calculation of memory address is an easy
b) Searching is an easy process
c) Entire list is not searched
Disadvantage
a) This is not best for memory allocation. For Example we want to allocate a memory block at address 35 but this technique use the address with power of 2 that will store them on address 36 that will waste the memory block.
b) Extra space is leaved between two memory allocation
(e) Next Fit
This allocation technique will allocate the process in free partition of memory. In this algorithm processing will be started from the same place from where the processing has been leaved off.
For Example
List of available Memory block
Block Size
B1 128
B2 152
B3 54
B4 42
B5 47
Now the request arrive for a process with size of 150 then largest block B2 will be occupied again the request will be arrived then process will be started from block B2 will be started.
Advantage
a) It will take less time
b) Block allocation is fast
c) Proper arrangement of memory can be performed
Disadvantage
a) Once allocation of block is performed then we can not go to that block
Q5(a) what do you understand by a process ? what are the different states of it?
Ans
Execution of a program from a particular context is known as process. In other word we can say that we will run a block of code that code can effect or it can effected by another process. There are different system that support single process at a time that is called uniprogramming and the system with multiple process is called multiprogramming.
The following process control block is used
Process Control Block
Execution State
Scheduling Information
Accounting and Miscellaneous
Execution State
This part of Process control block indicate that the state of a particular process. There are following state of process is used
a) New State
In this state new process will be created or new process is generated
b) Ready State
In this state process will be in ready state to accept input and output to any devices that we have attached with the system. Ready state will use ready queue that will contain all process that has been started or generated by the user.
c) Running State
In this state program will in execution state in which program will be ready to accept input and output from the external devices that we have attached with the system. Running state will ensure that program is in running state.
d) Suspended State
In this state process will be stop by the user. due to lack of resources or other reasons . For Example one process is processed by the CPU during this processing another higher priority arrive then current process will be suspended and focus will move to new process with higher priority.
e) Terminate State
In this state the process will be terminated by the user . After this state program execution will be stopped and terminated.
According to diagram there is new process that will move to ready state. Ready state will ensure that process is ready to run on the system. Ready state will send the process to running state this state will execute the program that has been by the user. During running state process can be terminated or it can be send to suspended state. Once the state has been send to suspended state should be reprocessed as term will come.
Scheduling Information
In this step we will decide the scheduling information that will decide how the process will be executed. Scheduling information will be depend on the scheduling algorithm we will apply on the process.Scheduling information will provide information about the processing details.
Scheduling information will provide the following details
1) Process Name
2) Process Identification
3) Process Ready Date
4) Process Last Access details
Accounting and Miscellaneous
In this step we will maintained the following details
1) List of resources
2) Number of resources used
3) Priority details of each process
4) Scheduling details of each process
5) Different modification has been performed on the process
Q5(b) Differentiate between long term, medium term and short term scheduler
Long Term Scheduler Medium Term Scheduler Short Term Scheduler
Q5(c) Scheduler
Operating System must select the process from the queue in some fashion and selection of processes will be depend on the scheduler that will carries out the process in other word we can say that scheduler is a mechanism that carries out the scheduling activities
The scheduler can be classified into three categories
1) Long term scheduler
Long term scheduler which determines which programs are admitted to the system for execution and when and which ones should be executed. Long term scheduler will control the degree of multiprogramming and decides on which job or jobs to accept and turn into processes. The more jobs created and it make smaller to process a particular process. Long term scheduler provides satisfactory services to the current set of processes.
2) Middle term scheduler
Middle term scheduler will decide which processes suspended and resumed. Middle term scheduler will process based on resources they require. This scheduler will suspend the processes if no proper resource is found then process is suspended. It will act as medium term scheduler between resource and memory.
3) Short term scheduler
Short term scheduler shares the processor among the ready or running processes.the scheduler is very fast scheduler. if any process requires a resource that it is removed from the ready list and use a ready list data structure to identify ready processes.
There are following criteria to evaluate the scheduler
a) Scheduler Efficiency
As we know that scheduler will perform the process activities of the operating system. Scheduler is efficient then processes will be performed in perfect way. Scheduler should be able to take the overhead of the different processes that arrives in the Operating System
b) Waiting Time
The time is spent between Ready to run state of a particular process.In other word we can say that time between Ready State and Running State should be less. If time is less then processing will be fast otherwise system will be slow in processing of process.
c) Response Time
Response time is the time between Submission of request and first response to request. If the time between submission and first response to request is less then processing will be fast otherwise System performance will be down.
d) Throughput
Throughput means that number of processes will be completed per unit time. We can say that how many processes can be completed according to time period provided by the system.
e) Turnaround
Turnaround means that time has been between submission to completing the process. Turnaround time is less that mean system is performing the process fast and quickly.
f) CPU Utilization
In this criteria will design the scheduling in which CPU can be utilize in perfect way.
g) Proper Response
Scheduler should provide proper response to each process that mean each process should utilize the system resources.
h) Independent
Scheduler should treat each process as independent and each process can use the system resources properly. In other word we can say that each process should be handled individually.
i) Distribution
Scheduler should distribute the CPU Resource properly and fair that means scheduler should treat each process equally manner.
j) Proper Separation
Scheduler perform the proper separation between IO Bound process and CPU bound
process efficiently.
Scheduling Techniques
Scheduling is a technique that will decide how the process will be shifted from ready queue to CPU.Scheduling
Q10(a) What is time slicing ? How the time slicing duration affects the overall working of the system?
Ans . The period of time for which a process is allowed to run in a preemptive multitasking system is known as time-slicing.the scheduler is run once every time slice to choose the next process to run.if time slice is short then scheduler will consume too much processing time.
Time slicing improve the performance of the system in the following ways.
1) Prediction
Time-Slice will decide the time-period for all processes that will appear for the processing.Time given to each process is predicted earlier.
2) Equality
With the help of time slicing resources are provided to each process in equal manners.In other word we can say that fairness is provided to each process.
3) Minimize Overhead
Time-Slice will reduce the overhead of the process because time limit is given to each process.
4) Balance of Resources.
Time slicing will maintain the proper balance between different types of resources.
5) Enforcement of Rules
With the help of time slicing we can implement the rules on different resources required by each process.
6) Balance
Time-Slicing will maintain the balance between response and utilization from resources.
7) Throughput
Time –Slicing will increase the output of CPU
8) Avoid starvation
Time-Slicing will reduce the starvation of proceses. Time-Slicing will provide a time period to each process that has been placed in the ready queue.
9) Handle complex process
With the help of Time-slicing we can handle complex processes easily.
10) Reliable
Time-Slicing will provide reliable time allocation to each process in the case of any process failure.
10(b) Write short note on Virtual Memory
Virtual memory is the combination of RAM and temporary space available on your harddisk.When RAM get low then it will move the data from RAM to paging file that will free up the RAM. The virtual memory memory subsystem of a processor that will implements the virtual address spaces to each process
Q1 Explain the purpose and syntax of any two UNIX commands belonging to the following categories of commands
(a) Process Mangement
(b) System Administrator
(c) Directory Command
(d) Security and Protection
(e) Inter-user Communication
(f) Information Commands
(g) File Manipulation Commands
(a) Process Management
As we know that every process has a process identification number that is used as the index to the process table. The UNIX Operating System provides a number of System Calls for process management. In Unix Operating System fork system is used to create an identical copy of process. The Created process is called the child process and original process is called as the parent process. The process management use the following commands
i) kill Command
This command will send the specified signal to the specified process or grou
P of process. If signal is not specified the TERM signal is sent then TERM signal will terminate the process.
Syntax of kill command
kill Signal
In This command we can use the following options
kill –s This will specify the signal to send.The signal may be given as a signal name or number
kill –l This command will print a list of signal names.
kill –a This command will not restrict the commandname to process id conversion.
kill –p This command will print only process id and it will not send any signal
(ii) nice command
This command will run a program with changing or modified scheduling
Priorty.This command will be used to change the priority of a process.
Syntax
Nice options
This command can contains different options with it.
(i) –n
this option will increment the priority according to the number given by
us.
(ii) –help
This option will show the entire details about the nice command
(iii) – version
This option output version and exit
Finally we can say the process management is an important to find out the status of any process as well as working of any process that is working in the system.
(b) System Administrator
System administration play very important role when system is accessed by different users. The System administrator will perform the following task
i) Efficient utilization of the System’s Resources.
ii) Focus on different task performed by the user.
In System Administration we use the following commands
i) fsck
This command will check consistency and interactively repairs the file systems. This command has two components
1)generic component : This will contains all commands that can be applied to each file systems.In other word we can say that it can be implemented on each file system.
2) component It will conain specific commands that can be applied on selected file systems.
Syntax of fsck command
fsck [file system]
This command contains the following options inside it
Options Description
-f This option will specify the file system. If type is not specified than it will take the file system from predefine directory
-v This option will echo the completed command line.It will show the information about different devices that we have attached with the system.
-m This option will check the file system first of all. This option will return a code.If it is zero the file system is clean otherwise file system is not clean .
-y This command will give answering yes or no to all prompts provided by the command
w This option will check the file system has write access or not
p This option will run the command automatically in silent mode.
ii) wall command
This command will send a message to everybody’s terminal. The client who have login into the system will get the message send by the user.
Syntax of Wall command
Wall [Message]
This command will send the message to everyone user login in the system. The limit of message send to each user will be limited upto 20 characters.
(c) Directory Command
Directory commands are that commands that will work on the directory that is available in the system. We include the following commands inside the directory commands
i) rm
This command is used to remove files or directories. We can remove a file or group of files.
Syntax
rm [options] filename,directoryname
In this command we include the following options
Options Description
-d This option will remove the directory. If it is empty directoy
-f This option will ignore nonexistence files
-i This option will show a message before every file removal
-r This option will remove the contents of directories recursively
-help This option will provide the help about this command
-version This option will show the
ii) mkdir
this command will make a directory on the path that is given by the user.
Syntax of mkdir
mkdir [option] directory
In this command we can specify the following options
Options Description
-m This option will decide the mode of directory which we want to create
-p If there is parent directory the it will return true otherwise it will return false
-v This option will be used to provide the version
-help This option will provide the help about the command
The above two commands will be used to handle the directory
(d) Security and protection
As we know that UNIX is multi-user operating system in which each user generate a file and directory and we have to provide security and protection over the files and directories.There are three types of permissions given in UNIX operating system.
i) read Access
ii) Write Access
iii) Execute Access
Permissions are defined for three types of users
i) the owner of file
ii) the group that the owner belongs to
iii) other users
Security and protection use the following commands
(i) chmod
This command is used to modify the permissions.
Syntax f chmod
chmod permissions
(ii) chgrp
This command is used to change group ownership
Syntax
chgrp [option] group file
In this command we use the following options
Options Description
-c This option will report about the changes performed in files
-d It will the difference the file
-h It will report about the no difference between two files or directory
-f This option will show the error messages
-r This option will perform recursive option
-help This option will provide the help about this command
(e) Inter-User Communication
Inter-user communication means that two user will communicate with each other. Inter-User communication will ensure that two user are communicate with each other. Inter-User Communication will use the following commands
(i) mail
This command is used to send and receive the mail from one user to another user.
Syntax
mail username
In this command we will provide the following options
Options Description
-v This option will display details of delivery performed on user’s terminal
-i This option will ignore tty interrupt signals
_I This option will forces mail to run in interactive mode
-n This option will start reading the mail as we will start
The system
-s This option is used when we have to specify the subject at command line of UNIX
-c This option will send carbon copies to different users.
-b This option will send carbon copy to different users.
-f This option is used to forcely read the contents of a mail
(ii) mesg
This command is used to control write access to your terminal. This command will control the working and controlling of write operation on files,
Syntax
mesg (Y/N)
This command is very important to get the control over write access to a particular file or directory.
(f) Information commands
Using this command we will get the information about the system we are using . These commands are very important when we have to handle different facility provided by the system.
(i) cal
This command will show the calendar according the option provided by the user.
Syntax
cal –smjy13 [month][year]
In this command we will use the following options
Options Description
-1 This option will show single month name
-3 This option will display prev/current/next month output
-s This option will display Monday as the first day of the week
-m This option is used to show Monday of week
-j This option will display julian daes
-y This option will display a calendar for the current year.
(g) File manipulation commands
This command will be used to manipulate the files according to user requirement. File manipulation will include the following operations.
(a) Copying the files
(b) Renaming the file
(c) Modifying the file
(d) Delete the file
In File manipulation use the following commands
(i) cp command
This command is used to copy the file from one location to another location.
Syntax
cp source destination
In this command we apply the following options
Options Description
-b This option will make the backup of different files we car copying from one location to another location
-i This option will make a prompt before each file copying from one location to another location
-l This option will make the link between different files that we want to copy from one location to another location
-u This option will used if any file we are copying from one location to another location but that file is already exists.
(ii)mv command
This command is used to move the file from one location to another location.This command will shift the files from one location to another location. File or Directory is totally removed from the source from where it is copied.
Syntax
mv source destination
In This command we can implement the following options
Options Description
-i This will put prompt before each file or directory moving
-reply This option will reply about the files that has been reached to destination
-help This option will display help about this command
-version This option will handle the version of different files that we are using during file operations.
Q12
Write short notes on the following
(a) Highest Response Ratio Next Scheduling
HRRN is a non preemptive scheduling algorithm. This algorithm is similar to Shortest Job Next algorithm. In this algorithm priority is provided according to time required by each process to execute a particular process. This scheduling algorithm will optimized the normalized turnaround value. This algorithm is best for long processes that are waiting for processing for long time.
HRRN is calculated with the following formulae
HRRN=1+Waiting time/Estimated run time
Job Name Arrival Time Service Time Start Time Finish Time Turnaround Time Waiting Time Response Time
A 0 10 0 10 10 0 1.0
B 1 29 32 61 60 31 2.1
C 2 3 10 13 11 8 3.7
D 3 7 13 20 17 10 2.4
E 4 12 20 32 28 16 2.3
Mean 25 13 2.3
According to this example there are five processes A,B,C,D,E are there and each process contains a specific arrival time,service time and starting time and finish time after getting all details we can get easily the HRRN that will give the best ratio process to us.
Advantage
1) The task with the greatest response ratio is dispatched
2) No Starvation will happen for different processes.
3) This algorithm will prevent indefinite postponement.
Disadvantage
1) Every time service time is calculated when a service is processed.
2) Waiting time and response time is recalculated every time when one task has been dispatched
3) It will increase the overhead of the processor.
(b) Shortest Remaining Time Scheduling
This scheduling algorithm is a preemptive version of shortest job next algorithm. In this algorithm scheduler always dispatches the process the ready process which has the shortest expected remaining time to complete. The dispatching decision will be depend when a new process is submitted then current process remaining time will be compared with new process time which one is short will be processed first. If the new process contains short time then current process will be blocked and new process will sent to dispatching and processing.
Process Arrival Time Burst Time
P1 0.0 7
P2 2.0 4
P3 4.0 1
P4 5.0 4
Gantt. Chart
P1 P3 P2 P4
0 7 8 12 16
Average Waiting Time=(0+(8-2)+(7-4)+(12-5)/4=4
Advantage
1) Short processes are handled very quickly
2) The system will take less overhead when new process arrived for processing
3) It will decreases the average turnaround time
Disadvantage
1) It can generate process starvation for the process that contains large time for completing
2) When two process contains the same remaining time then it will increase the overhead for the processor
(c) Thrashing
Thrashing will happens when we have limited number of resources that are not satisfying the request arrives from different user. when a process make a request to operating system for a particular resource then operating system will try to find that resource which has been taken already by another process at this time new process will not be satisfied. This condition will take to thrashing .
Reason for Thrashing
There are basically two reasons for Thrashing
a) Insufficient memory at a given level in memory hierarchy
b) The program does not understand the location of the reference then memory system will replace one block again and again that will reduce the performance of the system.
Protection from Thrashing
a) Thrashing can be protected by reducing the level of multiprogramming
b) Thrashing can be reduced by adding more memory
c) Implement Local Page Replacement Algorithms
d) Providing the frame according to the requirement of the user.
e) Reducing the Access time can protect the Thrashing
Finally we san say the as the uses of system resources increases that will reduce the performance of the system.
(d) System Call
System call is a mechanism by which we will make a request to operating system for performing a particular task .The request will be performed in predefine manner that is easy to understand by operating system. The System call will make an interface between a process and operating system.
Advantage provided by System call
a) We can activate any program easily
b) We can perform different operation on different files associated with file
c) We can Terminate any ongoing program
d) We can use System call to switch the data from one system to another system easily
e) We can perform read, write operation on a particular device.
Types of System Call
1) Process Controlling System call
The process Controlling System call is system calling in which we perform the following task
a) Starting of any process
b) Ending of process
c) Loading of program
d) Executing the program
e) Changing the attributes of process
f) Retrieving the attributes of process
g) Providing memory to program
h) Free up the memory from program
Finally we can say that process controlling System call can be used to handle different task that are related to the process.
2) Device maintaining System call
Device Maintaining System call is that call by which we will manipulate different types of devices according to user requirement.In device maintaining System call we can perform the following task
a) Sending data to different devices
b) Receiving data from different devices
c) Attaching device with system
d) Logically disconnect the device
e) Changing device functions
f) Manipulate device function
3) File Manipulation System call
File Manipulation System call that call by which we can manipulate the file according to user requirement. With the help of file manipulation System call we can perform the following task
a) Creating a file
b) Renaming a file
c) Deleting a file
d) Opening a file
e) Reading from a file
f) Writing to a file
g) Changing a file attributes
h) Getting a file attributes
4) Interfacing System call
Interfacing System call is that call by which we will make interface with different system or different users. Interface system call perform the following tasks
a) Creating the communication
b) Removing the communication
c) Sending the message
d) Receiving the message
e) Exchange the information between users
f) Communication between remote computer and general computer
g) Exchange status information between systems
5) System resources manipulation System call
System Resources manipulation System call is that call by which we will perform the manipulation of system resources.In this call we can perform the following functions
a) Getting System date and time
b) Setting System date and time
c) Getting process file
d) Setting process file
e) Getting system date
f) Setting System date
Q19(a) What are the benefits of multi-programming ?
Ans :-
Multi-programming is a method in which different program running at the same time.
Or we can say that we will allocate system resources to more than one concurrent application ,job or users.
Multi programming provides the following advantages
1) More efficient use of computer time:
If we have one computer that is running a single process and there are different types of input and output is required then CPU will remain idle most of time. But in multiprogramming more than one program are running concurrently suppose one program is accepting the input from the user then CPU will remain busy with another process processing. This will utilize the CPU time to get the better and best result from the CPU.
2) Increased Throughput
Multiprogramming will provide the throughput better and best because CPU will not wait for a particular process to provide the output. When CPU will process multiple user request then output will be much better and fast. Suppose there are two jobs that arrived for processing with different types of length then CPU will process them with efficient manner with proper utilization of system resources.
3) Multiple user
Multiprogramming support multiple user request that arrive for processing , Multiprogramming will treat the individual user request as a single process. we can say simply multiple user request can be processed.
4) Memory Management
Multiprogramming will use the memory in proper way. In multiprogramming we will provide separate memory to each process that arrived for processing. Multiprogramming will handle the memory according to the application size and memory requirement
advan
5) Efficient Resource Utilization
With the help of Multiprogramming we can use the resources efficiently. Multiprogramming will use the system resources better in the comparison of uniprogramming For Example
Resources Uniprogramming Multiprogramming
Processor Use 20% 40%
Memory Use 33% 67%
Disk Use 33% 67%
Printer Use 33% 68%
Elapsed Time 30Min 15Min
Throughput 6jobs/hr 12jobs/hr
Mean Response Time 18 min 10 min
According to the example we can see easily the difference between Uniprogramming and multi programming
In uniprogramming Resources are remain idle for time period and in multiprogramming resources are used in proper way and best utilization of resources is done
6) Mean response time
Mean Response Time means that how time is taken to execute the program and show the final output to the user. When multiprogramming is used then mean response time is reduced.
7) Elapsed time Reduction
When we use the multiprogramming then Elapsed time is reduced. In multi programming time will be reduced to half of time that is taken by uni-programing.
8) Better scheduling
When we use multi-programming then we can perform better scheduling of processes . CPU has better choice to take better scheduling to get the final output to us.
Q19(b) What are the advantages of “Multiprocessing/Parallel systems”
Ans
Parallel Systems
In Parallel system we will use multiple resources to solve a computational problem.
In Parallel system Multiple CPU is used and each problem is breeaken into different parts and each part is solved separately. When a problem is sub divided then sub-part is again sub divided into instruction and instruction will be executed on individual system.
According to the diagram a single problem is sub-divided into five different parts and each part is handled separately. When a problem is sub-divided then processing will be fast.
Advantage of Parallel System
1) Multi Task
With the help of multi-tasking we can execute multiple task at the same time.
As we know that when we have multiple CPU the multiple task can be performed
2) Save Time
Multi-processing will save the time that we will waste in processing multiple task separately. In other word we can say the time which we will waste to process each process separately the will be processed at the same time.
3) Save Money
Multi-processing can be implemented with cheap, commodity components.
Because single resource can be shared by multiple users.
4) Solve large problems
With the help parallel system we can solve large problem easily by dividing the problem into small parts and each part is handled separately.
5) Provide Concurrency
Parallel processing will provide concurrency to process multiple process equally.
6) use of non-local resources
Parallel processing provide the facility to use the non-local resources that is used in remote computer
7) Limits to serial computing
Parallel system will limit the serial computing that means we can process multiple task equally.
Q20
What do you mean by paging? How address mapping is performed in paging technique? Also enumerate the advantages and disadvantages of paging.
Ans :
Paging is the algorithm that divides computer memory into small partitions and allocates memory using a page as the basic building block. The paging will perform the following task
1) Paging will make all chunk of memory the same size and each chunk will be 512 bytes
2) Paging will define the base address in page table about a particular process along with
Complete details about read and write operation
3) Paging will handle page number that will come directly from the address
4) Each page is free then it is automatically assign to the requested process
5) Swapping will happens between the pages when a particular process happens
Paging
According to the diagram paging will contains virtual address that contains two parts one part is page number and other part is offset address of the virtual memory. Virtual memory entry will be done in Page Table Entry that will contain the address details of Virtual Memory. Virtual Memory will contain the offset address of memory where the block of virtual memory will be stored.The physical memory will contain page table entry and offset address of virtual memory.
For Example
Page Number Program allocated to Physical Memory Address
0 Program A.0 1000:0000
1 Program B.1 1000:1000
2 Program C.2 1000:2000
3 Program D.3 1000:3000
4 Program E.4 1000:4000
5 Program F.5 1000:5000
6 Program G.6 1000:6000
7 Program H.7 1000:7000
According to this example each page allocation size is four kilobytes . Then allocation can be performed in the following order.
1. Program A requests 3 pages of memory
2. Program B requests 2 pages of memory
3. Program D requests 2 pages of memory
4. Program C terminates leaving 2 empty pages
Advantage of Paging
1) Single address space
Paging will use single address space to maintain the address of different types of memory
2) Swapping
In paging swapping is performed from page table to physical memory available to us.
3) A process can thrash at disk speed
A Process can be increased according to the disk speed. If disk speed is good that means processing will be fast other wise processing will be slow.
4) Security achieved by assigning pages to tasks and comparing
We can achieved the security by assigning the pages to disk when we will call the specific address that will be compared with specific address
5) Simple bit wise substitution
Simple bit wise substitution is performed that means we can manipulate a particular address according to the requirement of an application
6) Fixed size simplifies allocation and placement
What ever the block is prepared that will be fixed size and fixed size will be allocated to the individual process.
7) External fragmentation
In Paging external Fragmentation is not a problem
8) Valid Identification
Paging will use valid bit to detect references to page-out pages
Disadvantage of Paging
1) One shared virtual address space
Single Shared Virtual Address Space is used that will create a problem for different address to be maintained in the memory
2) Locality is slightly diminished
What ever the address will be allocated that will occupy the memory space that will diminish the local memory
3) Fixed size wastes space
When fixed size memory space is used. Suppose fixed size size of memory is 4Kilobytes then address stored there should of 4 bytes.if stored address size is less then it will waste the memory space.
4) Problem was so big it lead to a second approach
When any critical problem arrive then it will move another approach.
Q3(a) What do you understand by an operating System ? What are the major functions performed by an operating sytem.
Ans :
An operating System is a collection of programs that are executed continuously to perform a specific task. An Operating System will perform different types of tasks. Operating System will manage different resources available on the system. As we know that a computer is an hardware that does not perform any specific task without the help of operating system. An operating system will accept request that is arriving from different resources and devices that has been attached with the system. An Operating system will handle different types of hardware which we attached with the system.
There are following functions performed by the Operating System.
a) One or more user interface shells, which can be either graphical user interfaces (GUIs) or commandline
interfaces (CLIs),
b) The facility to load and execute (and, if necessary, to abort and recover from) user processes,
c) One or more application program interfaces (APIs), a set of system call functions,
d) The facility to communicate with a variety of input/output (I/O) devices, one or more file systems,
e) The facility to share the computer’s resources between two or more user processes in a fair way,
f) A communications infrastructure to support message passing between processes,
g) Background record-keeping that keeps track of resource usage per user process,
h) Protection and security so that user processes and Data are kept as free as possible from undesired interference.
Q3 (b) Enumerate important characteristics of a good operating system and also discuss the responsibilities of an operating system as a resource manager.
Ans.
There are following characteristics are used for operating system.
a) Layered Structure
Operating system will use different types of layered concepts.
b) Microlernel Architecture
As we know that operating system use Microkernel Architecture is used to handle different types of
hardwares we attached with the system. It will handle address space, inter process communication and basic scheduling used in operating system. User can implement different other types of services.
c) Multithreading
Operating system should be capable to handle different processes simultaneously.
d) Threading
As we know that thread dispatchable unit of work and executed sequentially. Thread is executed as interrupted is activated.
e) Symmetric multiprocessing
In symmetric processing multiple processors will be implemented on the system. That can process multiple task equally and all processes share the input and output that has been attached with the system.
f) Distributed Operating System
Operating system can handle different types of processes that are arriving from different types of user or we can say that resources are distributed to different users. Distributed Operating System will distribute file system and shared memory.
g) Object Oriented Design
Operating System will add modular concepts to small microkernel system. When modular concepts are added then we can handle different requests arrives from different users.
There are following responsibilities performed by the Operating System.
a) Services
Different types of Services that operating system provides to programs. Services will include providing resources and different input and output devices.
b) Program execution
Operating System will provide the services to execute different types of programs. Providing memory to different programs
c)Input Outpput operations
Operating System perform Input Output operations with different types of peripheral devices we have attached with system.Operating Directly take input and output to peripheral devices.As we know that any program can not access peripheral devices directly that why operating system service is required by any devices.
d) File system manipulation
With the help of operating system we can perform different types of file manipulation task. Like file creation, deletion, reading, writing, and directory
e) Communication
Operating System will communicate with different system as well as it will exchange the data between processes. Operating System will use message passing service between processes and share the memory between them.
f) Fault detection
In this function we will find the fault that can arrive with CPU,Input output devices and different types of user programs. Operating System will perform a appropriate reactions to that fault.
g) Orientation
Operating System will design for the function of the system.It will not be user-oriented.
h) Resource allocation and freeing
Operating System will handle the process of resource allocation and freeing the resources that has been allocated to different processes.
i) Accounting
Operating System will maintain the account how long a particular resource has been used and what ever resources has been for a particular process.
j) Protection and security
Operating System will protect the System resources and different devices we attached with the system.
Q Give an overview of different types of operating system
Ans .
There are following types of operating System available.
Q what is an operating system structure ? Compare important operating system structures.
Ans :
Operating System structure will decide how an operating system has been design to handle different resources has been installed. Structure will include different parts included in operating system.
According to the diagram there are different parts included in operating system structure.
1) Command Interpreter
Command Interpreter will understand different commands issued by the user. The command can be given in the form of event and action on the window.
2) Error Handling
Error Handling means that there is any error in an operating system then it can be handled easily.
Error handling can be related to hardware and software.
3) Protection System
Protection System means that we use some authentication concepts to protect the system from illegal access of operating system.
4) Process Management
Process management means that how process will be handled and how the process will be arranged to execute them in a particular sequence.
5) Input Output System
Input Output System means that input and output will be handled perfectly. Input can be taken from input devices and it can be taken from external file. Output can be processed in the form of report and report can be display on printer.
6) Memory Management
Memory Management means that we will handle memory. Memory management will include memory operation like memory allocation,replication,recovery,removing and different other operation we can perform.
7) Accounting
Accounting means that operating system will maintain different types of account like userid,user rights, user access list.
8) Networking
Networking structure we will handle networking which we perform between different computers.
There are following types of operating system structures.
1) Layered Structure Approach
The components of layered operating system are organized into modules and layers them one on top of the other. Each module provide a set of functions that other module can call. Interface functions at any particular level can invoke services provided by lower layers but not the other way around. The layered operating system structure with hierarchical organization of modules
According to diagram application program will interface with system services. System services will understand user mode and kernel mode. Kernel mode will be understand by System Services. System services will make interface with File System. File System will handle memory and input and output management. Memory and input/Output management will make interface with processor scheduling and hardware we attached with the system.
Advantage
1) Each layer will provide access to only to lower-level interface
2) It required limited amount of code
3) N layer provides (N+1) services
4) It will starting debugging at lowest level until the whole system works correctly.
5) It will enhance the performance of operating system
6) Individual Layer can be replaced without effecting others parts of the system
Disadvantage
1) It provide low application performance
2) Making the difference between different layers if typical task.
2) Virtual Machine
Virtual Machine is next logical step of layered approach of operating system. Virtual machine in which any layer which are looking as hardware is best for current layer. Virtual machine will provide an interface that is identical to actual hardware, in other words we can say that it will provide an interface to different hardware in equal manner. Virtual machine will provide illusion of many processes which can be run at their own memory space. Virtual machine provides the facility to handle many processes that contains its own memory allocation. Client operating system in virtual machines is very simple because it perform single task and it is single user only. The resources of physical computer are divided into different parts and each part will create a virtual machine. In Virtual machine processors are shared between users then user will feel they have their own processor. Virtual machine provides the facility of card reader, disks and printers facility provided by virtual machine. Virtual machine will share disks between different processes and virtual machines. Virtual machine will use virtual network interface for communicating between virtual machines.Virutal machines will use Para virtualization that will provide compensate for virtual machines.
Advantage.
1) Protection
Virtual machines will provide perfect protection of system resources because machines are isolated virtually from each other.
2) Powerful base
It will provide powerful base for operating system research and development.
3) Efficient use
With the help of virtual machine we efficiently use the hardware attached with the system.
Disadvantage
1) No Direct Sharing of Data
With the virtual machine we can not share different resources or data directly.
2) Implementation
Implementation of virtual machine is complex task,
3) Cost
Virtual machine will increase the cost of implementation of virtual machines.
3) Client-Server Model
This is new concept in operating system. The basic idea behind client-server model is to divide the operating system into several processes, each of which implements a single set of services. For Example Input output server ,memory server and process server, thread interface server. Each server runs in user mode , provides services to the requested client. The client which can be either another operating system component or application program. The client will request a service by a message. The message will be identified by operating system and service is provided according to the message.
According to this model there are three layer
a) User Interface
User interface will include the following options inside it.
i) Client Application
Client application is an application by which user will interface with hardware that has been attached with the system. Client application will contains all common options that can be used by a user easily.
ii) PEACE threads interface
It will provide threads interface facility by message passing between two process,
iii) File Server
File Server is a server that will maintain different types of files that will placed by the user. File server will perform the following operations.
1) File Creation
2) File Deletion
3) File Updation
4) File Modification
iv) Display Server
Display server will handle all processes that is required to display objects on the window. Display server will accept the input from the keyboard and process them and show the output to the window.
b) Microkernel
Microkernel Approach
Microkernel approach by which we will make direct interface with system hardware. Kernel Approach
Will be used to Create, Delete any process with user requirement. With the Microkernel approach we can handle process management, memory management, file management and input/output management will be handled by kernel approach. Microkernel approach will make interprocess communication that means one process can interact with other process by sending message from one process to another process. As we know that Unix operating system use three layers to interact with hardware.
Advantage
1) Easier to extend
With the help of Microkernel approach we can extend the hardware and different other services that has been attached with the system.
2) Easier to port to a new architecture
Microkernel approach provides the facility by which we can shift from one port to another port without any type of specific software requirement. In other word we can say that we can easily port to new architecture.
3) More Robust
If there any error in kernel that can be removed easily because there are less code available in kernel. Due to less coding we can easily detect numbers of errors arriving in kernel
4) More Secure
It is more secure because proper authentication is performed. The authentication will be done with the help of user name and password assign to the process.
5) Simplified based Operating System
Microkernel approach is simplified operating system in which we can use simple commands to make interface with system.
6) Improved Reliability
Microkernel approach will improve reliability of the system that means if one process is not working the other process will handle the work load of that process.
7) Message Passing facility
Microkernel provides message passing facility between different processes. All process will communicate with another process by sending the message to that process.
8) Base for modulation and portable extension
Microkernel provides that base for modulation and portable features of an operating system. Using this facility we can divide a operating system into different sub parts and each sub part will perform a specific task. Portability means that any device can be added to the operating system without any type of specific software requirement.
c) Hardware
Hardware is electronics devices that can accept input and process the output according to the requirement of the user.
Q How layered structure approach differs from kernel approach Explain.
Layered Approach Kernel Approach
1) Operating System is divided into layers 1) Operating System is not divided into layers.
2) Each Layer will use the service of lower layer 2) It will communicate with different hardware we has attached with the system
3) It will contain six Layers
i) Application Programs
ii) System Services
iii) File System
iv) Memory and I/O Device Management
v) Process Scheduling
vi) Hardware 3) It will use three parts
i) User Mode
ii) Kernel Mode
iii) Hardware
4)It can not be extended easily 4) It can be extended easily.
5) It will contains more coding 5) It will contain less coding
6) Debugging process is slow 6) Debugging process is fast.
7) It can not be converted into new architecture 7) It can be converted into new architecture
8)It is less secure 8) It is more secure
9)Modularity concept is used 9) Modularity concept is not used.
10) Message passing is not used. 10) Message passing is used.
11) modules can not be moved from kernel to user level 11) Modules can be moved from kernel to user level.
12) For Example OS/2 12) For Example MacOS
Q What is fragmentation? What are different types of fragmentation? How each of these can be overcome? Explain.
Ans
A condition in which individual files on a disk are not contiguous but are broken up in pieces scattered around the disk and a condition in which the free space on a disk consists of little bits of free space here and there rather than only one or a few free spaces. Fragmentation is process in which file or data will occupy the memory space that space is not in continuously manner. In other word we can say that memory space will be occupied by a particular file in scatter manner.
Fragmentation can be classified into two categories
a) External Fragmentation
External Fragmentation exists when there is sufficient space to satisfy a request but the available space not in continuous manner. In External Fragmentation small memory space exits in memory that can not full fill the requirement of a particular request. A large storage is divided into different small holes.
b) Internal Fragmentation
Q What is file system? What are the main responsibilities of a file system? Where is file system located in layered organization of operating system?
Ans:
File system contains different types of utility programs that are executed as privileged applications. Input to file can be given from a particular file or it can be accepted from any input device attached with the system and output from file system will be stored in a file. The file in which we will store the output can be used for long-term storage.
File System In Layered Form
According to this diagram there are different types of layered is used in file system.
1) Application Programs
This is program that will be executed by the user to perform interaction between file and storage device in
which we have store the file. Application Programs can be design according to the requirement of the user.
2) Logical File System
Logical File System is a system in which we will decide how a particular file will be arranged on physical
storage. Logical File System will decide format ,accessing techniques and different other concepts that are
related to file.
3) File Organization Module
File Organization module will decide which concepts we are using to store a particular file on the storage.
We are storing a file in sequential order,index order ,random way.
4) Basic file System
Basic file system will decide which types of operation we can perform on file system.
5) Input output Control
In input output control we will handle input that is given to a particular file and output will be handled by a proper file system. Input and output control will be decide by Operating system we will implement on the system
6) Devices
We will implement different types of devices attached with the system.
Main responsibilities of file system
1) It will provide a convenient naming system for files
2) It will provide standardized set of input and output interface routines.
3) It will enforce access control in a multi-user environment
4) It will optimize the performance of file access
5) It will handle variety of storage devices.
6) It will maintain the consistency of files.
7) It will reduce the chance of losing data or files.
8) It will support System administrator for system backup
Q what do you understand by file protection and security? Explain the various file protection methods/strategies.
Ans
File Protection
File Protection means we will protect the file system from mischievous, intentional violation of an access restriction by a user. Protection is done to improve the reliabilities of system.
Principles behind protection
1) least privilege
It will decide the program,users and even systems has been given enough privileges to work on them.
2)
Monday, September 6, 2010
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment