SS_Assignmen

download SS_Assignmen

of 13

Transcript of SS_Assignmen

  • 8/4/2019 SS_Assignmen

    1/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    1. What are the five major activities of an operating system inregard to process management?

    Ans: The operating system manages many kinds of activities rangingfrom user programs to system programs like printer spooler, name

    servers, file server etc. Each of these activities is encapsulated in aprocess. A process includes the complete execution context (code,data, PC, registers, OS resources in use etc.). It is important to notethat a process is not a program. A process is only ONE instant of aprogram in execution. There are many processes can be running thesame program.

    The five major activities of an operating system in regard to processmanagement are

    1. Creation and deletion of both user and system processes2. Suspension and resumption of processes3. Provision of mechanisms for process synchronization4. Provision of mechanisms for process communication5. 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 requestto run one specific program. For example, before the days of relationaldatabases, a job to produce a printed report for management might

    consist of the following steps: a user-written program to select theappropriate records and copy them to a temporary file; sort thetemporary file into the required order, usually using a general-purposeutility; a user-written program to present the information in a way thatis easy for the end-users to read and includes other useful informationsuch as sub-totals; and a user-written language to format selectedpages 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 orgroups 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

  • 8/4/2019 SS_Assignmen

    2/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    job, or in several different jobs. They save programmer time andreduce the risk of errors. To run a procedure one simply includes in theJCL file a single "card" which copies the procedure from a specified file,and inserts it into the jobstream. Also, procs can include parameters tocustomize the procedure for each use.

    Job Control Language (JCL) is a scripting language used on IBMmainframe operating systems to instruct the system on how to run abatch job or start a subsystem. The term "Job Control Language" canalso be used generically to refer to all languages which perform thesefunctions, such as Burroughs' WFL and ICL's OCL.There are actually two IBM JCLs: one for the operating system lineagethat begins with DOS/360 and whose latest member is z/VSE; and theother for the lineage from OS/360 to z/OS. They share some basicsyntax rules and a few basic concepts, but are otherwise verydifferent.

    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 Timesharing 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

  • 8/4/2019 SS_Assignmen

    3/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 onlycomputer peripherals-no CPU they have) are attached to a singlededicated server having own CPU. Dumb servers share the CPU ofdedicated server as they don't have their own CPUs. Every action orcommand in Time sharing operating systems is so short that very shortspan of CPU time is assigned for each user and thus the users at dumbsystems have an impression that they have their own CPU though thefact is they share the CPU of dedicated server. Such short periods oftime 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 ondisk

    each directory entry contains:

    o file name

    o starting address of the first block

    o block address = sector id (e.g., block = 4K)

    o length in blocks

    usual dynamic storage allocation problem

    o use first fit, best fit, or worst fit algorithms tomanage storage

    if the file can increase in size, either

    o leave no extra space, and copy the fileelsewhere if it expands

    o leave extra space

    Page 3 of 13

  • 8/4/2019 SS_Assignmen

    4/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 file name

    o block address: pointer to the first block

    o

    sometimes, also have a pointer to the lastblock (adding to the end of the file is much faster

    using this pointer)

    a view of the linked list

    Page 4 of 13

  • 8/4/2019 SS_Assignmen

    5/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 entry for each block on

    disk.

    better than linked allocation if we want to seek aparticular offset of a file because many links are storedtogether 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 inmain memory.

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

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

    Page 5 of 13

  • 8/4/2019 SS_Assignmen

    6/13

    System Software Assignment - 2 MIM9-12 Sem-IV

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

    ii) Separate index for each file

    index block gives pointers to data blocks which canbe 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 computerssystems. From the least efficient to the best performing, we find:

    1. Programmed I/O where the CPU is strictly tied to the I/O

    until it is finished.2. Interrupt-driven I/O per character transfer3. DMA (Direct Memory Access) a memory controller

    mechanism programmed by the OS to exchange data athigh rate between main memory and the I/O device; Thebig win with DMA is twofold. First we reduce the number ofinterrupts from one per character to one per buffer.Second we benefit from the streaming effect of the datatransfer.

    The Operating System is responsible for choosing and managing the

    right technique for each specific I/O in order to deliver the best overallperformance.

    6. Briefly define the RAID levels.

    Ans: RAID is a technology that is used to increase the performanceand/or reliability of data storage. The abbreviation stands for

    Page 6 of 13

  • 8/4/2019 SS_Assignmen

    7/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    Redundant Array of Inexpensive Disks. A RAID system consists of twoor more disks working in parallel. These disks can be hard discs butthere 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 hardwareRAID controller) or it can simply be a driver. Some versions ofWindows, such as Windows Server 2003, as well as Mac OS X includesoftware RAID functionality. Hardware RAID controllers cost more thanpure software but they also offer better performance.

    RAID-systems can be based with an number of interfaces, includingSCSI, IDE, SATA or FC (fibre channel.) There are systems that use SATAdisks internally but that have a FireWire or SCSI-interface for the hostsystem.

    There are different RAID levels, each suiting specific situations. RAIDlevels are not standardized by an industry group. This explains whycompanies are sometimes creative and come up with their own uniqueimplementations.

    Sometimes disks in a RAID system are defined as JBOD, which standsfor Just a Bunch Of Disks. This means that those disks do not use aspecific RAID level and are used as if they were stand-alone disks. Thisis 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 acrossall the drives in the array. By using multiple disks (at least 2) at thesame time, RAID 0 offers superior I/O performance. This performancecan be enhanced further by using multiple controllers, ideally onecontroller per disk.

    Page 7 of 13

  • 8/4/2019 SS_Assignmen

    8/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    Advantages

    RAID 0 offers great performance, both in read and writeoperations. 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 arrayare 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 beread/written at a high speed, e.g. on a Photoshop image retouchingstation.

    RAID 1: mirroring

    Data are stored twice by writing them to both the data disk (or set ofdata disks) and a mirror disk (or set of disks) . If a disk fails, thecontroller uses either the data drive or the mirror drive for datarecovery and continues operation. You need at least 2 disks for a RAID1 array.

    Page 8 of 13

  • 8/4/2019 SS_Assignmen

    9/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    RAID 1 systems are often combined with RAID 0 to improveperformance. Such a system is sometimes referred to by the combinednumber: a RAID 10 system.

    Advantages

    RAID 1 offers excellent read speed and a write-speed that iscomparable to that of a single disk.

    In case a disk fails, data do not have to be rebuild, they just haveto be copied to the replacement disk.

    RAID 1 is a very simple technology.

    Disadvantages

    The main disadvantage is that the effective storage capacity isonly half of the total disk capacity because all data get writtentwice.

    Software RAID 1 solutions do not always allow a hot swap of afailed disk (meaning it cannot be replaced while the server keepsrunning). Ideally a hardware controller is used.

    Ideal use

    RAID-1 is ideal for mission critical storage, for instance for accountingsystems. It is also suitable for small servers in which only two disks willbe used.

    Page 9 of 13

  • 8/4/2019 SS_Assignmen

    10/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    RAID 3

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

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

    Advantages

    RAID-3 provides high throughput (both read and write) for largedata transfers.

    Disk failures do not significantly slow down throughput.

    Disadvantages

    This technology is fairly complex and too resource intensive tobe 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

  • 8/4/2019 SS_Assignmen

    11/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    RAID 5

    RAID 5 is the most common secure RAID level. It is similar to RAID-3except that data are transferred to disks by independent read andwrite operations (not in parallel). The data chunks that are written are

    also larger. Instead of a dedicated parity disk, parity information isspread across all the drives. You need at least 3 disks for a RAID 5array.A RAID 5 array can withstand a single disk failure without losing dataor access to data. Although RAID 5 can be achieved in software, ahardware controller is recommended. Often extra cache memory isused on these controllers to improve the write performance.

    Advantages

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

    Disadvantages

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

    Page 11 of 13

  • 8/4/2019 SS_Assignmen

    12/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    Ideal use

    RAID 5 is a good all-round system that combines efficient storage withexcellent security and decent performance. It is ideal for file andapplication servers.

    RAID 10: a mix of RAID 0 & RAID 1

    RAID 10 combines the advantages (and disadvantages) of RAID 0 andRAID 1 in a single system. It provides security by mirroring all data ona secondary set of disks (disk 3 and 4 in the drawing below) whileusing 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 prepressenvironments.

    RAID 2

    Page 12 of 13

  • 8/4/2019 SS_Assignmen

    13/13

    System Software Assignment - 2 MIM9-12 Sem-IV

    In RAID 2 (bit-level striping with dedicated Hamming-code parity), alldisk spindle rotation is synchronized, and data is striped such thateach sequential bit is on a different disk. Hamming-code parity iscalculated across corresponding bits on disks and stored on one ormore 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 servingenvironments.

    RAID 6

    Characteristics: Disk striping with rotating parity using dual-parity

    drives intended to reduce data availability exposure during a disk driverebuild, particularly when using larger capacity Fibre Channel andSATA disk drives. The issue with RAID 6, and any multi drive parityscheme, is performance overheard for parity calculations when writingdata or rebuilding from a failed disk drive.

    Application: In general, if you are looking for high-performance readsand writes, look at using smaller disk drives and avoiding RAID 6. If onthe other hand you are looking to store large amounts of data whererebuilds can occur in the background, RAID 5 and RAID 6 can be a fitwhen properly configured to your application needs.

    In RAID 2 (bit-level striping with dedicated Hamming-code parity), alldisk spindle rotation is synchronized, and data is striped such thateach sequential bit is on a different disk. Hamming-code parity iscalculated across corresponding bits on disks and stored on one ormore parity disks. Extremely high data transfer rates are possible.

    Page 13 of 13

    http://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Hamming_codehttp://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Hamming_codehttp://en.wikipedia.org/wiki/Hamming_codehttp://en.wikipedia.org/wiki/Bithttp://en.wikipedia.org/wiki/Hamming_codehttp://en.wikipedia.org/wiki/Bit