INTERVIEW | TECHNICAL INTERVIEWS | OPERATING SYSTEM | OPERATING SYSTEM INTERVIEW QUESTION AND ANSWERS | 07 | WHAT IS A PROCESS - WHY THREAD IS CALLED AS A LIGHTWEIGHT PROCESS

Operating System Interview Question and Answers:

What is a process - Why thread is called as a lightweight process

31. What is a process?

      A program in execution is called a process. Or it may also be called a unit of work. A process needs some system resources as CPU time, memory, files, and i/o devices to accomplish the task. Each process is represented in the operating system by a process control block or task control block (PCB).Processes are of two types

Operating system processes

User processes

32. What are the different job scheduling in operating systems?

      Scheduling is the activity of the deciding when process will receive the resources they request.

FCFS --> FCSFS stands for First Come First Served. In FCFS the job that has been waiting the longest is served next.

Round Robin Scheduling-->Round Robin scheduling is a scheduling method where each process gets a small quantity of time to run and then it is preempted and the next process gets to run. This is called time-sharing and gives the effect of all the processes running at the same time

Shortest Job First --> The Shortest job First scheduling algorithm is a nonpreemptive scheduling algorithm that chooses the job that will execute the shortest amount of time.

Priority Scheduling-->Priority scheduling is a scheduling method where at all times the highest priority process is assigned the resource.

What is dual-mode operation?

                In order to protect the operating systems and the system programs from the malfunctioning programs the two mode operations were evolved

System mode

User mode.

33. What is dual-mode operation?

              In order to protect the operating systems and the system programs from the malfunctioning programs the two mode operations were evolved

System mode

User mode.

34. What are operating system services?

    Program execution

    I/O operations

    File system manipulation

    Communication

    Error detection

    Resource allocation

    Accounting

    Protection

35. Why thread is called as a lightweight process?

          It is called light weight process to emphasize the fact that a thread is like a process but is more efficient and uses fewer resources( n hence “lighter”)and they also share the address space.

No comments:

Post a Comment