06-15-2011
Quote:
Originally Posted by
theKbStockpiler
Why emulate the CPU if you have the instruction set?
It's been found useful to break up one big server into many smaller, virtual ones. When you hear the term "virtual server" this is what they're talking about, a virtual environment inside a bigger server in which you can install pretty much whatever OS and software you want. Sometimes the host OS supports virtual environments natively, or it can be done through software like Qemu and VMware. Hardware virtualization has made this reasonably efficient now, but if they had to actually
emulate all these environments instruction by instruction? It wouldn't be practical.
Quote:
The data structure is Really the Emulated CPU is it not?
Data is registers; they just sit there. The
program has to decide what to do to them. In a real CPU, this would be decided in hardware. In a software emulator, it has to do it 'by hand' as it were, decoding which instruction it is with binary logic operations and finding it in a big look-up table or something, then doing operations on the "registers" as appropriate.
Quote:
The emulated CPU would be imaginary besides for its reprentation in a file the emulator would address so I could have registers of how many and what size I could dream up could I not?
Absolutely. I was just talking about optimization.
Last edited by Corona688; 06-15-2011 at 01:25 PM..
This User Gave Thanks to Corona688 For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
iam new to unix , i would like to practice unix commands at home, can anyone help me to know if there are any emulators that i can download to practice or any trial versions that can be installed to practice.
Regards
dep (1 Reply)
Discussion started by: dep
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Is there a command I can use to find out how many CPU's and what type are on my server? (I was told to use cat /proc/cpuinfo)
Also, how do I know what kind of bus speeds are on my server?
Thanks in advance:) (3 Replies)
Discussion started by: ihot
3 Replies
3. HP-UX
is there a single command or location from which one can get information like cpu Mhz,cpu cache...etc in HP UX:) (1 Reply)
Discussion started by: vijayca
1 Replies
4. Gentoo
well. the title says it all.
im runing top in batch mode like this
top -b -n1 > somefile
but the cpu usage info is not correct.
if i run top normally, the first second, i see the same wrong info, and then it corrects itself.
i found only one small mention of it on this forum. with this link... (7 Replies)
Discussion started by: broli
7 Replies
5. AIX
Hi,
may be this is an AIX noob question:
my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (5 Replies)
Discussion started by: DarthVader77
5 Replies
6. HP-UX
Hi,
I am going to buy a software that is licenced per CORE.
I have a HPUX B1123 64 bit with 8 cpus.
How can i know how many cores are in my machine ?
Thanks (3 Replies)
Discussion started by: yoavbe
3 Replies
7. Shell Programming and Scripting
Dear all,
Is there any generic command working on all Unix listing the CPU of a server?
I found different command line per OS but I am looking for a more generic one.
Thanks for your answer. (5 Replies)
Discussion started by: sgoiffon
5 Replies
8. Shell Programming and Scripting
Hello to everyone.
This is my first post. I want to make one perl agent which calculate following things from Linux Server. Actually I want to pull all this information from 2 linux client and wants to display on web interface.
First I want to calculate below details
1) CPU
2) MEMORY
3)... (6 Replies)
Discussion started by: sania.mirza
6 Replies
9. AIX
To get only the cpu info from the topas command terminal.
CPU User% Kern% Wait% Idle% Physc Entc
ALL 2.3 4.4 0.0 93.3 0.07 7.7
I tried some thing like this but did not work
topas << done
grep "ALL"
q
done
Can someone help me in this. (5 Replies)
Discussion started by: rpm120
5 Replies
10. UNIX for Dummies Questions & Answers
Hello all
i did search the web and found allot of answers but im confused
what are the best ways to get this info via Linux default commands
1. current Cpu Usage in Percent
2. current Memory Usage In Bytes
3. current Memory Available In Bytes
Thanks! (2 Replies)
Discussion started by: umen
2 Replies
LEARN ABOUT LINUX
s390_sthyi
S390_STHYI(2) System Calls Manual S390_STHYI(2)
NAME
s390_sthyi - emulate STHYI instruction
SYNOPSIS
#include <asm/unistd.h>
int s390_sthyi(unsigned long function_code, void *resp_buffer,
uint64_t *return_code, unsigned long flags);
DESCRIPTION
The s390_sthyi() system call emulates the STHYI (Store Hypervisor Information) instruction. It provides hardware resource information for
the machine and its virtualization levels. This includes CPU type and capacity, as well as the machine model and other metrics.
The function_code argument indicates which function to perform. The following code(s) are supported:
0 Return CP (Central Processor) and IFL (Integrated Facility for Linux) capacity information.
The resp_buffer argument specifies the address of a response buffer. When the function_code is 0, the buffer must be one page (4K) in
size. If the system call returns 0, the response buffer will be filled with CPU capacity information. Otherwise, the response buffer's
content is unchanged.
The return_code argument stores the return code of the STHYI instruction, using one of the following values:
0 Success.
4 Unsupported function code.
For further details about return_code, function_code, and resp_buffer, see the reference given in NOTES.
The flags argument is provided to allow for future extensions and currently must be set to 0.
RETURN VALUE
On success (that is: emulation succeeded), the return value of s390_sthyi() matches the condition code of the STHYI instructions, which is
a value in the range [0..3]. A return value of 0 indicates that CPU capacity information is stored in *resp_buffer. A return value of 3
indicates "unsupported function code" and the content of *resp_buffer is unchanged. The return values 1 and 2 are reserved.
On error, -1 is returned, and errno is set appropriately.
ERRORS
EFAULT The value specified in resp_buffer or return_code is not a valid address.
EINVAL The value specified in flags is nonzero.
ENOMEM Allocating memory for handling the CPU capacity information failed.
EOPNOTSUPP
The value specified in function_code is not valid.
VERSIONS
This system call is available since Linux 4.15.
CONFORMING TO
This Linux-specific system call is available only on the s390 architecture.
NOTES
Glibc does not provide a wrapper for this system call, use syscall(2) to call it.
For details of the STHYI instruction, see the documentation page <https://www.ibm.com/support/knowledgecenter/SSB27U_6.3.0
/com.ibm.zvm.v630.hcpb4/hcpb4sth.htm>.
When the system call interface is used, the response buffer doesn't have to fulfill alignment requirements described in the STHYI instruc-
tion definition.
The kernel caches the response (for up to one second, as of Linux 4.16). Subsequent system call invocations may return the cached
response.
SEE ALSO
syscall(2)
Linux Programmer's Manual 2019-03-06 S390_STHYI(2)