Sunteți pe pagina 1din 13

System Software Assignment - 2

MIM9-12 Sem-IV

1.

What are the five major activities of an operating system in regard to process management? Ans: The operating system manages many kinds of activities ranging from user programs to system programs like printer spooler, name servers, file server etc. Each of these activities is encapsulated in a process. A process includes the complete execution context (code, data, PC, registers, OS resources in use etc.). It is important to note that a process is not a program. A process is only ONE instant of a program in execution. There are many processes can be running the same program. The five major activities of an operating system in regard to process management are 1. 2. 3. 4. 5. Creation and deletion of both user and system processes Suspension and resumption of processes Provision of mechanisms for process synchronization Provision of mechanisms for process communication Provision of mechanisms for deadlock handling

2.

Explain Job and Job Control Language Ans: A job consists of one or several steps, each of which is a request to run one specific program. For example, before the days of relational databases, a job to produce a printed report for management might consist of the following steps: a user-written program to select the appropriate records and copy them to a temporary file; sort the temporary file into the required order, usually using a general-purpose utility; a user-written program to present the information in a way that is easy for the end-users to read and includes other useful information such as sub-totals; and a user-written language to format selected pages of the end-user information for display on a monitor or terminal. In both DOS and OS JCL the first "card" must be the JOB card, which: 1 Identifies the job. 2 Usually provides information to enable the computer services department to bill the appropriate user department. 3 Defines how the job as a whole is to be run, e.g. its priority relative to other jobs in the queue. Procedures (commonly called procs) are pre-written JCL for steps or groups of steps, inserted into a job. Both JCLs allow such procedures. Procs are used for repeating steps which are used several times in one Page 1 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

job, or in several different jobs. They save programmer time and reduce the risk of errors. To run a procedure one simply includes in the JCL file a single "card" which copies the procedure from a specified file, and inserts it into the jobstream. Also, procs can include parameters to customize the procedure for each use. Job Control Language (JCL) is a scripting language used on IBM mainframe operating systems to instruct the system on how to run a batch job or start a subsystem. The term "Job Control Language" can also be used generically to refer to all languages which perform these functions, such as Burroughs' WFL and ICL's OCL. There are actually two IBM JCLs: one for the operating system lineage that begins with DOS/360 and whose latest member is z/VSE; and the other for the lineage from OS/360 to z/OS. They share some basic syntax rules and a few basic concepts, but are otherwise very different. OS JCL consists of only 3 basic statements: 1. JOB statement, which identifies the start of the job, and information about the whole job, such as billing, run priority, and time & space limits. 2. EXEC statement, which identifies the program to be executed in this step of the job, and information about the step. 3. DD (Data Description) statements, which identify a data file to be used in a step, and detailed info about that file. DD statements can be in any order within the step. Right from the start JCL for the OS family (up to and including z/OS) was more flexible and easier to use. 3. Write a short note of the comparison of Multitasking and Time sharing systems Ans: Multitasking: Multitasking is a method of running several jobs at a time, now jobs can be either in the form of programs, processes, threads, user performing multitasking(playing songs, working on word processor etc.) at a time in single pc only etc. The main idea behind to do so is better CPU Utilization. Several jobs are kept in the memory at a time such that when CPU is busy in execution of one job or task then

Page 2 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

OS switches over to other job and make it ready to get its next turn for execution by CPU. In this CPU is used efficiently. Time Sharing: Time sharing is sharing of a computer resource among many users by means of multiprogramming and Multitasking. In Time sharing several systems(called as dumb servers having only computer peripherals-no CPU they have) are attached to a single dedicated server having own CPU. Dumb servers share the CPU of dedicated server as they don't have their own CPUs. Every action or command in Time sharing operating systems is so short that very short span of CPU time is assigned for each user and thus the users at dumb systems have an impression that they have their own CPU though the fact is they share the CPU of dedicated server. Such short periods of time is called as Time-slots or Time-slices or Time-quantum. 4. List and briefly define three file allocation methods. Ans: The three allocation methods are: a) contiguous allocation b) linked allocation c) indexed allocation a) Contiguous Allocation:

each file occupies a set of consecutive addresses on each directory entry contains:
o o o o

disk file name starting address of the first block block address = sector id (e.g., block = 4K) length in blocks

usual dynamic storage allocation problem use first fit, best fit, or worst fit algorithms to manage storage
o

if the file can increase in size, either leave no extra space, and copy the file elsewhere if it expands
o o

leave extra space

Page 3 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

b) Linked Allocation:

each data block contains the block address of the

next block in the file

each directory entry contains:


o o o

file name block address: pointer to the first block sometimes, also have a pointer to the last

block (adding to the end of the file is much faster using this pointer)

a view of the linked list Page 4 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

c) Indexed Allocation

store all pointers together in an index table


o

the index table is stored in several index

blocks
o

assume index table has been loaded into main

memory i) All files in one index

The index has one disk.

entry for each block on

better than linked allocation if we want to seek a particular offset of a file because many links are stored together instead of each one in a separate block

SGG call this organization a ``linked'' scheme, but I call it an ``indexed'' scheme because an index is kept in main memory.

problem: index is too large to fit in main memory for large disks

FAT may get really large and we may need to store FAT on disk, which will increase access time
o

Page 5 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

e.g., 500 Mb disk with 1 Kb blocks = 4 bytes * 500 K = 2Mb entries


o

ii) Separate index for each file

index block gives pointers to data blocks which can

be scattered

direct access (computed offset)

a) One index block per file (assumes index is contiguous) b) Linked list of index blocks for each file c) Multilevel index d) Combined scheme (i-node scheme) used in UNIX

5.

List and briefly define three techniques for performing I/O Ans: Three basic techniques are available in current computers systems. From the least efficient to the best performing, we find: 1. 2. 3. Programmed I/O where the CPU is strictly tied to the I/O until it is finished. Interrupt-driven I/O per character transfer DMA (Direct Memory Access) a memory controller mechanism programmed by the OS to exchange data at high rate between main memory and the I/O device; The big win with DMA is twofold. First we reduce the number of interrupts from one per character to one per buffer. Second we benefit from the streaming effect of the data transfer.

The Operating System is responsible for choosing and managing the right technique for each specific I/O in order to deliver the best overall performance. 6. Briefly define the RAID levels. Ans: RAID is a technology that is used to increase the performance and/or reliability of data storage. The abbreviation stands for

Page 6 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

Redundant Array of Inexpensive Disks. A RAID system consists of two or more disks working in parallel. These disks can be hard discs but there is a trend to also use the technology for solid state drives. The software to perform the RAID-functionality and control the hard disks can either be located on a separate controller card (a hardware RAID controller) or it can simply be a driver. Some versions of Windows, such as Windows Server 2003, as well as Mac OS X include software RAID functionality. Hardware RAID controllers cost more than pure software but they also offer better performance. RAID-systems can be based with an number of interfaces, including SCSI, IDE, SATA or FC (fibre channel.) There are systems that use SATA disks internally but that have a FireWire or SCSI-interface for the host system. There are different RAID levels, each suiting specific situations. RAID levels are not standardized by an industry group. This explains why companies are sometimes creative and come up with their own unique implementations. Sometimes disks in a RAID system are defined as JBOD, which stands for Just a Bunch Of Disks. This means that those disks do not use a specific RAID level and are used as if they were stand-alone disks. This is often done for disks that contain swap files or spooling data. Below is an overview of the most popular levels: RAID 0: striping In a RAID 0 system, data are split up in blocks that get written across all the drives in the array. By using multiple disks (at least 2) at the same time, RAID 0 offers superior I/O performance. This performance can be enhanced further by using multiple controllers, ideally one controller per disk.

Page 7 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

Advantages

RAID 0 offers great performance, both in read and write operations. There is no overhead caused by parity controls. All storage capacity can be used, there is no disk overhead. The technology is easy to implement.

Disadvantages RAID 0 is not fault-tolerant. If one disk fails, all data in the RAID 0 array are lost. It should not be used on mission-critical systems. Ideal use RAID 0 is ideal for non-critical storage of data that have to be read/written at a high speed, e.g. on a Photoshop image retouching station. RAID 1: mirroring Data are stored twice by writing them to both the data disk (or set of data disks) and a mirror disk (or set of disks) . If a disk fails, the controller uses either the data drive or the mirror drive for data recovery and continues operation. You need at least 2 disks for a RAID 1 array.

Page 8 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

RAID 1 systems are often combined with RAID 0 to improve performance. Such a system is sometimes referred to by the combined number: a RAID 10 system. Advantages

RAID 1 offers excellent read speed and a write-speed that is comparable to that of a single disk. In case a disk fails, data do not have to be rebuild, they just have to be copied to the replacement disk. RAID 1 is a very simple technology.

Disadvantages

The main disadvantage is that the effective storage capacity is only half of the total disk capacity because all data get written twice. Software RAID 1 solutions do not always allow a hot swap of a failed disk (meaning it cannot be replaced while the server keeps running). Ideally a hardware controller is used.

Ideal use RAID-1 is ideal for mission critical storage, for instance for accounting systems. It is also suitable for small servers in which only two disks will be used.

Page 9 of 13

System Software Assignment - 2 RAID 3

MIM9-12 Sem-IV

On RAID 3 systems, datablocks are subdivided (striped) and written in parallel on two or more drives. An additional drive stores parity information. You need at least 3 disks for a RAID 3 array.

Since parity is used, a RAID 3 stripe set can withstand a single disk failure without losing data or access to data. Advantages

RAID-3 provides high throughput (both read and write) for large data transfers. Disk failures do not significantly slow down throughput.

Disadvantages

This technology is fairly complex and too resource intensive to be done in software. Performance is slower for random, small I/O operations.

Ideal use RAID 3 is not that common in prepress.

Page 10 of 13

System Software Assignment - 2 RAID 5

MIM9-12 Sem-IV

RAID 5 is the most common secure RAID level. It is similar to RAID-3 except that data are transferred to disks by independent read and write operations (not in parallel). The data chunks that are written are also larger. Instead of a dedicated parity disk, parity information is spread across all the drives. You need at least 3 disks for a RAID 5 array. A RAID 5 array can withstand a single disk failure without losing data or access to data. Although RAID 5 can be achieved in software, a hardware controller is recommended. Often extra cache memory is used on these controllers to improve the write performance.

Advantages Read data transactions are very fast while write data transaction are somewhat slower (due to the parity that has to be calculated). Disadvantages

Disk failures have an effect on throughput, although this is still acceptable. Like RAID 3, this is complex technology.

Page 11 of 13

System Software Assignment - 2 Ideal use

MIM9-12 Sem-IV

RAID 5 is a good all-round system that combines efficient storage with excellent security and decent performance. It is ideal for file and application servers. RAID 10: a mix of RAID 0 & RAID 1 RAID 10 combines the advantages (and disadvantages) of RAID 0 and RAID 1 in a single system. It provides security by mirroring all data on a secondary set of disks (disk 3 and 4 in the drawing below) while using striping across each set of disks to speed up data transfers.

About RAID 2, 4, 6 : These levels do exist but are not that common, at least not in prepress environments. RAID 2

Page 12 of 13

System Software Assignment - 2

MIM9-12 Sem-IV

In RAID 2 (bit-level striping with dedicated Hamming-code parity), all disk spindle rotation is synchronized, and data is striped such that each sequential bit is on a different disk. Hamming-code parity is calculated across corresponding bits on disks and stored on one or more parity disks. Extremely high data transfer rates are possible. RAID 4 Characteristics: Same as RAID 3, but with block-level parity protection. Application: Using read and write cache is well suited with file serving environments. RAID 6 Characteristics: Disk striping with rotating parity using dual-parity drives intended to reduce data availability exposure during a disk drive rebuild, particularly when using larger capacity Fibre Channel and SATA disk drives. The issue with RAID 6, and any multi drive parity scheme, is performance overheard for parity calculations when writing data or rebuilding from a failed disk drive. Application: In general, if you are looking for high-performance reads and writes, look at using smaller disk drives and avoiding RAID 6. If on the other hand you are looking to store large amounts of data where rebuilds can occur in the background, RAID 5 and RAID 6 can be a fit when properly configured to your application needs. In RAID 2 (bit-level striping with dedicated Hamming-code parity), all disk spindle rotation is synchronized, and data is striped such that each sequential bit is on a different disk. Hamming-code parity is calculated across corresponding bits on disks and stored on one or more parity disks. Extremely high data transfer rates are possible.

Page 13 of 13

S-ar putea să vă placă și