1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
maksim [4K]
3 years ago
10

In this project, you will add a (self-proclaimed) priority attribute to xv6 processes. The priority does not actually do anythin

g (yet), we're just keeping track of it. The initial process should start with a priority of 10, but just like I/O streams, new processes should inherit the priority of the parent process. That is, if the parent process had a priority of 15, the child process should start with a priority of 15. Much of your effort will be spent understanding xv6 code. You should not need to write very much new code. (See below for the suggested order and other hints.) Create a system call: int priority(int pid,int priority) to allow manipulating the priority of a process. When called with pid:______.
Computers and Technology
1 answer:
kondor19780726 [428]3 years ago
6 0

Answer:

Priority programming is a process programming method based on priority. In this technique, the developer chooses the tasks to work according to priority, which is different from other types of programming, for example, a simple round-robin.

On UNIX and many other systems, higher priority values represent lower priority processes. Some of the systems, such as Windows, use the opposite convention: a higher number means a higher priority

<h3>Explanation: </h3>

Priorities can be dynamic or static. Static priorities are assigned during creation, while dynamic priorities are assigned according to the behavior of the processes while they are in the system. To illustrate, the planner could favor intensive input / output (I / O) tasks, allowing expensive requests to be issued as soon as possible.

Priorities can be defined internally or externally. Internally defined priorities make use of a measurable amount to calculate the priority of a given process. On the contrary, external priorities are defined using criteria beyond the operating system (OS), which may include the importance of the process, the type and sum of the resources used for the use of the computer, user preferences , trade and other factors such as politics etc.

i hope this is right lol

You might be interested in
Code written by computer programmers is translated to binary code, so computers can understand the instructions. True or False
san4es73 [151]

Answer:

True

Explanation:

High-level languages such as Java, C++, Ruby, Python, etc need to be translated into binary code so a computer can understand it, compile and execute them.

Machine language is the only language that is directly understood by the computer because it is written in binary code. But writing codes in Machine Language is tiring, tedious, and obsolete as no one really uses it anymore.

7 0
3 years ago
Which domain indicated the website is sponsored by the university or college
Pie

The answer is edu. Hope this helps.


3 0
3 years ago
Part 1: Create an application that allows you to enter student data that consists of an ID number, first name, last name, and gr
aleksley [76]

<u>PART A</u>

import java.io.*;

import java.util.Scanner;

public class StudentsStanding {

   private static final double CUT_OFF = 2.0;

   public static void main(String[] args)

   {

       try {

           PrintWriter goodFile = new PrintWriter(new FileWriter("goodStanding.txt"));

           PrintWriter probationFile = new PrintWriter(new FileWriter("probation.txt"));

           char choice;

           String firstName,lastName;

           Scanner input = new Scanner(System.in);

           int id;

           double gradePoint;

           do {

               System.out.print("Enter student Id: ");

               id = input.nextInt();

               input.nextLine();

               System.out.print("Enter First name: ");

               firstName = input.nextLine();

               System.out.print("Enter last name: ");

               lastName = input.nextLine();

               System.out.print("Enter grade point: ");

               gradePoint = input.nextDouble();

               if(gradePoint<CUT_OFF)

                   probationFile.println(id+","+firstName+","+lastName+","+gradePoint);

               else

                   goodFile.println(id+","+firstName+","+lastName+","+gradePoint);

               System.out.print("Do you want to continue..(y/n): ");

               choice = input.next().toLowerCase().charAt(0);

           }while (choice!='n');

           //close the streams

           goodFile.close();

           probationFile.close();

       }

       catch (IOException ex)

       {

           System.err.println("IO Exception occurs...");

       }

   }

}

<u>PART 2</u>

import java.io.File;

import java.io.FileNotFoundException;

import java.util.Scanner;

public class StudentsStanding2 {

   private static final double CUT_OFF = 2.0;

   public static void main(String[] args)

   {

       String header = "ID\t"+"First Name"+"\t"+"Last Name"+"\t"+"Grade Point"+"\t"+"Exceeds/Fall\n";

       try {

           Scanner probationFile= new Scanner(new File("probation.txt"));

           Scanner goodFile = new Scanner(new File("goodStanding.txt"));

           System.out.println("Cut Off is: "+CUT_OFF);

           System.out.println(header);

           double point ,exceed;

           while (probationFile.hasNextLine())

           {

               String[] tokens = probationFile.nextLine().split(",");

               point = Double.parseDouble(tokens[3]);

               exceed = CUT_OFF-point;

               System.out.println(String.format("%4s %7s %10s %10s %10s",tokens[0],tokens[1],tokens[2],point,String.format("%.2f",exceed)));

           }

           //Close the stream

           probationFile.close();

           while (goodFile.hasNextLine())

           {

               String[] tokens = goodFile.nextLine().split(",");

               point = Double.parseDouble(tokens[3]);

               exceed = point - CUT_OFF;

               System.out.println(String.format("%4s %7s %10s %10s %10s",tokens[0],tokens[1],tokens[2],point,String.format("%.2f",exceed)));

           }

           goodFile.close();

       }

       catch (FileNotFoundException ex)

       {

           System.err.println("File not found!!!");

       }

   }

}

6 0
4 years ago
PythonFunction Name: doublesParameters: list of int Returns: list of intDescription: Write a function, doubles, that takes a lis
lawyer [7]

Answer:

def doubles(ls):

   new = []

   for i in ls:

       for a in ls:

           if (i == a*2) and (i not in new) and i != 0:

               new.append(i)

               break

   return new

   

ls = [3, 0, 1, 2, 3, 6, 2, 4, 5, 6, 5]

print(doubles(ls))

Explanation:

The code is written in python.

The function doubles is created and it has one parameter.

In the function, a new list is created to hold the values that are exactly twice the previous integer in the list.

Two nested for loops are used with an if statement to achieve the desired result. The first FOR loop gets a number from the list entered by the user and holds that number while it waits for the second for loop and the if statement. The second FOR loop, iterates through all the elements in the list and compares them with the number being held by the first for loop through the IF statement.

The IF statement checks 3 things:

  • if the first number is x2 the second
  • if it is not already contained in the list
  • if the number is not zero

All these conditions must pass as True before the number is appended to the new list.

The break statement is there to ensure that the loop does not start evaluating unnecessary conditions, so when a match is found for one element the second loop breaks thereby allowing the first FOR loop to move to the next number.

Finally, the new list is returned and the function is called.

I have attached a picture of the result.

4 0
4 years ago
Mateo wants the words “It’s snowing!” to appear in the interpreter and typed print (It's snowing). This didn’t work. What needs
natima [27]

Answer:

print("It's snowing")

Explanation:

since it a string you need put quotation marks the code does not understand just (It's snowing) because it thinks it variable which it is not

6 0
3 years ago
Other questions:
  • What term refers to a piece of software that interfaces with the hardware on your computer?
    10·2 answers
  • What is the best overall approach to education and career development for IT professionals?
    14·1 answer
  • How can I make my Wi-Fi signal fast? I am going through my exam but my Wi-Fi is not supporting plz help.
    12·1 answer
  • Professor Zak allows students to drop the four lowest scores on the ten 100 point quizzes she gives during the semester. Design
    13·1 answer
  • To select a new theme for a slideshow use the blank tile in the ribbon
    9·2 answers
  • Write a method that accepts a string as an argument and returns a sorted string. For example, sort("acb") returns abc. Write a t
    6·1 answer
  • Help me plzzzz ASAP T-T and it's Cyber Security but my last day of school is tomorrow and I'll graduate in June 24 so plzzzzz I
    12·1 answer
  • PLEASEEEEEE HELP, ILL DO ANYTHING JUST ANSWER THESE CORRECTLY!!!!!TYSM!!!
    15·2 answers
  • A restaurant buys a pizza oven that is 4.5 feet long, 5 feet wide and 6 feet tall. What is the volume of the pizza oven?
    8·1 answer
  • Imagery functions as a coding system to help individuals acquire movement patterns. this describes
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!