operating-system

Any tool(s) for knowing the layout (segments) of running process in Windows?

耗尽温柔 提交于 2020-07-07 07:19:01
问题 I've always been curious about How exactly the process looks in memory? What are the different segments(parts) in it? How exactly will be the program (on the disk) & process (in the memory) are related? My previous question: more info on Memory layout of an executable program (process) In my quest, I finally found a answer. I found this excellent article that cleared most of my queries: http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html In the above

Event-driven Model in C with Sockets

一曲冷凌霜 提交于 2020-07-04 05:46:51
问题 I am really interested in event-driven programming in C especially with sockets so I am going to dedicate some time doing my researches. Let's assume that I want to build a program with much File and Network I/O like a client/server app, basically, the first question is what is the philosophy behind this model. While in normal programming I would spawn new processes, how come a single process can actually serve many other requests. For example, there are some web-servers which can handle

Event-driven Model in C with Sockets

眉间皱痕 提交于 2020-07-04 05:46:28
问题 I am really interested in event-driven programming in C especially with sockets so I am going to dedicate some time doing my researches. Let's assume that I want to build a program with much File and Network I/O like a client/server app, basically, the first question is what is the philosophy behind this model. While in normal programming I would spawn new processes, how come a single process can actually serve many other requests. For example, there are some web-servers which can handle

Why is Windows 32-bit called Windows x86 and not Windows x32?

陌路散爱 提交于 2020-06-24 07:01:19
问题 The Windows operating system can be either 32 bit or 64 bit. The 64 bit version is called Windows x64 but the 32 bit version is called Windows x86 . Why isn't it called Windows x32 ? What is the reason? 回答1: x86 is the name of the architecture that it's built to run on (the name comes from a series of old Intel processors, the names of which all ended in 86, The first of which was the 8086). Although x86 was originally a 16-bit architecture, the version in use today is the 32-bit extension.

BIOS INT 13H with AH=2 can only read 72 sectors each time. Why?

 ̄綄美尐妖づ 提交于 2020-06-22 15:42:42
问题 I am using Bochs 2.4.5 to write a boot sector code. I use the INT 13H to read sectors from floppy. But I found that if the sector count to read > 72, the INT13 will fail. And the return code is AH=1. Below's the code and here is the INT13. The return code is AH=1. Why can't the INT 13H read more than 72 sectors? xorb %ah, %ah xorb %dl, %dl int $0x13 # reset the floppy movw $0x8000, %ax movw %ax,%es movw $0, %bx # ES:BX is the buffer movb $0x02, %ah movb $73, %al # how many sectors to read. 72

Determining page numbers and offsets for given addresses

两盒软妹~` 提交于 2020-06-22 11:41:05
问题 Consider a computer system with a 32-bit logical address and 4KB page size. The system supports up to 512MB of physical memory. How many entries are there in a conventional single-level page table? Conventional single-level page table: 2^32 / 2^12 (4000) = 2^20 = 1,048,576 Why did I have to divide 2^32 / 2^12 to get the answer? How many entries are there in an inverted page table? An inverted page table needs as many entries as there are page frames in memory. Inverted page table: 2^29 (512mb

segment limit check in AMD 64-bit mode

一世执手 提交于 2020-06-17 17:07:29
问题 I am writing my own OS for 64bit processors and I am stuck with the problem of general protection. My OS will not rely on page fault to implement user space protection mechanism, so I found there is a way to do it with segment limit checking: This presentation from VMWare http://download3.vmware.com/vmworld/2005/pac346.pdf on page 20 says: Initial AMD64 architecture did not include segmentation in 64-bit mode Segmentation also missing from EMT64T How do we protect the VMM ? 64-bit guest

Why is link only working from macos operating system

本小妞迷上赌 提交于 2020-06-17 13:58:16
问题 I scraped a link and it works perfectly on chrome / safari / firefox at macos getting the ressource but when the same link is used from another operating system like windows or android I get a 404 error in the browser. An example link would be: https://p18d1c9b884-6b67-4bc4-8b38-7fe101682ea8.hdfilme.ws/hls/b74ec1eb98c4b214199fb328d53ed255/b74ec1eb98c4b214199fb328d53ed255-0.png?msKey=S9 It is part of a m3u8 file, which can be found under: https://load.hdfilme.ws/hls

Why is link only working from macos operating system

青春壹個敷衍的年華 提交于 2020-06-17 13:58:11
问题 I scraped a link and it works perfectly on chrome / safari / firefox at macos getting the ressource but when the same link is used from another operating system like windows or android I get a 404 error in the browser. An example link would be: https://p18d1c9b884-6b67-4bc4-8b38-7fe101682ea8.hdfilme.ws/hls/b74ec1eb98c4b214199fb328d53ed255/b74ec1eb98c4b214199fb328d53ed255-0.png?msKey=S9 It is part of a m3u8 file, which can be found under: https://load.hdfilme.ws/hls

What is difference between file descriptor and file pointer? [duplicate]

风格不统一 提交于 2020-06-14 06:38:09
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: What's the difference between a file descriptor and file pointer? If I open file like this: FILE *fp = fopen("mr32.txr","r"); then fp is file pointer or file descriptor? What is difference between them? 回答1: fp is a FILE pointer File pointer: It is high level interface Passed to fread() and fwrite() functions Includes buffering,error indication and EOF detection,etc. Provides higher portability and efficiency.