Write a C/C++ program which reads in a list of process names and integer times from stdin/cin and simulates round-robin CPU scheduling on the list. The input is a list of lines each consisting of a process name and an integer time, e.g. ProcessA 4 ProcessB 10 Read the list until end of transmission (^d). You should read the list and represent it in a linked list data structure. You should use the alarm system call to schedule a timer interrupt every 3 seconds. The interrupt handler should pick the next process from the process list, write a message saying how much time it has left to execute, i.e. ProcessA 4 Then update its time left to execute by subtracting 3 seconds and return it to the end of the queue. If the process had no time left to execute, you should write a message saying this i.e. ProcessA Finished And delete this process from the linked list. If there are no processes left to execute, write a message saying No processes left And terminate your program.
In: Computer Science
All students are expected to be able to discuss the topics intelligently and informed. You are encouraged to research the topic, make notes and citations as well. Please be prepared to turn in a list of your citations with your responces. Respond with atleast 1-2 Paragraph per question. Use realiable resources like EDU, GOV, OR UNIVERSITY ETC... .
1) Describe potential influences of socioeconomic status, geographic location and family size on the development of lifestyle related diseases. What are your thoughts about lifestyle habits that enhance health and longevity? How important are these to you and what obstacles keep you from adhering to these habits?
2) In your experience with personal fitness programs throughout the years, what factors have motivated you and helped you the most to stay with a program? What factors have kept you from being physically active, and what can you do to change these factors?
3) Ways you stay safe in your community.
4) Do you have any family members or know anyone with heart disease, diabetes, hypertension, cancer? Can you identify lifestyle or environmental factors that possibly contribute to the disease? What are you doing to change the family health lineage?
In: Nursing
Understanding student Growth. Over the course of Resh’s teaching career, He decides to understand how learning is changing from semester to semester. His theory is that if an instructor is easy to approach then students get better scores in the class. He decides to compare the student in 2018 between another instructor (Group A) and his classes (Group B).
Note: Group B will have an instructor that is approachable, friendly, funny and Charismatic. Group A will have an instructor that lacks all the qualities of group A instructor (yikes). After preliminary calculations, the descriptive statistics are as follows:
|
Group A |
Group B |
|
|
Mean |
64.2 pts |
93.3 pts |
|
Standard Deviation |
13.1 pts |
8.12 pts |
|
Sample Size |
231 |
120 |
Resh’s wants to understand if group A is statistically different from Group B.
a)List all Assumptions. (1pt)
b)State the null and alternative hypothesis(2pt)
c)Choose the test statistic. Explain your reasoning.(2pt)
d)Calculate the 95% CI for Group A. (1pt)
e)Calculate the test statistic to compare the means. (2pt)
f)Given a alpha=.05 and regarding the Hypothesis, What decision should the researcher make? (1pt)
g)State a conclusion that the researcher should reach based on these results (2pt)
In: Statistics and Probability
Development and Classroom Learning Plan Class Profile
Student Name : Lolita (1ST GRADE) English Language Learner: No Socioeconomic Status: Mid SES Ethnicity: Native American/Pacific Islander GENDER:Female DISABILITY:Dyslexia
How can other teachers, aides, staff, and administrators could come up with a plan for a student who has dyslexia? Questions are below for the student’s plan:
In: Nursing
From the list given to you for each of the following hypothesis testing situations, indicate the test you would use and explain the reason
Ho: M1 = M2 = M3 = M4
In: Statistics and Probability
In 2002 a U.S. court of appeals imposed remedies relating to a lower court’s findings that Microsoft had a monopoly in personal computer (PC) operating system and had maintained its monopoly through illegal actions.
At the U.S. Justice Department’s Web site, www.usdoj.gov,
Click on the Agencies on the top of the window,
Click on Antitrust Division and then on website
Click on Antitrust Case Filings
Find U.S. vs. Microsoft case filings.
Scroll down to District Court filings and find Findings of Fact
In the list of Findings of Fact find Court’s Findings of Fact (11/5/99).
In your initial response to the topic you have to answer all questions:
In: Economics
You are given a reference to the head node of a linked list that stores integers. Please print the minimum element in this linked list. The class ListNode.java contains the description of a single node in the linked list. It has a num field to store the integer number and a reference next that points to the next element in the list. The file MyList.class is a pre-defined java code, that creates a linked list. The file ListSmallest.java creates an instance of MyList, and gets the head node of this list. Please fill out the part that says “TODO”, that computes the minimum element in the list. For fun, please solve this problem recursively. This means that no part of your solution may include iterative loops. The list will not contain any integer greater than 2000000.
ListSmallest.java:
public class ListSmallest {
public static void main(String [] args) {
// Creating an instance of
MyList.
MyList L = new MyList();
// Get the head of the linked
list.
ListNode head = L.getHead();
// Create an object of this
program to avoid static context.
ListSmallest l = new
ListSmallest();
// head is the head of my linked
list L.
// TODO: please write a function to
print the minimum element in this list. Please store this in the
variable m.
int m = 0; // store the min in this
variable.
System.out.println("The smallest
is " + m);
}
}
ListNode.java:
public class ListNode
{
public int num;
public ListNode next;
public ListNode(int _num, ListNode _next)
{
num = _num;
next = _next;
}
}
MyList.java:
public class MyList
{
private ListNode head;
MyList()
{
System.out.println("Loading my list.");
for (int i = 0; i < 50000; ++i) {
this.head = new ListNode(200000 - i, this.head);
}
this.head = new ListNode(17, this.head);
for (int j = 50000; j < 100000; ++j)
{
this.head = new ListNode(200000 - j, this.head);
}
System.out.println("My list is successfully loaded. Please print
the smallest element.");
}
public ListNode getHead()
{
return this.head;
}
}
In: Computer Science
Focus on: Basic list operations, methods, use of functions, and good programming style. Program should be in basic python.
Part 1. Write a program that does the following:
1. Create a list of length N where N is a randomly selected integer
between 10 and 20 and
whose elements are randomly selected integers between 0 and
19.
2. Print out the list.
3. Create a copy of the list. Sort the copy into decreasing order
and print it.
4. Report the distinct elements in the list
Before continuing with the next two parts, add a function
user_input(lo, hi) to your
program. It should ask the user for an integer between lo and hi
and return the value. Use
appropriate error handling and input validation.
Part 2.
Write a function named how_many(a_list, a_num) that that expects a
list of numbers
and a number as arguments. It returns how many times the number is
found in the list.
If the number is not in the list, return 0. For example
how_many( [12, 15, 16, 4, 10, 3, 5, 7, 9, 15], 15 )
returns 2
And how_many( [12, 15, 16, 4, 10, 3, 5, 7, 9, 15], 11 )
returns 0
Ask the user for an integer between 0 and 19. If the number is in
the list, report how
many times it occurs.
Part 3.
Write a function named find_bigger(a_list, a_num) that expects as
arguments a list of
numbers and a number. It should return a new list consisting of all
the numbers in the list
that are greater than the number. For example
find_bigger( [12, 15, 16, 4, 10, 3, 5, 7, 9, 15], 11 )
returns [12, 15, 16, 15]
And find_bigger( [12, 15, 16, 4, 10, 3, 5, 7, 9, 15], 15 )
returns [16]
Ask the user for an integer between 0 and 19 and then report how
many of the items in the
list are greater than that number.
In: Computer Science
You are given a reference to the head node of a linked list that stores integers. Please print the minimum element in this linked list. The class ListNode.java contains the description of a single node in the linked list. It has a num field to store the integer number and a reference next that points to the next element in the list. The file MyList.class is a pre-defined java code, that creates a linked list. The file ListSmallest.java creates an instance of MyList, and gets the head node of this list. Please fill out the part that says “TODO”, that computes the minimum element in the list. For fun, please solve this problem recursively. This means that no part of your solution may include iterative loops. The list will not contain any integer greater than 2000000.
ListSmallest.java:
public class ListSmallest {
public static void main(String [] args) {
// Creating an instance of
MyList.
MyList L = new MyList();
// Get the head of the linked
list.
ListNode head = L.getHead();
// Create an object of this
program to avoid static context.
ListSmallest l = new
ListSmallest();
// head is the head of my linked
list L.
// TODO: please write a function to
print the minimum element in this list. Please store this in the
variable m.
int m = 0; // store the min in this
variable.
System.out.println("The smallest
is " + m);
}
}
ListNode.java:
public class ListNode
{
public int num;
public ListNode next;
public ListNode(int _num, ListNode _next)
{
num = _num;
next = _next;
}
}
MyList.java:
public class MyList
{
private ListNode head;
MyList()
{
System.out.println("Loading my list.");
for (int i = 0; i < 50000; ++i) {
this.head = new ListNode(200000 - i, this.head);
}
this.head = new ListNode(17, this.head);
for (int j = 50000; j < 100000; ++j)
{
this.head = new ListNode(200000 - j, this.head);
}
System.out.println("My list is successfully loaded. Please print
the smallest element.");
}
public ListNode getHead()
{
return this.head;
}
}
CANNOT ADJUST NODE SIZE!!
MUST SOLVE RECURSIVELY!!
In: Computer Science
You are given a reference to the head node of a linked list that stores integers. Please print the minimum element in this linked list. The class ListNode.java contains the description of a single node in the linked list. It has a num field to store the integer number and a reference next that points to the next element in the list. The file MyList.class is a pre-defined java code, that creates a linked list. The file ListSmallest.java creates an instance of MyList, and gets the head node of this list. Please fill out the part that says “TODO”, that computes the minimum element in the list. For fun, please solve this problem recursively. This means that no part of your solution may include iterative loops. The list will not contain any integer greater than 2000000.
ListSmallest.java:
public class ListSmallest {
public static void main(String [] args) {
// Creating an instance of
MyList.
MyList L = new MyList();
// Get the head of the linked
list.
ListNode head = L.getHead();
// Create an object of this
program to avoid static context.
ListSmallest l = new
ListSmallest();
// head is the head of my linked
list L.
// TODO: please write a function to
print the minimum element in this list. Please store this in the
variable m.
int m = 0; // store the min in this
variable.
System.out.println("The smallest
is " + m);
}
}
ListNode.java:
public class ListNode
{
public int num;
public ListNode next;
public ListNode(int _num, ListNode _next)
{
num = _num;
next = _next;
}
}
MyList.java:
public class MyList
{
private ListNode head;
MyList()
{
System.out.println("Loading my list.");
for (int i = 0; i < 50000; ++i) {
this.head = new ListNode(200000 - i, this.head);
}
this.head = new ListNode(17, this.head);
for (int j = 50000; j < 100000; ++j)
{
this.head = new ListNode(200000 - j, this.head);
}
System.out.println("My list is successfully loaded. Please print
the smallest element.");
}
public ListNode getHead()
{
return this.head;
}
}
CANNOT ADJUST NODE SIZE!!
MUST SOLVE RECURSIVELY!!
In: Computer Science