Wednesday, August 31, 2022

Process Scheduling Algorithms | Loksewa 2078 Question paper

 Q. Describe various process scheduling algorithms.  10 marks.

answer:
There are various algorithms which are used by the Operating System to schedule the processes on the processor.

The main reasons for scheduling algorithm are:
  1. To Maximize CPU utilization
  2. For Fair allocation of CPU
  3. To Maximize throughput
  4. To Minimize  turnaround time
  5. To Minimize waiting time
  6. To Minimize response time
Process scheduling algorithms consist of six types. Algorithms can either be non-preemptive or preemptive. Typically, non-preemptive algorithms prevent processes from being preempted until they have completed their allotted time, while preemptive scheduling is based on priority, in which a scheduler may preempt a low priority running process at any time when a high priority process becomes ready.

1.First Come First Service(FCFS)
This algorithm is the simplest algorithm. Those processes that arrive first will get the CPU.The faster the arrival time, the sooner the CPU will be available. It is the non-preemptive type of scheduling and is implemented by using FIFO queue.

Advantages:

  • Easy to implement
  • First come, first serve method

  • Disadvantages:
    •  It suffers from Convoy effect.
    •  average waiting time is much higher than the other algorithms
    • not much efficient
    2. Shortest Job First
       First, the process with the shortest burst time at a particular instant of time will be executed. In other words, it is a non-preemptive approach i.e. as soon as a process begins executing, it will be fully completed, and then some other process will take its place.

    Advantages
    • Best approach to minimize waiting time 
    • used for long term scheduling
    Disadvantages:
    • It has starvation
    • Many times it becomes complicated to predict the length of the upcoming CPU request
    3. Shortest Remaining Time
    This is the preemptive approach of the Shortest Job First algorithm. Here, at every instant of time, the CPU will check for some shortest job.

    Advantages:
    • Short processes will be executed first.
    Disadvantages:
    • It may result in starvation if short processes keep on coming.
    4. Priority Based Scheduling
    In this algorithm, the priority will be assigned to each of the processes. The higher the priority, the sooner will the process get the CPU. If the priority of the two processes is same then they will be scheduled according to their arrival time.

    Advantages:
    • The average waiting time is less than FCFS
    • Less complex
    Disadvantages:
    • It has Starvation Problem. This is the problem in which a process has to wait for a longer amount of time to get scheduled into the CPU. This condition is called the starvation problem.
    5. Round Robin
    The  algorithm where each process is cyclically assigned a fixed time slot. It is the preemptive version of First come First Serve CPU Scheduling algorithm. Round Robin CPU Algorithm generally focuses on Time Sharing technique.

    Advantages:
    • No starvation will be there in round-robin because every process will get chance for its execution.
    • Used in time-sharing systems.
    Disadvantages:
    • Need to  perform a lot of context switching here, which will keep the CPU idle

    6.Multilevel Queue Scheduling
    During multilevel queue scheduling, we divide a process into batches or queues, and give each queue a priority. It is thus necessary to maintain multiple queues for processes that share common characteristics, each queue having its own priority, and using some scheduling algorithm.

    Advantages:
    • It has a low scheduling overhead.
    Disadvantages:
    • Starvation problem
    • It is inflexible in nature
    Note:  For further strengthening the answers we can still add some small examples. This can be refer in internet. Take one example and utilize in all the scheduling algorithms, it will save the time and makes the answer precise

    Tuesday, August 30, 2022

    Deadlock in Operating System | Loksewa 2078

     Q. What do you mean by Deadlock? What are the necessary conditions for the deadlock to occur? (2+3+5) marks

    answer:

    Deadlock is a situation where two or more processes are waiting for each other. When a process requests resources and those resources are not available, the process enters a waiting state. Sometimes, a waiting process is permanently unable to change state because the resources it has requested are held by other waiting processes. This situation is called deadlock. Lets take a real time example, To obtain a voter card, you must provide proof of address, but to obtain proof of address, you must already have a voter card. So it depends on one another. Until any one step is not resolved this deadlock situation exists even in real life.

    @missionofficer

    Necessary Conditions of Deadlock

    There are four different conditions that result in Deadlock. These four conditions are also known as Coffman conditions and these conditions are not mutually exclusive.  They are:

    1. Mutual

    When this scenario occurs, only one process at a time can hold a resource, during which it cannot be shared with other applications. In addition, this is a critical policy applied by operating systems to prevent conflicts from occurring when two or more processes are using the resource simultaneously, which may result in incomplete data being saved.

    Nevertheless, this is a necessary condition for deadlocks to occur. The programs would not have to wait for each other if they could share the same resources.

    2. Hold and Wait

    A process must be handled at least one resource and waiting to require additional resources that are currently being held by the other processes.

    3. No Preemption

    It is not possible to forcefully prevent a resource from being included in a process by another process. As an example, if a process P1 is using a resource R, another process P2 cannot forcefully take it. Hence, various scheduling algorithms do not seem to be needed if that's the case. P2 can request and wait for the process P1 to release the resource R, which would be useful for the process P1.

    4, Circular  Wait

    Circular wait involves processes waiting for each other in a circle. Consequently, no one releases their own resource; everyone waits for each other to release it. Here, everyone is waiting to receive the resource. This is called a circular wait. To reach a deadlock, all four conditions need to be met. If a deadlock occurs, either the operating system needs to perform some work or the system needs to be rebooted.

    As soon as the circular wait is broken, the issue will be resolved since each program can then get the resources they need.

    Therefore, All four conditions are necessary for deadlock to occur. If any single one is prevented or resolved, the deadlock is resolved.

    Monday, August 29, 2022

    Nepal Bank Limited Level 6 IT Question Paper | 2079/05/12

    The following are the questions asked for the exam of IT assistant level 6 on date 2079/05/12.

    Topic: Banking, Management and General IT                                              

    Full Marks: 100

                                                                            Section "A"

    1.State different types of communication in a bank on problem solving and decision making process. (10)

    2. Briefly describe the need and importance of management information system (MIS) in bank and Financial Institutions. (5+5=10)

    3. Justify the role of "Group Dynamics and Team Work" in delivering a quality service of a bank you are working out when to work. Don't you think informal group dynamics may hinder the expected level of service of the bank? Discuss  logically with suitable examples. (10)

    4. What do you mean by Banking Technology? Briefly explain the role of Technology in competitive banking business. How can Nepal bank limited upgrade its technical efficiency compared to private sector banks? (2+8=10=20)


                                                                               Section "B"

    5. Write down the major areas covered by NRB IT guidelines 2012(NRB IT Policy 2067). (10)

    6. What are the guiding principles for categorizing bank's ICT systems into critical and non critical systems? Prescribe the procedure to be followed during the troubleshooting and maintenance of banks critical ICT system. (4+6=10)

    7.  Explain decision support system with suitable example. How can decision support system help for rational decision making in banking sector. (5+5=10)

    8.  Increasing use of Information Technology (IT) in banks and development of technologically complex products require a systematic monitoring and management of technology risk in banks. Inadequate IT risk management functions may also result in huge financial losses. Nepal Rastra Bank (NRB) has also issued IT guidelines 2012 for the banks as a guiding document for managing IT  functions and IT risk.              (5+5+10=20)                                                                  

    In this contest,

    i) Identify major IT risk in banks

    ii) How are provisions of IT guidelines 2012 issued by NRB useful for banks in IT risk management 

    ii) Prepare a brief IT risk management Framework for a bank

    Sunday, August 28, 2022

    Computer Applications And Memory Hierarchy | NBL 2078 question paper

     Q. What are the different applications of computer? Explain with examples. Describe about the Memory Hierarchy of computer system. (6+4)marks.

    answer:


    The term application refers to software, which is a set of instructions or code written in a program to perform an action or task on a computer. Applications are designed and developed to run on the system software, which is the operating system. Different types of computer applications:

    1) Application suites

    Packed with many programs that have user  interfaces, functions, and the ability to interact with the user; these include Microsoft Office, Adobe Creativity suite, security suites, game applicationsand many others.

    2) Enterprise Software

    Labels the requirements of an organization and also manages the flow of data in a huge environment. It includes automated billing systemsemail marketing, business intelligencecontent management, etc.

    3) Enterprise Infrastructure Software

    Provides the functionality needed to support enterprise software systems.Mainlyusedbycompanies,societies,andorganizationsthatrequire high investment in network security, surveillance systems, transportation, sewage, telecommunications, electricitywateretc. For examplefirmwareoperating systems, cryptographyetc.

    4) Educational Software

    Contains content on variety of subjects that can be used bystudentsandindividuals. There are websites that offer educational software on variety of topicsand their vast databases make them easy-to-use applicationsExamples include: Google Earth, NASA, Encyclopedia Encarta Timelineetc.

    5) Multimedia Software

    Used to develop media in everyday life. There are various audio, videoimage editing tools, and print media that can be used to maximize business growth. For  example Picasa, Window Movie maker, Adobe  Photoshopetc.


    6) Content Access Software

    Used to access content within a website to publish digital content and entertainment. Examples Media player, Web browser, etc.

    7) Informationsoftware

    These software are used to address the needs of individuals by creating and managing information for individual projects within department. Examples: word processors, spreadsheets, email and blog clientsetc.

    Memory Hierarchy

    In computer architecture, the memory hierarchy separates computer storage into a hierarchy based on response time. It ranges from the slowest but high capacity auxiliary memory to the fastest but low capacity cache memory.

    Typically, a memory unit can be classified into two categories:

    1. The memory unit that establishes direct communication with the CPU is called Main Memory. The main memory is often referred to as RAM (Random Access Memory).
    2. The memory units that provide backup storage are called Auxiliary Memory. For instance, magnetic disks and magnetic tapes are the most commonly used auxiliary memories.

    auxiliary memory

    Secondary memory is known to be the cheapest, largest, and slowest memory available in a computer system. Auxiliary storage provides storage space for programs and data that are stored for long-term storage or that are not used immediately. Examples: magnetic tape, magnetic disk, hard disk, zip disk, and floppy disk.

    main memory

    A computer system's main memory is often referred to as random access memory (RAM). This memory block communicates directly with the CPU and auxiliary memory devices through the I/O processor. Programs not currently needed in main memory are moved to secondary memory to make room for programs and data in current use. The main memory is divided into two main blocks:

    • Random Access Memory (RAM) integrated circuit chip.
    • Integrated read-only memory (ROM) circuits.

    The goals of memory hierarchy are-

    • To obtain the highest possible average access speed
    • To minimize the total cost of the entire memory system

    Characteristics:

    Capacity - As we go down the hierarchy, capacity increases.
    Access time - As we go down the hierarchy, the access time increases.
    Performance - Previously, computer system design was without memory hierarchy, and the speed gap between main memory and processor registers widens due to the huge difference in access time, this which leads to a decrease in system performance. The expansion was therefore mandatory. The extension was designed due to the increased system performance in the memory hierarchy model.
     Cost per bit As we move up the hierarchy, the cost per bit increases.

    Featured post

    Major Challenges for economic development of Nepal | Loksewa old Question Paper 2078

    Q. Wha t do you mean by Economic Growth and Economic Development?  What are the main challenges of economic development of Nepal? Give your ...

    Popular Posts