Question
Operating Systems


1. Name three ways in which the processor can transition from user mode to kernel mode? 2. What is a process? What is a threa
0 0
Add a comment Improve this question Transcribed image text
Answer #1

(1)

Following are the ways in which processor can switch from user mode to kernel mode:

  • Whenever the user process executes system call.
  • when the CPU(processor ) responds to  an interrupt generated.
  • Whenever the processor come across synchronous exceptions such as TRAPs.(Divide by zero, page faults etc).

(2)

Process:

  • A process is something which is created to execute a program or A program in execution is called as a process.
  • Process Control Block(PCB) holds control on a process It contains meta data about a process like process id, program counter, process state, general purpose registers, protection etc.
  • A process use system call like fork() to create it's child processes.
  • It is isolated i.e, doesn't share any segment of code section or data section of memory with other processes.
  • Takes more time to creation, termination and context switching.

Thread:

  • A segment/part of the process or a lightweight process(requires less memory) is referred as thread.
  • Threads share code and data section of memory unlike a process.
  • Takes less time for creation, termination and context switching.

Example:

Suppose there is a process in which it has to read 100 files. Since file reading is not involving any CPU, if there is only single thread of control it reads files one by one. So it is better to create 100 threads for a process so that read of 100 files can happen parallelly since file reading is I/0.

(3)

Preemptive Scheduling:

  • A scheduling in which CPU resources (cycles) are granted to a process for a limited time and after that time a process forcefully pulled back from cpu and process again kept back in ready state and gets scheduled back again if it still has any leftover burst time.
  • The process which is in execution will be obstructed in the middle if any other higher priority process gets scheduled.
  • Examples are: Round Robin, Shortest Job First (preemptive)(SJF) etc.

Non-Preemptive Scheduling:

  • In this type scheduling resources allocated to process are for life time of a process i.e, till it gets terminated.
  • No interruption of a process during it's execution to till it's completion even if any other higher priority process gets scheduled.
  • Examples include First come first serve (FCFS), SJF (non-preepmtive) etc

  

Add a comment
Know the answer?
Add Answer to:
Operating Systems 1. Name three ways in which the processor can transition from user mode to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • What can be the causes for the processor to transmission from user mode to kernel mode?...

    What can be the causes for the processor to transmission from user mode to kernel mode? Can the user execute arbitrary code after transitioning?

  • The VAX/ VMS operating system makes use of four processor access modes to facili-tate the protection...

    The VAX/ VMS operating system makes use of four processor access modes to facili-tate the protection and sharing of system resources among processes. The access mode determines:• Instruction execution privileges: What instructions the processor may execute• Memory access privileges: Which locations in virtual memory the current instruc-tion may access The four modes are as follows:• Kernel: Executes the kernel of the VMS operating system, which includes memo-ry management, interrupt handling, and I/ O operations• Executive: Executes many of the operating...

  • Four modes vs. two modes of operationg systems (kernel / user)

    The VAX/ VMS operating system makes use of four processor access modes to facili-tate the protection and sharing of system resources among processes. The accessmode determines:• Instruction execution privileges: What instructions the processor may execute• Memory access privileges: Which locations in virtual memory the current instruc-tion may accessThe four modes are as follows:• Kernel: Executes the kernel of the VMS operating system, which includes memo-ry management, interrupt handling, and I/ O operations• Executive: Executes many of the operating system service...

  • Operating Systems: 1. Given the three thread states: running, runnable (i.e., ready), and blocked...

    Operating Systems: 1. Given the three thread states: running, runnable (i.e., ready), and blocked (i.e., waiting), state which of the six possible thread transitions are allowed, and which ones are not. Also, for each case, provide an example of how the transition occurs, or a reason why it cannot (as a justification for each of your answers). Assume Mesa-style scheduling.

  • There are 3 strategies to map user to kernel threads. Briefly describe each. Which one is...

    There are 3 strategies to map user to kernel threads. Briefly describe each. Which one is used in most modern operating systems? Describe how an operating system can be viewed differently depending on the use case (e.g., administrators, users, developers, system engineers). There are 5 general areas of management that an operating system is responsible for. Name and briely describe 3 of them.

  • TRUE-FALSE     Basic synchronization principles and multithreading 1. Java user threads can implement both busy-waiting and no-busy-waiting...

    TRUE-FALSE     Basic synchronization principles and multithreading 1. Java user threads can implement both busy-waiting and no-busy-waiting policy. 2. Priority inversion avoids deadlocks. 3. Spinlock mutex can be used as an adaptive mutex. 4. Java RTE can be blocked for Input/Output operation. 5. Interrupted user thread, which executes a method in a monitor, must be rolled back to undo any changes it performed. 6. The synchronization primitive by disabling interrupts can be used by an application program. 7. Bounded-waiting requirement is...

  • 6. Name and discuss the three ways by which genetic recombination can occur in bacteria. Explain...

    6. Name and discuss the three ways by which genetic recombination can occur in bacteria. Explain how they reproduce. Can bacteria of different genera exchange genetic material?

  • There are many different ways that a company can approach the systems development process; (1) purchase...

    There are many different ways that a company can approach the systems development process; (1) purchase software from a vendor, (2) design the system in-house, or (3) outsource to develop and manage the information system, should the accountants or IT personnel determine how well does the system meets How well it meets user needs and whether it is economically feasible?

  • Briefly describe how the three helminthes morphology differs from one another: Name 2 ways in which...

    Briefly describe how the three helminthes morphology differs from one another: Name 2 ways in which that humans get infected by parasites: How are parasitic infections diagnosed in humans? Blood test/fecal examination?

  • Operating Siytem Concepts Homework No. 1 Variant No. 1 Student Cristian Anchei Paraschine (academic group, name,...

    Operating Siytem Concepts Homework No. 1 Variant No. 1 Student Cristian Anchei Paraschine (academic group, name, surname) I got the task.... (date, signature) Homework Submission Date: November 6th, 2019 Assignment: Consider the following set of processes, with the length of the CPU burst time given in milliseconds!: Process CPU burst time, ms Arrival time, ms Priority P 2 2 2 7 Ps 3 3 Draw a Gantt chart that illustrates process scheduling for these algorithms: a) First Come - First...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT