stdio: Standard I/O Library Perfomance issuesAlignmentI/O performance is optimal when requests are issued on block-aligned boundaries in integer multiples of the block sizeI/O의 성능은 OS가 관리하는 block사이즈의 배수로 관리되는 buffer의 유무에 달려있습니다. 즉 buffer의 시작주소나 길이가 block size의 양수배여야 성능이 좋아집니다.Number of system callsPerformance degradation is exacerbated by the increased number of system calls required to readA si..
분류 전체보기
I/O Redirection Operators Redirecting stadard output: >Usage: command > filenameRedirects the standard output to a file rather than the screenCreates the new destination fileif the file already exists, it will be overwritten with the data in the standard output이미 내용이 있거나, 이미 존재하는 파일이라면 기존의 내용은 사라지고 새로운 내용을 덮어씁니다E.g., ls > foo.txtCauses the shell to load and execute ls program, with standard outp..
https://arxiv.org/abs/1706.03762 Attention Is All You NeedThe dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-decoder configuration. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a newarxiv.org Abstract. 기존의 지배적인 transduction model들은 CNN 혹은 RNN기반이었습니다. 특히 가장 좋은 성능을 보이는..
Combinatorial Optimization (CO) Many computer science problems deal with the choice of a best set of parameters to achieve some goalExamplePlacement and routing problem in VLSI designThe traveling salesman problem굉장히 복잡한 해공간을 갖는 문제 Approaches to CO Heuristic search (Informed Search)Using a function that evaluates the quality of assignment, for example, the number of constraints violated by the a..
Zero-Sum Games and AI A player's utility gain or loss is exactly balanced by the combined gain or loss of opponents → 어느 한 플레이어에게 이득인것은 반대편 플레이어에게는 손해여야한다.This is a powerful concept important to AI development for measuring the cost/benefit of a particular moveNash Equilibrium Games and AI Traditional strategy - Minimax:Attempt to minimize opponent's maximum reward at each state (Nash Equilibriu..
Memory mapped I/OAllows an application to map a file into memoryProgrammers can access the file directly through memory어떤 file들을 메모리 공간에 mapping시켜서 pointer들으로 접근할 수 있게 해준다. mmap void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset)Maps len bytes of the object represented by the file descriptor fd, starting at offset, into memoryaddrOffers a suggestion to the kernel of whe..
File descriptorRegular filesSpecial filesCharacter devices (e.g., Keyboard)Block devicesPipesSockets우리가 평소에 다루던 진짜 file들은 Regular file들이고, Character devices나 pipe와 같은 file들을 Special file들이라 부른다. 그리고 Multiplexed I/O는 special file들에 유용하게 쓰인다. A signle process cannot reasonably block on more than one file descriptor at the same timeif a read() system call is issued, and there is not yet any data, t..
Traversal Visit Nodes of a Graph in SOME orderMay go through a node several timeWhile doing calculation Any order traversalStart at a node s (put s into BOX)while BOX is not empty:Take one node from BOXIf node not Marked:Mark nodeDo computation on nodeput Every Adjacent node This solves ReachabilitySolution: start at s, check if t was visited with any order traversal Proof (귀류법) 위에서 제시한 any orde..