Questions
1) A process control block determines which process is to be executed next is an example...

1)

A process control block

determines which process is to be executed next

is an example of a process queue.

Stores the address of the next instruction to be processed by a different process

Includes information on the process's state

2)

Consider a disk queue holding requests to the following cylinders in the list order: 98, 183, 57, 122, 200, 124, 65, 67. Using the SSTF scheduling algorithm, what is the order that the requests are serviced assuming the disk head is at cylinder 65?

65, 57, 98, 67, 122, 124, 183, 200

65, 67, 57, 98, 122, 124, 200, 183

65, 67, 57, 98,122, 124, 183, 200

65, 200, 183, 124, 122, 67, 98, 57

3)

Which of the following dynamic storage-allocation algorithm in use if selecting 50KB hole in meeting the sequence of 50KB, 100KB, 270KB, and 40KB for a 20KB process?

First fit

Best fit

Worst fit

None of the above

In: Computer Science

MATLAB PROBLEM You are given an array, weights, that contains the weights of some cargo items...

MATLAB PROBLEM

You are given an array, weights, that contains the weights of some cargo items in pounds. You want to load a truck with items from the list, up to its capacity. The truck has a maximum capacity of 1,000 pounds. For this problem use a "greedy" algorithm. That is, always load the heaviest item that will still fit on the truck. Keep loading until the remaining capcity of the truck is less than any of the remaining cargo items. For example, if the weights were {700, 400, 250, 100, 60}, you would load the 700-pound item, then the 250-pound item. The remaining items would be too heavy to fit on the truck. The weights will be generated randomly, so you cannot hard-code the answer - you must write a general algorithm to do it. Once the loading is complete, print a message indicating how many pounds of cargo were loaded onto the truck. NOTE: To satisfy the auto-grader, update the variable capacity so that it contains the remaining capacity of the truck. For example, if 943 pounds of cargo are loaded, capacity should be 57.

CODE PROVIDED BELOW

%The weights of the cargo items are generated at random

%They are sorted in descending order

weights = sort(randi(500, 1, randi(10)), 'descend')

capacity = 1000; %cargo capacity of the truck

In: Computer Science

You are a professional robber planning to rob houses along a street. Each house has a...

You are a professional robber planning to rob houses along a street. Each house has

a certain amount of money stashed, the only constraint stopping you from robbing

each of them is that adjacent houses have security system connected and it will

automatically contact the police if two adjacent houses were broken into on the same night.

Given a list of non-negative integers representing the amount of money of each house,

determine the maximum amount of money you can rob tonight without alerting the

police.

In: Computer Science

What is the data rate of the following system:   The system sends sends a set of...

What is the data rate of the following system:  

The system sends sends a set of twp 7-bit ASCII characters as a block. The block is proceeded by 1 start bit. After the two character block there is 1 parity bit and 2 stop bits? The bit time for this system is 0.0000025 seconds per bit.

What is the data rate of the following system:  

In: Computer Science

what is combination of software and hardware responsible for taking user's request

what is combination of software and hardware responsible for taking user's request

In: Computer Science

Medical Calculator Create a python program that allows the user to enter the following patient information:...

Medical Calculator

Create a python program that allows the user to enter the following patient information:

  • First name and Last name
  • gender
  • age
  • weight
  • height
  • systolic pressure and diastolic pressure
  • current body temperature in degrees Fahrenheit

Once the information is entered then the results should be printed on the display based on the information below:

  • BMI
  • Temp Conversion
  • Mean Blood Pressure
  • Weight Conversion (lbs to kg)
  • Height Conversion (inches to cm)

Output should be in the following format:

First Name Last Name is ___ cm and ___ kg's. First Name Last Name has a BMI of ___ , a temperature of ___ degrees Celsius, and his or her Mean Blood pressure is ___ mmHG. Mr or Ms Last Name is considered ____ (from the government BMI standards) and he or she has low/normal/high blood pressure.

Hint: all conversion formulas, BMI standards, and what is considered hi/normal/low BP's can be found online. The output should address the user by using Mr or Mrs and he or she.

In: Computer Science

write a matlab code that you use an ecg signal then extract it at one cycle...

write a matlab code that you use an ecg signal then extract it at one cycle to find the fourier series coefficients the code must be able to regenerate the signal for specific time period determined by the user through GUI. the system must plot the spectrum Cn and )Cn the ecg should generate at different values of N provided by the user through GUI.

only write the code of matlab

In: Computer Science

Using a simple text editor, create a text file with the following name "Test" and content:...

Using a simple text editor, create a text file with the following name "Test" and content:

GNU GENERAL PUBLIC LICENSE

The GNU General Public License is a free, copy left license for the GNU General Public License is intended to guarantee your freedom to GNU General Public License for most of our software; it applies …

  1. Write the command to create the text file.
  2. Print the file permissions.
  3. Create a directory named "361"
  4. Copy file "Test" to the directory "361"
  5. Rename the file to "GNU"
  6. Print the last 5 lines.
  7. Change the file owner to "Reem"
  8. Add Sticky bit.
  9. Make a search of "General" word
  10. Display the total number of characters in the file.

please give the answer in linux with secreenshot

In: Computer Science

We want to count how many passing grades are entered. We don’t know how many grades...

We want to count how many passing grades are entered. We don’t know how many grades there will be. Use a sentinel controlled while loop that will ask the user to enter student grades until a value of -1 is entered. Use a counter variable to count all the grades that are passing grades, where 70 is the minimum passing grade. If there are any grades that are out of the range 0 – 100, present an error message to the user, and do not count that grade as passing. We also would like to see what percentage of the valid grades are passing.

In: Computer Science

Create a class diagram based on the following system. At least 3 entities with 4+ properties...

  1. Create a class diagram based on the following system. At least 3 entities with 4+ properties apiece, 3 operations and at least 2 relationships between entities:

    A banking system that tracks accounts, account owners and transactions

In: Computer Science

Assuming: struct node { int data; node * next; }; and addList(node * head); Write a...

Assuming:
struct node
{
    int data;
    node * next;
};

and 
addList(node * head);

Write a function to recursively add to the end of a linear linked list.

In: Computer Science

Evening all, I'd like to get a detailed, clear, and well articulated answer to the below...

Evening all,

I'd like to get a detailed, clear, and well articulated answer to the below question. Please use correct english and grammar and proof-read your response. Please provide at least 2 detailed pages (double spaced), and provide at least one example and an abstract (executive summary) to start things off. PLEASE DO NOT COPY (PLAGIARISM) OFF THE INTERNET.

Question for essay: What is the "best" combination of Internet security and privacy services, hardware and software?

Note: PLEASE USE CORRECT ENGLISH. No English as a 2nd language!! No disrespect, but a lot of you Indian students have terrible grammar.

In: Computer Science

Discuss applications on Kali Linux that can be used to conduct an attack. Provide information on...

Discuss applications on Kali Linux that can be used to conduct an attack. Provide information on a specific tool such as SQL Map and steps that an attacker could use to carry out a successful attack.

In: Computer Science

MIPS Write a program that asks the user to enter an unsigned number and read it....

MIPS

Write a program that asks the user to enter an unsigned number and read it. Then swap the bits at odd positions with those at even positions and display the resulting number. For example, if the user enters the number 9, which has binary representation of 1001, then bit 0 is swapped

with bit 1, and bit 2 is swapped with bit 3, resulting in the binary number 0110. Thus, the

program should display 6.

In: Computer Science

In Python 3.6 Question 1 for strings a) Write a function named longest_common_prefix that takes two...

In Python 3.6

Question 1 for strings

a) Write a function named longest_common_prefix that takes two strings and returns the longest common prefix of the two strings. For example, the longest common prefix of distance and disinfection is dis. If the two strings have no common longest common prefix, the method returns an empty string.

b) Write a function named reverse that takes a string argument and returns its reverse. For example, reverse(‘I am testing’) should return the string ‘gnitset ma I’. Use iteration for this and answers using slicing will not be accepted. Imma like... what.

c) Write a function named check_password that checks whether a string is a valid password. Return True if it is a valid password and False otherwise. The password rules are as follows:

• A password must have at least 8 characters.

• A password must consist of only letters and digits.

• A password must contain at least two digits.

In: Computer Science